/*! For license information please see app.js.LICENSE.txt */
!function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(i,r,function(e){return t[e]}.bind(null,r));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/",n(n.s=0)}({"+aTx":function(t,e,n){var i,r;r=this,void 0===(i=function(){return r.svg4everybody=function(){function t(t,e,n){if(n){var i=document.createDocumentFragment(),r=!e.hasAttribute("viewBox")&&n.getAttribute("viewBox");r&&e.setAttribute("viewBox",r);for(var o=n.cloneNode(!0);o.childNodes.length;)i.appendChild(o.firstChild);t.appendChild(i)}}function e(e){e.onreadystatechange=function(){if(4===e.readyState){var n=e._cachedDocument;n||((n=e._cachedDocument=document.implementation.createHTMLDocument("")).body.innerHTML=e.responseText,e._cachedTarget={}),e._embeds.splice(0).map((function(i){var r=e._cachedTarget[i.id];r||(r=e._cachedTarget[i.id]=n.getElementById(i.id)),t(i.parent,i.svg,r)}))}},e.onreadystatechange()}function n(t){for(var e=t;"svg"!==e.nodeName.toLowerCase()&&(e=e.parentNode););return e}return function(i){var r,o=Object(i),s=window.top!==window.self;r="polyfill"in o?o.polyfill:/\bTrident\/[567]\b|\bMSIE (?:9|10)\.0\b/.test(navigator.userAgent)||(navigator.userAgent.match(/\bEdge\/12\.(\d+)\b/)||[])[1]<10547||(navigator.userAgent.match(/\bAppleWebKit\/(\d+)\b/)||[])[1]<537||/\bEdge\/.(\d+)\b/.test(navigator.userAgent)&&s;var a={},l=window.requestAnimationFrame||setTimeout,c=document.getElementsByTagName("use"),u=0;r&&function i(){for(var s=0;s<c.length;){var h=c[s],d=h.parentNode,p=n(d),f=h.getAttribute("xlink:href")||h.getAttribute("href");if(!f&&o.attributeName&&(f=h.getAttribute(o.attributeName)),p&&f){if(r)if(!o.validate||o.validate(f,p,h)){d.removeChild(h);var m=f.split("#"),g=m.shift(),v=m.join("#");if(g.length){var y=a[g];y||((y=a[g]=new XMLHttpRequest).open("GET",g),y.send(),y._embeds=[]),y._embeds.push({parent:d,svg:p,id:v}),e(y)}else t(d,p,document.getElementById(v))}else++s,++u}else++s}(!c.length||c.length-u>0)&&l(i,67)}()}}()}.apply(e,[]))||(t.exports=i)},"+lvF":function(t,e,n){t.exports=n("VTer")("native-function-to-string",Function.toString)},"+rLv":function(t,e,n){var i=n("dyZX").document;t.exports=i&&i.documentElement},0:function(t,e,n){n("FF1q"),n("aTL9"),n("iF46"),n("2zvH"),n("dIo1"),n("DAA8"),n("UceN"),n("PjFQ"),n("hNct"),n("sqCL"),n("LngM"),n("8B5Y"),n("GUwg"),n("o3iA"),n("1Bzg"),t.exports=n("94FF")},"0/R4":function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},"0sh+":function(t,e,n){var i=n("quPj"),r=n("vhPU");t.exports=function(t,e,n){if(i(e))throw TypeError("String#"+n+" doesn't accept regex!");return String(r(t))}},"1Bzg":function(t,e){},"1MBn":function(t,e,n){var i=n("DVgA"),r=n("JiEa"),o=n("UqcF");t.exports=function(t){var e=i(t),n=r.f;if(n)for(var s,a=n(t),l=o.f,c=0;a.length>c;)l.call(t,s=a[c++])&&e.push(s);return e}},"1TsA":function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},"2OiF":function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},"2zvH":function(t,e){},"3Lyj":function(t,e,n){var i=n("KroJ");t.exports=function(t,e,n){for(var r in e)i(t,r,e[r],n);return t}},"4R4u":function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},"69bn":function(t,e,n){var i=n("y3w9"),r=n("2OiF"),o=n("K0xU")("species");t.exports=function(t,e){var n,s=i(t).constructor;return void 0===s||null==(n=i(s)[o])?e:r(n)}},"6FMO":function(t,e,n){var i=n("0/R4"),r=n("EWmC"),o=n("K0xU")("species");t.exports=function(t){var e;return r(t)&&("function"!=typeof(e=t.constructor)||e!==Array&&!r(e.prototype)||(e=void 0),i(e)&&null===(e=e[o])&&(e=void 0)),void 0===e?Array:e}},"7DDg":function(t,e,n){"use strict";if(n("nh4g")){var i=n("LQAc"),r=n("dyZX"),o=n("eeVq"),s=n("XKFU"),a=n("D4iV"),l=n("7Qtz"),c=n("m0Pp"),u=n("9gX7"),h=n("RjD/"),d=n("Mukb"),p=n("3Lyj"),f=n("RYi7"),m=n("ne8i"),g=n("Cfrj"),v=n("d/Gc"),y=n("apmT"),b=n("aagx"),x=n("I8a+"),w=n("0/R4"),_=n("S/j/"),S=n("M6Qj"),M=n("Kuth"),E=n("OP3Y"),T=n("kJMx").f,A=n("J+6e"),L=n("ylqs"),P=n("K0xU"),C=n("CkkT"),R=n("w2a5"),O=n("69bn"),I=n("yt8O"),N=n("hPIQ"),D=n("XMVh"),z=n("elZq"),k=n("Nr18"),B=n("upKx"),F=n("hswa"),U=n("EemH"),j=F.f,H=U.f,G=r.RangeError,V=r.TypeError,W=r.Uint8Array,q=Array.prototype,X=l.ArrayBuffer,Y=l.DataView,Z=C(0),J=C(2),K=C(3),$=C(4),Q=C(5),tt=C(6),et=R(!0),nt=R(!1),it=I.values,rt=I.keys,ot=I.entries,st=q.lastIndexOf,at=q.reduce,lt=q.reduceRight,ct=q.join,ut=q.sort,ht=q.slice,dt=q.toString,pt=q.toLocaleString,ft=P("iterator"),mt=P("toStringTag"),gt=L("typed_constructor"),vt=L("def_constructor"),yt=a.CONSTR,bt=a.TYPED,xt=a.VIEW,wt=C(1,(function(t,e){return Tt(O(t,t[vt]),e)})),_t=o((function(){return 1===new W(new Uint16Array([1]).buffer)[0]})),St=!!W&&!!W.prototype.set&&o((function(){new W(1).set({})})),Mt=function(t,e){var n=f(t);if(n<0||n%e)throw G("Wrong offset!");return n},Et=function(t){if(w(t)&&bt in t)return t;throw V(t+" is not a typed array!")},Tt=function(t,e){if(!w(t)||!(gt in t))throw V("It is not a typed array constructor!");return new t(e)},At=function(t,e){return Lt(O(t,t[vt]),e)},Lt=function(t,e){for(var n=0,i=e.length,r=Tt(t,i);i>n;)r[n]=e[n++];return r},Pt=function(t,e,n){j(t,e,{get:function(){return this._d[n]}})},Ct=function(t){var e,n,i,r,o,s,a=_(t),l=arguments.length,u=l>1?arguments[1]:void 0,h=void 0!==u,d=A(a);if(null!=d&&!S(d)){for(s=d.call(a),i=[],e=0;!(o=s.next()).done;e++)i.push(o.value);a=i}for(h&&l>2&&(u=c(u,arguments[2],2)),e=0,n=m(a.length),r=Tt(this,n);n>e;e++)r[e]=h?u(a[e],e):a[e];return r},Rt=function(){for(var t=0,e=arguments.length,n=Tt(this,e);e>t;)n[t]=arguments[t++];return n},Ot=!!W&&o((function(){pt.call(new W(1))})),It=function(){return pt.apply(Ot?ht.call(Et(this)):Et(this),arguments)},Nt={copyWithin:function(t,e){return B.call(Et(this),t,e,arguments.length>2?arguments[2]:void 0)},every:function(t){return $(Et(this),t,arguments.length>1?arguments[1]:void 0)},fill:function(t){return k.apply(Et(this),arguments)},filter:function(t){return At(this,J(Et(this),t,arguments.length>1?arguments[1]:void 0))},find:function(t){return Q(Et(this),t,arguments.length>1?arguments[1]:void 0)},findIndex:function(t){return tt(Et(this),t,arguments.length>1?arguments[1]:void 0)},forEach:function(t){Z(Et(this),t,arguments.length>1?arguments[1]:void 0)},indexOf:function(t){return nt(Et(this),t,arguments.length>1?arguments[1]:void 0)},includes:function(t){return et(Et(this),t,arguments.length>1?arguments[1]:void 0)},join:function(t){return ct.apply(Et(this),arguments)},lastIndexOf:function(t){return st.apply(Et(this),arguments)},map:function(t){return wt(Et(this),t,arguments.length>1?arguments[1]:void 0)},reduce:function(t){return at.apply(Et(this),arguments)},reduceRight:function(t){return lt.apply(Et(this),arguments)},reverse:function(){for(var t,e=Et(this).length,n=Math.floor(e/2),i=0;i<n;)t=this[i],this[i++]=this[--e],this[e]=t;return this},some:function(t){return K(Et(this),t,arguments.length>1?arguments[1]:void 0)},sort:function(t){return ut.call(Et(this),t)},subarray:function(t,e){var n=Et(this),i=n.length,r=v(t,i);return new(O(n,n[vt]))(n.buffer,n.byteOffset+r*n.BYTES_PER_ELEMENT,m((void 0===e?i:v(e,i))-r))}},Dt=function(t,e){return At(this,ht.call(Et(this),t,e))},zt=function(t){Et(this);var e=Mt(arguments[1],1),n=this.length,i=_(t),r=m(i.length),o=0;if(r+e>n)throw G("Wrong length!");for(;o<r;)this[e+o]=i[o++]},kt={entries:function(){return ot.call(Et(this))},keys:function(){return rt.call(Et(this))},values:function(){return it.call(Et(this))}},Bt=function(t,e){return w(t)&&t[bt]&&"symbol"!=typeof e&&e in t&&String(+e)==String(e)},Ft=function(t,e){return Bt(t,e=y(e,!0))?h(2,t[e]):H(t,e)},Ut=function(t,e,n){return!(Bt(t,e=y(e,!0))&&w(n)&&b(n,"value"))||b(n,"get")||b(n,"set")||n.configurable||b(n,"writable")&&!n.writable||b(n,"enumerable")&&!n.enumerable?j(t,e,n):(t[e]=n.value,t)};yt||(U.f=Ft,F.f=Ut),s(s.S+s.F*!yt,"Object",{getOwnPropertyDescriptor:Ft,defineProperty:Ut}),o((function(){dt.call({})}))&&(dt=pt=function(){return ct.call(this)});var jt=p({},Nt);p(jt,kt),d(jt,ft,kt.values),p(jt,{slice:Dt,set:zt,constructor:function(){},toString:dt,toLocaleString:It}),Pt(jt,"buffer","b"),Pt(jt,"byteOffset","o"),Pt(jt,"byteLength","l"),Pt(jt,"length","e"),j(jt,mt,{get:function(){return this[bt]}}),t.exports=function(t,e,n,l){var c=t+((l=!!l)?"Clamped":"")+"Array",h="get"+t,p="set"+t,f=r[c],v=f||{},y=f&&E(f),b=!f||!a.ABV,_={},S=f&&f.prototype,A=function(t,n){j(t,n,{get:function(){return function(t,n){var i=t._d;return i.v[h](n*e+i.o,_t)}(this,n)},set:function(t){return function(t,n,i){var r=t._d;l&&(i=(i=Math.round(i))<0?0:i>255?255:255&i),r.v[p](n*e+r.o,i,_t)}(this,n,t)},enumerable:!0})};b?(f=n((function(t,n,i,r){u(t,f,c,"_d");var o,s,a,l,h=0,p=0;if(w(n)){if(!(n instanceof X||"ArrayBuffer"==(l=x(n))||"SharedArrayBuffer"==l))return bt in n?Lt(f,n):Ct.call(f,n);o=n,p=Mt(i,e);var v=n.byteLength;if(void 0===r){if(v%e)throw G("Wrong length!");if((s=v-p)<0)throw G("Wrong length!")}else if((s=m(r)*e)+p>v)throw G("Wrong length!");a=s/e}else a=g(n),o=new X(s=a*e);for(d(t,"_d",{b:o,o:p,l:s,e:a,v:new Y(o)});h<a;)A(t,h++)})),S=f.prototype=M(jt),d(S,"constructor",f)):o((function(){f(1)}))&&o((function(){new f(-1)}))&&D((function(t){new f,new f(null),new f(1.5),new f(t)}),!0)||(f=n((function(t,n,i,r){var o;return u(t,f,c),w(n)?n instanceof X||"ArrayBuffer"==(o=x(n))||"SharedArrayBuffer"==o?void 0!==r?new v(n,Mt(i,e),r):void 0!==i?new v(n,Mt(i,e)):new v(n):bt in n?Lt(f,n):Ct.call(f,n):new v(g(n))})),Z(y!==Function.prototype?T(v).concat(T(y)):T(v),(function(t){t in f||d(f,t,v[t])})),f.prototype=S,i||(S.constructor=f));var L=S[ft],P=!!L&&("values"==L.name||null==L.name),C=kt.values;d(f,gt,!0),d(S,bt,c),d(S,xt,!0),d(S,vt,f),(l?new f(1)[mt]==c:mt in S)||j(S,mt,{get:function(){return c}}),_[c]=f,s(s.G+s.W+s.F*(f!=v),_),s(s.S,c,{BYTES_PER_ELEMENT:e}),s(s.S+s.F*o((function(){v.of.call(f,1)})),c,{from:Ct,of:Rt}),"BYTES_PER_ELEMENT"in S||d(S,"BYTES_PER_ELEMENT",e),s(s.P,c,Nt),z(c),s(s.P+s.F*St,c,{set:zt}),s(s.P+s.F*!P,c,kt),i||S.toString==dt||(S.toString=dt),s(s.P+s.F*o((function(){new f(1).slice()})),c,{slice:Dt}),s(s.P+s.F*(o((function(){return[1,2].toLocaleString()!=new f([1,2]).toLocaleString()}))||!o((function(){S.toLocaleString.call([1,2])}))),c,{toLocaleString:It}),N[c]=P?L:C,i||P||d(S,ft,C)}}else t.exports=function(){}},"7Qtz":function(t,e,n){"use strict";var i=n("dyZX"),r=n("nh4g"),o=n("LQAc"),s=n("D4iV"),a=n("Mukb"),l=n("3Lyj"),c=n("eeVq"),u=n("9gX7"),h=n("RYi7"),d=n("ne8i"),p=n("Cfrj"),f=n("kJMx").f,m=n("hswa").f,g=n("Nr18"),v=n("fyDq"),y=i.ArrayBuffer,b=i.DataView,x=i.Math,w=i.RangeError,_=i.Infinity,S=y,M=x.abs,E=x.pow,T=x.floor,A=x.log,L=x.LN2,P=r?"_b":"buffer",C=r?"_l":"byteLength",R=r?"_o":"byteOffset";function O(t,e,n){var i,r,o,s=new Array(n),a=8*n-e-1,l=(1<<a)-1,c=l>>1,u=23===e?E(2,-24)-E(2,-77):0,h=0,d=t<0||0===t&&1/t<0?1:0;for((t=M(t))!=t||t===_?(r=t!=t?1:0,i=l):(i=T(A(t)/L),t*(o=E(2,-i))<1&&(i--,o*=2),(t+=i+c>=1?u/o:u*E(2,1-c))*o>=2&&(i++,o/=2),i+c>=l?(r=0,i=l):i+c>=1?(r=(t*o-1)*E(2,e),i+=c):(r=t*E(2,c-1)*E(2,e),i=0));e>=8;s[h++]=255&r,r/=256,e-=8);for(i=i<<e|r,a+=e;a>0;s[h++]=255&i,i/=256,a-=8);return s[--h]|=128*d,s}function I(t,e,n){var i,r=8*n-e-1,o=(1<<r)-1,s=o>>1,a=r-7,l=n-1,c=t[l--],u=127&c;for(c>>=7;a>0;u=256*u+t[l],l--,a-=8);for(i=u&(1<<-a)-1,u>>=-a,a+=e;a>0;i=256*i+t[l],l--,a-=8);if(0===u)u=1-s;else{if(u===o)return i?NaN:c?-_:_;i+=E(2,e),u-=s}return(c?-1:1)*i*E(2,u-e)}function N(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]}function D(t){return[255&t]}function z(t){return[255&t,t>>8&255]}function k(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]}function B(t){return O(t,52,8)}function F(t){return O(t,23,4)}function U(t,e,n){m(t.prototype,e,{get:function(){return this[n]}})}function j(t,e,n,i){var r=p(+n);if(r+e>t[C])throw w("Wrong index!");var o=t[P]._b,s=r+t[R],a=o.slice(s,s+e);return i?a:a.reverse()}function H(t,e,n,i,r,o){var s=p(+n);if(s+e>t[C])throw w("Wrong index!");for(var a=t[P]._b,l=s+t[R],c=i(+r),u=0;u<e;u++)a[l+u]=c[o?u:e-u-1]}if(s.ABV){if(!c((function(){y(1)}))||!c((function(){new y(-1)}))||c((function(){return new y,new y(1.5),new y(NaN),"ArrayBuffer"!=y.name}))){for(var G,V=(y=function(t){return u(this,y),new S(p(t))}).prototype=S.prototype,W=f(S),q=0;W.length>q;)(G=W[q++])in y||a(y,G,S[G]);o||(V.constructor=y)}var X=new b(new y(2)),Y=b.prototype.setInt8;X.setInt8(0,2147483648),X.setInt8(1,2147483649),!X.getInt8(0)&&X.getInt8(1)||l(b.prototype,{setInt8:function(t,e){Y.call(this,t,e<<24>>24)},setUint8:function(t,e){Y.call(this,t,e<<24>>24)}},!0)}else y=function(t){u(this,y,"ArrayBuffer");var e=p(t);this._b=g.call(new Array(e),0),this[C]=e},b=function(t,e,n){u(this,b,"DataView"),u(t,y,"DataView");var i=t[C],r=h(e);if(r<0||r>i)throw w("Wrong offset!");if(r+(n=void 0===n?i-r:d(n))>i)throw w("Wrong length!");this[P]=t,this[R]=r,this[C]=n},r&&(U(y,"byteLength","_l"),U(b,"buffer","_b"),U(b,"byteLength","_l"),U(b,"byteOffset","_o")),l(b.prototype,{getInt8:function(t){return j(this,1,t)[0]<<24>>24},getUint8:function(t){return j(this,1,t)[0]},getInt16:function(t){var e=j(this,2,t,arguments[1]);return(e[1]<<8|e[0])<<16>>16},getUint16:function(t){var e=j(this,2,t,arguments[1]);return e[1]<<8|e[0]},getInt32:function(t){return N(j(this,4,t,arguments[1]))},getUint32:function(t){return N(j(this,4,t,arguments[1]))>>>0},getFloat32:function(t){return I(j(this,4,t,arguments[1]),23,4)},getFloat64:function(t){return I(j(this,8,t,arguments[1]),52,8)},setInt8:function(t,e){H(this,1,t,D,e)},setUint8:function(t,e){H(this,1,t,D,e)},setInt16:function(t,e){H(this,2,t,z,e,arguments[2])},setUint16:function(t,e){H(this,2,t,z,e,arguments[2])},setInt32:function(t,e){H(this,4,t,k,e,arguments[2])},setUint32:function(t,e){H(this,4,t,k,e,arguments[2])},setFloat32:function(t,e){H(this,4,t,F,e,arguments[2])},setFloat64:function(t,e){H(this,8,t,B,e,arguments[2])}});v(y,"ArrayBuffer"),v(b,"DataView"),a(b.prototype,s.VIEW,!0),e.ArrayBuffer=y,e.DataView=b},"8B5Y":function(t,e){},"8a7r":function(t,e,n){"use strict";var i=n("hswa"),r=n("RjD/");t.exports=function(t,e,n){e in t?i.f(t,e,r(0,n)):t[e]=n}},"94FF":function(t,e,n){n("+aTx")({})},"9VmF":function(t,e,n){"use strict";var i=n("XKFU"),r=n("ne8i"),o=n("0sh+"),s="".startsWith;i(i.P+i.F*n("UUeW")("startsWith"),"String",{startsWith:function(t){var e=o(this,t,"startsWith"),n=r(Math.min(arguments.length>1?arguments[1]:void 0,e.length)),i=String(t);return s?s.call(e,i,n):e.slice(n,n+i.length)===i}})},"9gX7":function(t,e){t.exports=function(t,e,n,i){if(!(t instanceof e)||void 0!==i&&i in t)throw TypeError(n+": incorrect invocation!");return t}},A5AN:function(t,e,n){"use strict";var i=n("AvRE")(!0);t.exports=function(t,e,n){return e+(n?i(t,e).length:1)}},Afnz:function(t,e,n){"use strict";var i=n("LQAc"),r=n("XKFU"),o=n("KroJ"),s=n("Mukb"),a=n("hPIQ"),l=n("QaDb"),c=n("fyDq"),u=n("OP3Y"),h=n("K0xU")("iterator"),d=!([].keys&&"next"in[].keys()),p=function(){return this};t.exports=function(t,e,n,f,m,g,v){l(n,e,f);var y,b,x,w=function(t){if(!d&&t in E)return E[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},_=e+" Iterator",S="values"==m,M=!1,E=t.prototype,T=E[h]||E["@@iterator"]||m&&E[m],A=T||w(m),L=m?S?w("entries"):A:void 0,P="Array"==e&&E.entries||T;if(P&&(x=u(P.call(new t)))!==Object.prototype&&x.next&&(c(x,_,!0),i||"function"==typeof x[h]||s(x,h,p)),S&&T&&"values"!==T.name&&(M=!0,A=function(){return T.call(this)}),i&&!v||!d&&!M&&E[h]||s(E,h,A),a[e]=A,a[_]=p,m)if(y={values:S?A:w("values"),keys:g?A:w("keys"),entries:L},v)for(b in y)b in E||o(E,b,y[b]);else r(r.P+r.F*(d||M),e,y);return y}},AvRE:function(t,e,n){var i=n("RYi7"),r=n("vhPU");t.exports=function(t){return function(e,n){var o,s,a=String(r(e)),l=i(n),c=a.length;return l<0||l>=c?t?"":void 0:(o=a.charCodeAt(l))<55296||o>56319||l+1===c||(s=a.charCodeAt(l+1))<56320||s>57343?t?a.charAt(l):o:t?a.slice(l,l+2):s-56320+(o-55296<<10)+65536}}},Btvt:function(t,e,n){"use strict";var i=n("I8a+"),r={};r[n("K0xU")("toStringTag")]="z",r+""!="[object z]"&&n("KroJ")(Object.prototype,"toString",(function(){return"[object "+i(this)+"]"}),!0)},"C/va":function(t,e,n){"use strict";var i=n("y3w9");t.exports=function(){var t=i(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},CUlp:function(t,e,n){var i,r;"undefined"!=typeof window&&window,void 0===(r="function"==typeof(i=function(){"use strict";function t(){}var e=t.prototype;return e.on=function(t,e){if(t&&e){var n=this._events=this._events||{},i=n[t]=n[t]||[];return-1==i.indexOf(e)&&i.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var n=this._onceEvents=this._onceEvents||{};return(n[t]=n[t]||{})[e]=!0,this}},e.off=function(t,e){var n=this._events&&this._events[t];if(n&&n.length){var i=n.indexOf(e);return-1!=i&&n.splice(i,1),this}},e.emitEvent=function(t,e){var n=this._events&&this._events[t];if(n&&n.length){n=n.slice(0),e=e||[];for(var i=this._onceEvents&&this._onceEvents[t],r=0;r<n.length;r++){var o=n[r];i&&i[o]&&(this.off(t,o),delete i[o]),o.apply(this,e)}return this}},e.allOff=function(){delete this._events,delete this._onceEvents},t})?i.call(e,n,e,t):i)||(t.exports=r)},Cfrj:function(t,e,n){var i=n("RYi7"),r=n("ne8i");t.exports=function(t){if(void 0===t)return 0;var e=i(t),n=r(e);if(e!==n)throw RangeError("Wrong length!");return n}},CkkT:function(t,e,n){var i=n("m0Pp"),r=n("Ymqv"),o=n("S/j/"),s=n("ne8i"),a=n("zRwo");t.exports=function(t,e){var n=1==t,l=2==t,c=3==t,u=4==t,h=6==t,d=5==t||h,p=e||a;return function(e,a,f){for(var m,g,v=o(e),y=r(v),b=i(a,f,3),x=s(y.length),w=0,_=n?p(e,x):l?p(e,0):void 0;x>w;w++)if((d||w in y)&&(g=b(m=y[w],w,v),t))if(n)_[w]=g;else if(g)switch(t){case 3:return!0;case 5:return m;case 6:return w;case 2:_.push(m)}else if(u)return!1;return h?-1:c||u?u:_}}},D4iV:function(t,e,n){for(var i,r=n("dyZX"),o=n("Mukb"),s=n("ylqs"),a=s("typed_array"),l=s("view"),c=!(!r.ArrayBuffer||!r.DataView),u=c,h=0,d="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");h<9;)(i=r[d[h++]])?(o(i.prototype,a,!0),o(i.prototype,l,!0)):u=!1;t.exports={ABV:c,CONSTR:u,TYPED:a,VIEW:l}},DAA8:function(t,e){},DVgA:function(t,e,n){var i=n("zhAb"),r=n("4R4u");t.exports=Object.keys||function(t){return i(t,r)}},EWmC:function(t,e,n){var i=n("LZWt");t.exports=Array.isArray||function(t){return"Array"==i(t)}},EemH:function(t,e,n){var i=n("UqcF"),r=n("RjD/"),o=n("aCFj"),s=n("apmT"),a=n("aagx"),l=n("xpql"),c=Object.getOwnPropertyDescriptor;e.f=n("nh4g")?c:function(t,e){if(t=o(t),e=s(e,!0),l)try{return c(t,e)}catch(t){}if(a(t,e))return r(!i.f.call(t,e),t[e])}},FF1q:function(t,e,n){"use strict";n.r(e);n("Z2Ku"),n("L9s1"),n("Oyvg"),n("Wr5T");var i=n("dwco"),r=n.n(i),o=~window.navigator.userAgent.toLowerCase().indexOf("windows nt"),s=n("uvZ8"),a=n.n(s),l=n("yrm9"),c=n.n(l),u=n("tzf/"),h=n.n(u),d=(n("f3/d"),n("a1Th"),n("Btvt"),n("XfO3"),n("HEwt"),n("rGqo"),n("rE2o"),n("ioFf"),n("pIFo"),n("9VmF"),function(t,e){var n=t.getAttribute("href");if(null!==n&&(n.startsWith("//")&&(n=location.protocol+n),n.startsWith("http"))){var i=e===(n=n.replace(/\/$/,""))?"add":"remove";t.classList[i]("barba-active")}}),p=n("z/Fx"),f=function(t,e,n){n.preventDefault();var i=n.currentTarget.getAttribute("href");i.startsWith("/")&&i.slice(1);var r=0;if("#"!==i){var o=t.querySelector(i);if(null===o)return;var s=null==e?void 0:e.clientHeight;r=o.getBoundingClientRect().top+window.pageYOffset,r-=s;var a=n.currentTarget.getAttribute("data-minus-pos");null!==a&&(r-=a)}var l={top:r,behavior:"smooth"};window.scrollTo(l),history.replaceState("","",i)},m=document.querySelector(".js-header__menu-button"),g=document.querySelector(".js-header__nav-list"),v=document.querySelector(".js-header__nested-menu-button"),y=document.querySelector(".js-header__nested-nav-list"),b=document.querySelector(".js-header"),x=function(){return m.classList.contains("is-active")},w=function(){m.classList.toggle("is-active"),g.classList.toggle("is-active")},_=function(){v.classList.toggle("is-active"),y.classList.toggle("is-active")},S=function(t){x()&&(t.target.closest(".js-header")||(m.classList.remove("is-active"),g.classList.remove("is-active")))},M=n("dr3B");function E(t,e){var n;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=A(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,r=function(){};return{s:r,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return s=t.done,t},e:function(t){a=!0,o=t},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw o}}}}function T(t){return function(t){if(Array.isArray(t))return L(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||A(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 A(t,e){if(t){if("string"==typeof t)return L(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)?L(t,e):void 0}}function L(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}var P=[],C=[],R=[],O=[],I=[];document.body.addEventListener("click",S),m.addEventListener("click",w),v.addEventListener("click",_);var N=function(t){t.isIntersecting?t.target.classList.add("is-active"):t.target.classList.remove("is-active")},D=new ResizeObserver((function(t){t.forEach((function(t){Object(M.b)(t.target)}))})),z=function(t){var e=t.next.container;window.scrollTo(0,0);for(var n=location.href.replace(/\/$/,""),i=0,r=T(document.querySelectorAll("a"));i<r.length;i++){var o=r[i];d(o,n)}P=T(e.querySelectorAll('a[href^="#"], a[href^="/#"]'));for(var s=0;s<P.length;s++){var a=f.bind(P[s],e,b);C.push(a),P[s].addEventListener("click",a)}var l,c=E(T(e.querySelectorAll('[data-intersection="decoration"]')));try{for(c.s();!(l=c.n()).done;){var u=l.value;R.push(Object(p.a)(u,N))}}catch(t){c.e(t)}finally{c.f()}O=Object(M.a)(e);for(var h=0;h<O.length;h++){var m=M.c.bind(null,O[h]);I.push(m),O[h].header.addEventListener("click",m),D.observe(O[h].content)}},k=function(){},B=function(){x()&&w(),v.classList.contains("is-active")&&_()},F=function(){for(var t=0;t<P.length;t++){var e=C[t];P[t].removeEventListener("click",e)}P=[],C=[];var n,i=E(R);try{for(i.s();!(n=i.n()).done;){(0,n.value)()}}catch(t){i.e(t)}finally{i.f()}[],R=[];for(var r=0;r<O.length;r++){var o=I[r];O[r].header.removeEventListener("click",o),D.unobserve(O[r].content)}I=[],O=[]},U=(n("SRfc"),n("bdgK"));function j(t){return null!==t&&"object"==typeof t&&"constructor"in t&&t.constructor===Object}function H(t,e){void 0===t&&(t={}),void 0===e&&(e={}),Object.keys(e).forEach((function(n){void 0===t[n]?t[n]=e[n]:j(e[n])&&j(t[n])&&Object.keys(e[n]).length>0&&H(t[n],e[n])}))}var G={body:{},addEventListener:function(){},removeEventListener:function(){},activeElement:{blur:function(){},nodeName:""},querySelector:function(){return null},querySelectorAll:function(){return[]},getElementById:function(){return null},createEvent:function(){return{initEvent:function(){}}},createElement:function(){return{children:[],childNodes:[],style:{},setAttribute:function(){},getElementsByTagName:function(){return[]}}},createElementNS:function(){return{}},importNode:function(){return null},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function V(){var t="undefined"!=typeof document?document:{};return H(t,G),t}var W={document:G,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState:function(){},pushState:function(){},go:function(){},back:function(){}},CustomEvent:function(){return this},addEventListener:function(){},removeEventListener:function(){},getComputedStyle:function(){return{getPropertyValue:function(){return""}}},Image:function(){},Date:function(){},screen:{},setTimeout:function(){},clearTimeout:function(){},matchMedia:function(){return{}},requestAnimationFrame:function(t){return"undefined"==typeof setTimeout?(t(),null):setTimeout(t,0)},cancelAnimationFrame:function(t){"undefined"!=typeof setTimeout&&clearTimeout(t)}};function q(){var t="undefined"!=typeof window?window:{};return H(t,W),t}function X(t){return(X=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Y(t,e){return(Y=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Z(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}function J(t,e,n){return(J=Z()?Reflect.construct:function(t,e,n){var i=[null];i.push.apply(i,e);var r=new(Function.bind.apply(t,i));return n&&Y(r,n.prototype),r}).apply(null,arguments)}function K(t){var e="function"==typeof Map?new Map:void 0;return(K=function(t){if(null===t||(n=t,-1===Function.toString.call(n).indexOf("[native code]")))return t;var n;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,i)}function i(){return J(t,arguments,X(this).constructor)}return i.prototype=Object.create(t.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),Y(i,t)})(t)}var $=function(t){var e,n;function i(e){var n,i,r;return n=t.call.apply(t,[this].concat(e))||this,i=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(n),r=i.__proto__,Object.defineProperty(i,"__proto__",{get:function(){return r},set:function(t){r.__proto__=t}}),n}return n=t,(e=i).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n,i}(K(Array));function Q(t){void 0===t&&(t=[]);var e=[];return t.forEach((function(t){Array.isArray(t)?e.push.apply(e,Q(t)):e.push(t)})),e}function tt(t,e){return Array.prototype.filter.call(t,e)}function et(t,e){var n=q(),i=V(),r=[];if(!e&&t instanceof $)return t;if(!t)return new $(r);if("string"==typeof t){var o=t.trim();if(o.indexOf("<")>=0&&o.indexOf(">")>=0){var s="div";0===o.indexOf("<li")&&(s="ul"),0===o.indexOf("<tr")&&(s="tbody"),0!==o.indexOf("<td")&&0!==o.indexOf("<th")||(s="tr"),0===o.indexOf("<tbody")&&(s="table"),0===o.indexOf("<option")&&(s="select");var a=i.createElement(s);a.innerHTML=o;for(var l=0;l<a.childNodes.length;l+=1)r.push(a.childNodes[l])}else r=function(t,e){if("string"!=typeof t)return[t];for(var n=[],i=e.querySelectorAll(t),r=0;r<i.length;r+=1)n.push(i[r]);return n}(t.trim(),e||i)}else if(t.nodeType||t===n||t===i)r.push(t);else if(Array.isArray(t)){if(t instanceof $)return t;r=t}return new $(function(t){for(var e=[],n=0;n<t.length;n+=1)-1===e.indexOf(t[n])&&e.push(t[n]);return e}(r))}et.fn=$.prototype;var nt="resize scroll".split(" ");function it(t){return function(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];if(void 0===n[0]){for(var r=0;r<this.length;r+=1)nt.indexOf(t)<0&&(t in this[r]?this[r][t]():et(this[r]).trigger(t));return this}return this.on.apply(this,[t].concat(n))}}it("click"),it("blur"),it("focus"),it("focusin"),it("focusout"),it("keyup"),it("keydown"),it("keypress"),it("submit"),it("change"),it("mousedown"),it("mousemove"),it("mouseup"),it("mouseenter"),it("mouseleave"),it("mouseout"),it("mouseover"),it("touchstart"),it("touchend"),it("touchmove"),it("resize"),it("scroll");var rt={addClass:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var i=Q(e.map((function(t){return t.split(" ")})));return this.forEach((function(t){var e;(e=t.classList).add.apply(e,i)})),this},removeClass:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var i=Q(e.map((function(t){return t.split(" ")})));return this.forEach((function(t){var e;(e=t.classList).remove.apply(e,i)})),this},hasClass:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var i=Q(e.map((function(t){return t.split(" ")})));return tt(this,(function(t){return i.filter((function(e){return t.classList.contains(e)})).length>0})).length>0},toggleClass:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var i=Q(e.map((function(t){return t.split(" ")})));this.forEach((function(t){i.forEach((function(e){t.classList.toggle(e)}))}))},attr:function(t,e){if(1===arguments.length&&"string"==typeof t)return this[0]?this[0].getAttribute(t):void 0;for(var n=0;n<this.length;n+=1)if(2===arguments.length)this[n].setAttribute(t,e);else for(var i in t)this[n][i]=t[i],this[n].setAttribute(i,t[i]);return this},removeAttr:function(t){for(var e=0;e<this.length;e+=1)this[e].removeAttribute(t);return this},transform:function(t){for(var e=0;e<this.length;e+=1)this[e].style.transform=t;return this},transition:function(t){for(var e=0;e<this.length;e+=1)this[e].style.transition="string"!=typeof t?t+"ms":t;return this},on:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var i=e[0],r=e[1],o=e[2],s=e[3];function a(t){var e=t.target;if(e){var n=t.target.dom7EventData||[];if(n.indexOf(t)<0&&n.unshift(t),et(e).is(r))o.apply(e,n);else for(var i=et(e).parents(),s=0;s<i.length;s+=1)et(i[s]).is(r)&&o.apply(i[s],n)}}function l(t){var e=t&&t.target&&t.target.dom7EventData||[];e.indexOf(t)<0&&e.unshift(t),o.apply(this,e)}"function"==typeof e[1]&&(i=e[0],o=e[1],s=e[2],r=void 0),s||(s=!1);for(var c,u=i.split(" "),h=0;h<this.length;h+=1){var d=this[h];if(r)for(c=0;c<u.length;c+=1){var p=u[c];d.dom7LiveListeners||(d.dom7LiveListeners={}),d.dom7LiveListeners[p]||(d.dom7LiveListeners[p]=[]),d.dom7LiveListeners[p].push({listener:o,proxyListener:a}),d.addEventListener(p,a,s)}else for(c=0;c<u.length;c+=1){var f=u[c];d.dom7Listeners||(d.dom7Listeners={}),d.dom7Listeners[f]||(d.dom7Listeners[f]=[]),d.dom7Listeners[f].push({listener:o,proxyListener:l}),d.addEventListener(f,l,s)}}return this},off:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var i=e[0],r=e[1],o=e[2],s=e[3];"function"==typeof e[1]&&(i=e[0],o=e[1],s=e[2],r=void 0),s||(s=!1);for(var a=i.split(" "),l=0;l<a.length;l+=1)for(var c=a[l],u=0;u<this.length;u+=1){var h=this[u],d=void 0;if(!r&&h.dom7Listeners?d=h.dom7Listeners[c]:r&&h.dom7LiveListeners&&(d=h.dom7LiveListeners[c]),d&&d.length)for(var p=d.length-1;p>=0;p-=1){var f=d[p];o&&f.listener===o||o&&f.listener&&f.listener.dom7proxy&&f.listener.dom7proxy===o?(h.removeEventListener(c,f.proxyListener,s),d.splice(p,1)):o||(h.removeEventListener(c,f.proxyListener,s),d.splice(p,1))}}return this},trigger:function(){for(var t=q(),e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];for(var r=n[0].split(" "),o=n[1],s=0;s<r.length;s+=1)for(var a=r[s],l=0;l<this.length;l+=1){var c=this[l];if(t.CustomEvent){var u=new t.CustomEvent(a,{detail:o,bubbles:!0,cancelable:!0});c.dom7EventData=n.filter((function(t,e){return e>0})),c.dispatchEvent(u),c.dom7EventData=[],delete c.dom7EventData}}return this},transitionEnd:function(t){var e=this;return t&&e.on("transitionend",(function n(i){i.target===this&&(t.call(this,i),e.off("transitionend",n))})),this},outerWidth:function(t){if(this.length>0){if(t){var e=this.styles();return this[0].offsetWidth+parseFloat(e.getPropertyValue("margin-right"))+parseFloat(e.getPropertyValue("margin-left"))}return this[0].offsetWidth}return null},outerHeight:function(t){if(this.length>0){if(t){var e=this.styles();return this[0].offsetHeight+parseFloat(e.getPropertyValue("margin-top"))+parseFloat(e.getPropertyValue("margin-bottom"))}return this[0].offsetHeight}return null},styles:function(){var t=q();return this[0]?t.getComputedStyle(this[0],null):{}},offset:function(){if(this.length>0){var t=q(),e=V(),n=this[0],i=n.getBoundingClientRect(),r=e.body,o=n.clientTop||r.clientTop||0,s=n.clientLeft||r.clientLeft||0,a=n===t?t.scrollY:n.scrollTop,l=n===t?t.scrollX:n.scrollLeft;return{top:i.top+a-o,left:i.left+l-s}}return null},css:function(t,e){var n,i=q();if(1===arguments.length){if("string"!=typeof t){for(n=0;n<this.length;n+=1)for(var r in t)this[n].style[r]=t[r];return this}if(this[0])return i.getComputedStyle(this[0],null).getPropertyValue(t)}if(2===arguments.length&&"string"==typeof t){for(n=0;n<this.length;n+=1)this[n].style[t]=e;return this}return this},each:function(t){return t?(this.forEach((function(e,n){t.apply(e,[e,n])})),this):this},html:function(t){if(void 0===t)return this[0]?this[0].innerHTML:null;for(var e=0;e<this.length;e+=1)this[e].innerHTML=t;return this},text:function(t){if(void 0===t)return this[0]?this[0].textContent.trim():null;for(var e=0;e<this.length;e+=1)this[e].textContent=t;return this},is:function(t){var e,n,i=q(),r=V(),o=this[0];if(!o||void 0===t)return!1;if("string"==typeof t){if(o.matches)return o.matches(t);if(o.webkitMatchesSelector)return o.webkitMatchesSelector(t);if(o.msMatchesSelector)return o.msMatchesSelector(t);for(e=et(t),n=0;n<e.length;n+=1)if(e[n]===o)return!0;return!1}if(t===r)return o===r;if(t===i)return o===i;if(t.nodeType||t instanceof $){for(e=t.nodeType?[t]:t,n=0;n<e.length;n+=1)if(e[n]===o)return!0;return!1}return!1},index:function(){var t,e=this[0];if(e){for(t=0;null!==(e=e.previousSibling);)1===e.nodeType&&(t+=1);return t}},eq:function(t){if(void 0===t)return this;var e=this.length;if(t>e-1)return et([]);if(t<0){var n=e+t;return et(n<0?[]:[this[n]])}return et([this[t]])},append:function(){for(var t,e=V(),n=0;n<arguments.length;n+=1){t=n<0||arguments.length<=n?void 0:arguments[n];for(var i=0;i<this.length;i+=1)if("string"==typeof t){var r=e.createElement("div");for(r.innerHTML=t;r.firstChild;)this[i].appendChild(r.firstChild)}else if(t instanceof $)for(var o=0;o<t.length;o+=1)this[i].appendChild(t[o]);else this[i].appendChild(t)}return this},prepend:function(t){var e,n,i=V();for(e=0;e<this.length;e+=1)if("string"==typeof t){var r=i.createElement("div");for(r.innerHTML=t,n=r.childNodes.length-1;n>=0;n-=1)this[e].insertBefore(r.childNodes[n],this[e].childNodes[0])}else if(t instanceof $)for(n=0;n<t.length;n+=1)this[e].insertBefore(t[n],this[e].childNodes[0]);else this[e].insertBefore(t,this[e].childNodes[0]);return this},next:function(t){return this.length>0?t?this[0].nextElementSibling&&et(this[0].nextElementSibling).is(t)?et([this[0].nextElementSibling]):et([]):this[0].nextElementSibling?et([this[0].nextElementSibling]):et([]):et([])},nextAll:function(t){var e=[],n=this[0];if(!n)return et([]);for(;n.nextElementSibling;){var i=n.nextElementSibling;t?et(i).is(t)&&e.push(i):e.push(i),n=i}return et(e)},prev:function(t){if(this.length>0){var e=this[0];return t?e.previousElementSibling&&et(e.previousElementSibling).is(t)?et([e.previousElementSibling]):et([]):e.previousElementSibling?et([e.previousElementSibling]):et([])}return et([])},prevAll:function(t){var e=[],n=this[0];if(!n)return et([]);for(;n.previousElementSibling;){var i=n.previousElementSibling;t?et(i).is(t)&&e.push(i):e.push(i),n=i}return et(e)},parent:function(t){for(var e=[],n=0;n<this.length;n+=1)null!==this[n].parentNode&&(t?et(this[n].parentNode).is(t)&&e.push(this[n].parentNode):e.push(this[n].parentNode));return et(e)},parents:function(t){for(var e=[],n=0;n<this.length;n+=1)for(var i=this[n].parentNode;i;)t?et(i).is(t)&&e.push(i):e.push(i),i=i.parentNode;return et(e)},closest:function(t){var e=this;return void 0===t?et([]):(e.is(t)||(e=e.parents(t).eq(0)),e)},find:function(t){for(var e=[],n=0;n<this.length;n+=1)for(var i=this[n].querySelectorAll(t),r=0;r<i.length;r+=1)e.push(i[r]);return et(e)},children:function(t){for(var e=[],n=0;n<this.length;n+=1)for(var i=this[n].children,r=0;r<i.length;r+=1)t&&!et(i[r]).is(t)||e.push(i[r]);return et(e)},filter:function(t){return et(tt(this,t))},remove:function(){for(var t=0;t<this.length;t+=1)this[t].parentNode&&this[t].parentNode.removeChild(this[t]);return this}};Object.keys(rt).forEach((function(t){et.fn[t]=rt[t]}));var ot,st,at,lt=et;function ct(t,e){return void 0===e&&(e=0),setTimeout(t,e)}function ut(){return Date.now()}function ht(t){return"object"==typeof t&&null!==t&&t.constructor&&t.constructor===Object}function dt(){for(var t=Object(arguments.length<=0?void 0:arguments[0]),e=1;e<arguments.length;e+=1){var n=e<0||arguments.length<=e?void 0:arguments[e];if(null!=n)for(var i=Object.keys(Object(n)),r=0,o=i.length;r<o;r+=1){var s=i[r],a=Object.getOwnPropertyDescriptor(n,s);void 0!==a&&a.enumerable&&(ht(t[s])&&ht(n[s])?dt(t[s],n[s]):!ht(t[s])&&ht(n[s])?(t[s]={},dt(t[s],n[s])):t[s]=n[s])}}return t}function pt(t,e){Object.keys(e).forEach((function(n){ht(e[n])&&Object.keys(e[n]).forEach((function(i){"function"==typeof e[n][i]&&(e[n][i]=e[n][i].bind(t))})),t[n]=e[n]}))}function ft(){return ot||(ot=function(){var t=q(),e=V();return{touch:!!("ontouchstart"in t||t.DocumentTouch&&e instanceof t.DocumentTouch),pointerEvents:!!t.PointerEvent&&"maxTouchPoints"in t.navigator&&t.navigator.maxTouchPoints>=0,observer:"MutationObserver"in t||"WebkitMutationObserver"in t,passiveListener:function(){var e=!1;try{var n=Object.defineProperty({},"passive",{get:function(){e=!0}});t.addEventListener("testPassiveListener",null,n)}catch(t){}return e}(),gestures:"ongesturestart"in t}}()),ot}function mt(t){return void 0===t&&(t={}),st||(st=function(t){var e=(void 0===t?{}:t).userAgent,n=ft(),i=q(),r=i.navigator.platform,o=e||i.navigator.userAgent,s={ios:!1,android:!1},a=i.screen.width,l=i.screen.height,c=o.match(/(Android);?[\s\/]+([\d.]+)?/),u=o.match(/(iPad).*OS\s([\d_]+)/),h=o.match(/(iPod)(.*OS\s([\d_]+))?/),d=!u&&o.match(/(iPhone\sOS|iOS)\s([\d_]+)/),p="Win32"===r,f="MacIntel"===r;return!u&&f&&n.touch&&["1024x1366","1366x1024","834x1194","1194x834","834x1112","1112x834","768x1024","1024x768","820x1180","1180x820","810x1080","1080x810"].indexOf(a+"x"+l)>=0&&((u=o.match(/(Version)\/([\d.]+)/))||(u=[0,1,"13_0_0"]),f=!1),c&&!p&&(s.os="android",s.android=!0),(u||d||h)&&(s.os="ios",s.ios=!0),s}(t)),st}function gt(){return at||(at=function(){var t,e=q();return{isEdge:!!e.navigator.userAgent.match(/Edge/g),isSafari:(t=e.navigator.userAgent.toLowerCase(),t.indexOf("safari")>=0&&t.indexOf("chrome")<0&&t.indexOf("android")<0),isWebView:/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(e.navigator.userAgent)}}()),at}var vt={name:"resize",create:function(){var t=this;dt(t,{resize:{resizeHandler:function(){t&&!t.destroyed&&t.initialized&&(t.emit("beforeResize"),t.emit("resize"))},orientationChangeHandler:function(){t&&!t.destroyed&&t.initialized&&t.emit("orientationchange")}}})},on:{init:function(t){var e=q();e.addEventListener("resize",t.resize.resizeHandler),e.addEventListener("orientationchange",t.resize.orientationChangeHandler)},destroy:function(t){var e=q();e.removeEventListener("resize",t.resize.resizeHandler),e.removeEventListener("orientationchange",t.resize.orientationChangeHandler)}}};function yt(){return(yt=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(this,arguments)}var bt={attach:function(t,e){void 0===e&&(e={});var n=q(),i=this,r=new(n.MutationObserver||n.WebkitMutationObserver)((function(t){if(1!==t.length){var e=function(){i.emit("observerUpdate",t[0])};n.requestAnimationFrame?n.requestAnimationFrame(e):n.setTimeout(e,0)}else i.emit("observerUpdate",t[0])}));r.observe(t,{attributes:void 0===e.attributes||e.attributes,childList:void 0===e.childList||e.childList,characterData:void 0===e.characterData||e.characterData}),i.observer.observers.push(r)},init:function(){if(this.support.observer&&this.params.observer){if(this.params.observeParents)for(var t=this.$el.parents(),e=0;e<t.length;e+=1)this.observer.attach(t[e]);this.observer.attach(this.$el[0],{childList:this.params.observeSlideChildren}),this.observer.attach(this.$wrapperEl[0],{attributes:!1})}},destroy:function(){this.observer.observers.forEach((function(t){t.disconnect()})),this.observer.observers=[]}},xt={name:"observer",params:{observer:!1,observeParents:!1,observeSlideChildren:!1},create:function(){pt(this,{observer:yt(yt({},bt),{},{observers:[]})})},on:{init:function(t){t.observer.init()},destroy:function(t){t.observer.destroy()}}};function wt(t){var e=V(),n=q(),i=this.touchEventsData,r=this.params,o=this.touches;if(!this.animating||!r.preventInteractionOnTransition){var s=t;s.originalEvent&&(s=s.originalEvent);var a=lt(s.target);if(("wrapper"!==r.touchEventsTarget||a.closest(this.wrapperEl).length)&&(i.isTouchEvent="touchstart"===s.type,(i.isTouchEvent||!("which"in s)||3!==s.which)&&!(!i.isTouchEvent&&"button"in s&&s.button>0||i.isTouched&&i.isMoved)))if(r.noSwiping&&a.closest(r.noSwipingSelector?r.noSwipingSelector:"."+r.noSwipingClass)[0])this.allowClick=!0;else if(!r.swipeHandler||a.closest(r.swipeHandler)[0]){o.currentX="touchstart"===s.type?s.targetTouches[0].pageX:s.pageX,o.currentY="touchstart"===s.type?s.targetTouches[0].pageY:s.pageY;var l=o.currentX,c=o.currentY,u=r.edgeSwipeDetection||r.iOSEdgeSwipeDetection,h=r.edgeSwipeThreshold||r.iOSEdgeSwipeThreshold;if(!u||!(l<=h||l>=n.screen.width-h)){if(dt(i,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),o.startX=l,o.startY=c,i.touchStartTime=ut(),this.allowClick=!0,this.updateSize(),this.swipeDirection=void 0,r.threshold>0&&(i.allowThresholdMove=!1),"touchstart"!==s.type){var d=!0;a.is(i.formElements)&&(d=!1),e.activeElement&&lt(e.activeElement).is(i.formElements)&&e.activeElement!==a[0]&&e.activeElement.blur();var p=d&&this.allowTouchMove&&r.touchStartPreventDefault;(r.touchStartForcePreventDefault||p)&&s.preventDefault()}this.emit("touchStart",s)}}}}function _t(t){var e=V(),n=this.touchEventsData,i=this.params,r=this.touches,o=this.rtlTranslate,s=t;if(s.originalEvent&&(s=s.originalEvent),n.isTouched){if(!n.isTouchEvent||"touchmove"===s.type){var a="touchmove"===s.type&&s.targetTouches&&(s.targetTouches[0]||s.changedTouches[0]),l="touchmove"===s.type?a.pageX:s.pageX,c="touchmove"===s.type?a.pageY:s.pageY;if(s.preventedByNestedSwiper)return r.startX=l,void(r.startY=c);if(!this.allowTouchMove)return this.allowClick=!1,void(n.isTouched&&(dt(r,{startX:l,startY:c,currentX:l,currentY:c}),n.touchStartTime=ut()));if(n.isTouchEvent&&i.touchReleaseOnEdges&&!i.loop)if(this.isVertical()){if(c<r.startY&&this.translate<=this.maxTranslate()||c>r.startY&&this.translate>=this.minTranslate())return n.isTouched=!1,void(n.isMoved=!1)}else if(l<r.startX&&this.translate<=this.maxTranslate()||l>r.startX&&this.translate>=this.minTranslate())return;if(n.isTouchEvent&&e.activeElement&&s.target===e.activeElement&&lt(s.target).is(n.formElements))return n.isMoved=!0,void(this.allowClick=!1);if(n.allowTouchCallbacks&&this.emit("touchMove",s),!(s.targetTouches&&s.targetTouches.length>1)){r.currentX=l,r.currentY=c;var u=r.currentX-r.startX,h=r.currentY-r.startY;if(!(this.params.threshold&&Math.sqrt(Math.pow(u,2)+Math.pow(h,2))<this.params.threshold)){var d;if(void 0===n.isScrolling)this.isHorizontal()&&r.currentY===r.startY||this.isVertical()&&r.currentX===r.startX?n.isScrolling=!1:u*u+h*h>=25&&(d=180*Math.atan2(Math.abs(h),Math.abs(u))/Math.PI,n.isScrolling=this.isHorizontal()?d>i.touchAngle:90-d>i.touchAngle);if(n.isScrolling&&this.emit("touchMoveOpposite",s),void 0===n.startMoving&&(r.currentX===r.startX&&r.currentY===r.startY||(n.startMoving=!0)),n.isScrolling)n.isTouched=!1;else if(n.startMoving){this.allowClick=!1,!i.cssMode&&s.cancelable&&s.preventDefault(),i.touchMoveStopPropagation&&!i.nested&&s.stopPropagation(),n.isMoved||(i.loop&&this.loopFix(),n.startTranslate=this.getTranslate(),this.setTransition(0),this.animating&&this.$wrapperEl.trigger("webkitTransitionEnd transitionend"),n.allowMomentumBounce=!1,!i.grabCursor||!0!==this.allowSlideNext&&!0!==this.allowSlidePrev||this.setGrabCursor(!0),this.emit("sliderFirstMove",s)),this.emit("sliderMove",s),n.isMoved=!0;var p=this.isHorizontal()?u:h;r.diff=p,p*=i.touchRatio,o&&(p=-p),this.swipeDirection=p>0?"prev":"next",n.currentTranslate=p+n.startTranslate;var f=!0,m=i.resistanceRatio;if(i.touchReleaseOnEdges&&(m=0),p>0&&n.currentTranslate>this.minTranslate()?(f=!1,i.resistance&&(n.currentTranslate=this.minTranslate()-1+Math.pow(-this.minTranslate()+n.startTranslate+p,m))):p<0&&n.currentTranslate<this.maxTranslate()&&(f=!1,i.resistance&&(n.currentTranslate=this.maxTranslate()+1-Math.pow(this.maxTranslate()-n.startTranslate-p,m))),f&&(s.preventedByNestedSwiper=!0),!this.allowSlideNext&&"next"===this.swipeDirection&&n.currentTranslate<n.startTranslate&&(n.currentTranslate=n.startTranslate),!this.allowSlidePrev&&"prev"===this.swipeDirection&&n.currentTranslate>n.startTranslate&&(n.currentTranslate=n.startTranslate),i.threshold>0){if(!(Math.abs(p)>i.threshold||n.allowThresholdMove))return void(n.currentTranslate=n.startTranslate);if(!n.allowThresholdMove)return n.allowThresholdMove=!0,r.startX=r.currentX,r.startY=r.currentY,n.currentTranslate=n.startTranslate,void(r.diff=this.isHorizontal()?r.currentX-r.startX:r.currentY-r.startY)}i.followFinger&&!i.cssMode&&((i.freeMode||i.watchSlidesProgress||i.watchSlidesVisibility)&&(this.updateActiveIndex(),this.updateSlidesClasses()),i.freeMode&&(0===n.velocities.length&&n.velocities.push({position:r[this.isHorizontal()?"startX":"startY"],time:n.touchStartTime}),n.velocities.push({position:r[this.isHorizontal()?"currentX":"currentY"],time:ut()})),this.updateProgress(n.currentTranslate),this.setTranslate(n.currentTranslate))}}}}}else n.startMoving&&n.isScrolling&&this.emit("touchMoveOpposite",s)}function St(t){var e=this,n=e.touchEventsData,i=e.params,r=e.touches,o=e.rtlTranslate,s=e.$wrapperEl,a=e.slidesGrid,l=e.snapGrid,c=t;if(c.originalEvent&&(c=c.originalEvent),n.allowTouchCallbacks&&e.emit("touchEnd",c),n.allowTouchCallbacks=!1,!n.isTouched)return n.isMoved&&i.grabCursor&&e.setGrabCursor(!1),n.isMoved=!1,void(n.startMoving=!1);i.grabCursor&&n.isMoved&&n.isTouched&&(!0===e.allowSlideNext||!0===e.allowSlidePrev)&&e.setGrabCursor(!1);var u,h=ut(),d=h-n.touchStartTime;if(e.allowClick&&(e.updateClickedSlide(c),e.emit("tap click",c),d<300&&h-n.lastClickTime<300&&e.emit("doubleTap doubleClick",c)),n.lastClickTime=ut(),ct((function(){e.destroyed||(e.allowClick=!0)})),!n.isTouched||!n.isMoved||!e.swipeDirection||0===r.diff||n.currentTranslate===n.startTranslate)return n.isTouched=!1,n.isMoved=!1,void(n.startMoving=!1);if(n.isTouched=!1,n.isMoved=!1,n.startMoving=!1,u=i.followFinger?o?e.translate:-e.translate:-n.currentTranslate,!i.cssMode)if(i.freeMode){if(u<-e.minTranslate())return void e.slideTo(e.activeIndex);if(u>-e.maxTranslate())return void(e.slides.length<l.length?e.slideTo(l.length-1):e.slideTo(e.slides.length-1));if(i.freeModeMomentum){if(n.velocities.length>1){var p=n.velocities.pop(),f=n.velocities.pop(),m=p.position-f.position,g=p.time-f.time;e.velocity=m/g,e.velocity/=2,Math.abs(e.velocity)<i.freeModeMinimumVelocity&&(e.velocity=0),(g>150||ut()-p.time>300)&&(e.velocity=0)}else e.velocity=0;e.velocity*=i.freeModeMomentumVelocityRatio,n.velocities.length=0;var v=1e3*i.freeModeMomentumRatio,y=e.velocity*v,b=e.translate+y;o&&(b=-b);var x,w,_=!1,S=20*Math.abs(e.velocity)*i.freeModeMomentumBounceRatio;if(b<e.maxTranslate())i.freeModeMomentumBounce?(b+e.maxTranslate()<-S&&(b=e.maxTranslate()-S),x=e.maxTranslate(),_=!0,n.allowMomentumBounce=!0):b=e.maxTranslate(),i.loop&&i.centeredSlides&&(w=!0);else if(b>e.minTranslate())i.freeModeMomentumBounce?(b-e.minTranslate()>S&&(b=e.minTranslate()+S),x=e.minTranslate(),_=!0,n.allowMomentumBounce=!0):b=e.minTranslate(),i.loop&&i.centeredSlides&&(w=!0);else if(i.freeModeSticky){for(var M,E=0;E<l.length;E+=1)if(l[E]>-b){M=E;break}b=-(b=Math.abs(l[M]-b)<Math.abs(l[M-1]-b)||"next"===e.swipeDirection?l[M]:l[M-1])}if(w&&e.once("transitionEnd",(function(){e.loopFix()})),0!==e.velocity){if(v=o?Math.abs((-b-e.translate)/e.velocity):Math.abs((b-e.translate)/e.velocity),i.freeModeSticky){var T=Math.abs((o?-b:b)-e.translate),A=e.slidesSizesGrid[e.activeIndex];v=T<A?i.speed:T<2*A?1.5*i.speed:2.5*i.speed}}else if(i.freeModeSticky)return void e.slideToClosest();i.freeModeMomentumBounce&&_?(e.updateProgress(x),e.setTransition(v),e.setTranslate(b),e.transitionStart(!0,e.swipeDirection),e.animating=!0,s.transitionEnd((function(){e&&!e.destroyed&&n.allowMomentumBounce&&(e.emit("momentumBounce"),e.setTransition(i.speed),setTimeout((function(){e.setTranslate(x),s.transitionEnd((function(){e&&!e.destroyed&&e.transitionEnd()}))}),0))}))):e.velocity?(e.updateProgress(b),e.setTransition(v),e.setTranslate(b),e.transitionStart(!0,e.swipeDirection),e.animating||(e.animating=!0,s.transitionEnd((function(){e&&!e.destroyed&&e.transitionEnd()})))):e.updateProgress(b),e.updateActiveIndex(),e.updateSlidesClasses()}else if(i.freeModeSticky)return void e.slideToClosest();(!i.freeModeMomentum||d>=i.longSwipesMs)&&(e.updateProgress(),e.updateActiveIndex(),e.updateSlidesClasses())}else{for(var L=0,P=e.slidesSizesGrid[0],C=0;C<a.length;C+=C<i.slidesPerGroupSkip?1:i.slidesPerGroup){var R=C<i.slidesPerGroupSkip-1?1:i.slidesPerGroup;void 0!==a[C+R]?u>=a[C]&&u<a[C+R]&&(L=C,P=a[C+R]-a[C]):u>=a[C]&&(L=C,P=a[a.length-1]-a[a.length-2])}var O=(u-a[L])/P,I=L<i.slidesPerGroupSkip-1?1:i.slidesPerGroup;if(d>i.longSwipesMs){if(!i.longSwipes)return void e.slideTo(e.activeIndex);"next"===e.swipeDirection&&(O>=i.longSwipesRatio?e.slideTo(L+I):e.slideTo(L)),"prev"===e.swipeDirection&&(O>1-i.longSwipesRatio?e.slideTo(L+I):e.slideTo(L))}else{if(!i.shortSwipes)return void e.slideTo(e.activeIndex);e.navigation&&(c.target===e.navigation.nextEl||c.target===e.navigation.prevEl)?c.target===e.navigation.nextEl?e.slideTo(L+I):e.slideTo(L):("next"===e.swipeDirection&&e.slideTo(L+I),"prev"===e.swipeDirection&&e.slideTo(L))}}}function Mt(){var t=this.params,e=this.el;if(!e||0!==e.offsetWidth){t.breakpoints&&this.setBreakpoint();var n=this.allowSlideNext,i=this.allowSlidePrev,r=this.snapGrid;this.allowSlideNext=!0,this.allowSlidePrev=!0,this.updateSize(),this.updateSlides(),this.updateSlidesClasses(),("auto"===t.slidesPerView||t.slidesPerView>1)&&this.isEnd&&!this.isBeginning&&!this.params.centeredSlides?this.slideTo(this.slides.length-1,0,!1,!0):this.slideTo(this.activeIndex,0,!1,!0),this.autoplay&&this.autoplay.running&&this.autoplay.paused&&this.autoplay.run(),this.allowSlidePrev=i,this.allowSlideNext=n,this.params.watchOverflow&&r!==this.snapGrid&&this.checkOverflow()}}function Et(t){this.allowClick||(this.params.preventClicks&&t.preventDefault(),this.params.preventClicksPropagation&&this.animating&&(t.stopPropagation(),t.stopImmediatePropagation()))}function Tt(){var t=this.wrapperEl,e=this.rtlTranslate;this.previousTranslate=this.translate,this.isHorizontal()?this.translate=e?t.scrollWidth-t.offsetWidth-t.scrollLeft:-t.scrollLeft:this.translate=-t.scrollTop,-0===this.translate&&(this.translate=0),this.updateActiveIndex(),this.updateSlidesClasses();var n=this.maxTranslate()-this.minTranslate();(0===n?0:(this.translate-this.minTranslate())/n)!==this.progress&&this.updateProgress(e?-this.translate:this.translate),this.emit("setTranslate",this.translate,!1)}var At=!1;function Lt(){}var Pt={init:!0,direction:"horizontal",touchEventsTarget:"container",initialSlide:0,speed:300,cssMode:!1,updateOnWindowResize:!0,nested:!1,width:null,height:null,preventInteractionOnTransition:!1,userAgent:null,url:null,edgeSwipeDetection:!1,edgeSwipeThreshold:20,freeMode:!1,freeModeMomentum:!0,freeModeMomentumRatio:1,freeModeMomentumBounce:!0,freeModeMomentumBounceRatio:1,freeModeMomentumVelocityRatio:1,freeModeSticky:!1,freeModeMinimumVelocity:.02,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",breakpoints:void 0,spaceBetween:0,slidesPerView:1,slidesPerColumn:1,slidesPerColumnFill:"column",slidesPerGroup:1,slidesPerGroupSkip:0,centeredSlides:!1,centeredSlidesBounds:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:!0,centerInsufficientSlides:!1,watchOverflow:!1,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,allowTouchMove:!0,threshold:0,touchMoveStopPropagation:!1,touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchReleaseOnEdges:!1,uniqueNavElements:!0,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,watchSlidesVisibility:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,preloadImages:!0,updateOnImagesReady:!0,loop:!1,loopAdditionalSlides:0,loopedSlides:null,loopFillGroupWithBlank:!1,loopPreventsSlide:!0,allowSlidePrev:!0,allowSlideNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",noSwipingSelector:null,passiveListeners:!0,containerModifierClass:"swiper-container-",slideClass:"swiper-slide",slideBlankClass:"swiper-slide-invisible-blank",slideActiveClass:"swiper-slide-active",slideDuplicateActiveClass:"swiper-slide-duplicate-active",slideVisibleClass:"swiper-slide-visible",slideDuplicateClass:"swiper-slide-duplicate",slideNextClass:"swiper-slide-next",slideDuplicateNextClass:"swiper-slide-duplicate-next",slidePrevClass:"swiper-slide-prev",slideDuplicatePrevClass:"swiper-slide-duplicate-prev",wrapperClass:"swiper-wrapper",runCallbacksOnInit:!0,_emitClasses:!1};function Ct(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)}}var Rt={modular:{useParams:function(t){var e=this;e.modules&&Object.keys(e.modules).forEach((function(n){var i=e.modules[n];i.params&&dt(t,i.params)}))},useModules:function(t){void 0===t&&(t={});var e=this;e.modules&&Object.keys(e.modules).forEach((function(n){var i=e.modules[n],r=t[n]||{};i.on&&e.on&&Object.keys(i.on).forEach((function(t){e.on(t,i.on[t])})),i.create&&i.create.bind(e)(r)}))}},eventsEmitter:{on:function(t,e,n){var i=this;if("function"!=typeof e)return i;var r=n?"unshift":"push";return t.split(" ").forEach((function(t){i.eventsListeners[t]||(i.eventsListeners[t]=[]),i.eventsListeners[t][r](e)})),i},once:function(t,e,n){var i=this;if("function"!=typeof e)return i;function r(){i.off(t,r),r.__emitterProxy&&delete r.__emitterProxy;for(var n=arguments.length,o=new Array(n),s=0;s<n;s++)o[s]=arguments[s];e.apply(i,o)}return r.__emitterProxy=e,i.on(t,r,n)},onAny:function(t,e){if("function"!=typeof t)return this;var n=e?"unshift":"push";return this.eventsAnyListeners.indexOf(t)<0&&this.eventsAnyListeners[n](t),this},offAny:function(t){if(!this.eventsAnyListeners)return this;var e=this.eventsAnyListeners.indexOf(t);return e>=0&&this.eventsAnyListeners.splice(e,1),this},off:function(t,e){var n=this;return n.eventsListeners?(t.split(" ").forEach((function(t){void 0===e?n.eventsListeners[t]=[]:n.eventsListeners[t]&&n.eventsListeners[t].forEach((function(i,r){(i===e||i.__emitterProxy&&i.__emitterProxy===e)&&n.eventsListeners[t].splice(r,1)}))})),n):n},emit:function(){var t,e,n,i=this;if(!i.eventsListeners)return i;for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];"string"==typeof o[0]||Array.isArray(o[0])?(t=o[0],e=o.slice(1,o.length),n=i):(t=o[0].events,e=o[0].data,n=o[0].context||i),e.unshift(n);var a=Array.isArray(t)?t:t.split(" ");return a.forEach((function(t){if(i.eventsAnyListeners&&i.eventsAnyListeners.length&&i.eventsAnyListeners.forEach((function(i){i.apply(n,[t].concat(e))})),i.eventsListeners&&i.eventsListeners[t]){var r=[];i.eventsListeners[t].forEach((function(t){r.push(t)})),r.forEach((function(t){t.apply(n,e)}))}})),i}},update:{updateSize:function(){var t,e,n=this.$el;t=void 0!==this.params.width&&null!==this.params.width?this.params.width:n[0].clientWidth,e=void 0!==this.params.height&&null!==this.params.width?this.params.height:n[0].clientHeight,0===t&&this.isHorizontal()||0===e&&this.isVertical()||(t=t-parseInt(n.css("padding-left")||0,10)-parseInt(n.css("padding-right")||0,10),e=e-parseInt(n.css("padding-top")||0,10)-parseInt(n.css("padding-bottom")||0,10),Number.isNaN(t)&&(t=0),Number.isNaN(e)&&(e=0),dt(this,{width:t,height:e,size:this.isHorizontal()?t:e}))},updateSlides:function(){var t=q(),e=this.params,n=this.$wrapperEl,i=this.size,r=this.rtlTranslate,o=this.wrongRTL,s=this.virtual&&e.virtual.enabled,a=s?this.virtual.slides.length:this.slides.length,l=n.children("."+this.params.slideClass),c=s?this.virtual.slides.length:l.length,u=[],h=[],d=[];function p(t,n){return!e.cssMode||n!==l.length-1}var f=e.slidesOffsetBefore;"function"==typeof f&&(f=e.slidesOffsetBefore.call(this));var m=e.slidesOffsetAfter;"function"==typeof m&&(m=e.slidesOffsetAfter.call(this));var g=this.snapGrid.length,v=this.snapGrid.length,y=e.spaceBetween,b=-f,x=0,w=0;if(void 0!==i){var _,S;"string"==typeof y&&y.indexOf("%")>=0&&(y=parseFloat(y.replace("%",""))/100*i),this.virtualSize=-y,r?l.css({marginLeft:"",marginTop:""}):l.css({marginRight:"",marginBottom:""}),e.slidesPerColumn>1&&(_=Math.floor(c/e.slidesPerColumn)===c/this.params.slidesPerColumn?c:Math.ceil(c/e.slidesPerColumn)*e.slidesPerColumn,"auto"!==e.slidesPerView&&"row"===e.slidesPerColumnFill&&(_=Math.max(_,e.slidesPerView*e.slidesPerColumn)));for(var M,E=e.slidesPerColumn,T=_/E,A=Math.floor(c/e.slidesPerColumn),L=0;L<c;L+=1){S=0;var P=l.eq(L);if(e.slidesPerColumn>1){var C=void 0,R=void 0,O=void 0;if("row"===e.slidesPerColumnFill&&e.slidesPerGroup>1){var I=Math.floor(L/(e.slidesPerGroup*e.slidesPerColumn)),N=L-e.slidesPerColumn*e.slidesPerGroup*I,D=0===I?e.slidesPerGroup:Math.min(Math.ceil((c-I*E*e.slidesPerGroup)/E),e.slidesPerGroup);C=(R=N-(O=Math.floor(N/D))*D+I*e.slidesPerGroup)+O*_/E,P.css({"-webkit-box-ordinal-group":C,"-moz-box-ordinal-group":C,"-ms-flex-order":C,"-webkit-order":C,order:C})}else"column"===e.slidesPerColumnFill?(O=L-(R=Math.floor(L/E))*E,(R>A||R===A&&O===E-1)&&(O+=1)>=E&&(O=0,R+=1)):R=L-(O=Math.floor(L/T))*T;P.css("margin-"+(this.isHorizontal()?"top":"left"),0!==O&&e.spaceBetween&&e.spaceBetween+"px")}if("none"!==P.css("display")){if("auto"===e.slidesPerView){var z=t.getComputedStyle(P[0],null),k=P[0].style.transform,B=P[0].style.webkitTransform;if(k&&(P[0].style.transform="none"),B&&(P[0].style.webkitTransform="none"),e.roundLengths)S=this.isHorizontal()?P.outerWidth(!0):P.outerHeight(!0);else if(this.isHorizontal()){var F=parseFloat(z.getPropertyValue("width")||0),U=parseFloat(z.getPropertyValue("padding-left")||0),j=parseFloat(z.getPropertyValue("padding-right")||0),H=parseFloat(z.getPropertyValue("margin-left")||0),G=parseFloat(z.getPropertyValue("margin-right")||0),V=z.getPropertyValue("box-sizing");if(V&&"border-box"===V)S=F+H+G;else{var W=P[0],X=W.clientWidth;S=F+U+j+H+G+(W.offsetWidth-X)}}else{var Y=parseFloat(z.getPropertyValue("height")||0),Z=parseFloat(z.getPropertyValue("padding-top")||0),J=parseFloat(z.getPropertyValue("padding-bottom")||0),K=parseFloat(z.getPropertyValue("margin-top")||0),$=parseFloat(z.getPropertyValue("margin-bottom")||0),Q=z.getPropertyValue("box-sizing");if(Q&&"border-box"===Q)S=Y+K+$;else{var tt=P[0],et=tt.clientHeight;S=Y+Z+J+K+$+(tt.offsetHeight-et)}}k&&(P[0].style.transform=k),B&&(P[0].style.webkitTransform=B),e.roundLengths&&(S=Math.floor(S))}else S=(i-(e.slidesPerView-1)*y)/e.slidesPerView,e.roundLengths&&(S=Math.floor(S)),l[L]&&(this.isHorizontal()?l[L].style.width=S+"px":l[L].style.height=S+"px");l[L]&&(l[L].swiperSlideSize=S),d.push(S),e.centeredSlides?(b=b+S/2+x/2+y,0===x&&0!==L&&(b=b-i/2-y),0===L&&(b=b-i/2-y),Math.abs(b)<.001&&(b=0),e.roundLengths&&(b=Math.floor(b)),w%e.slidesPerGroup==0&&u.push(b),h.push(b)):(e.roundLengths&&(b=Math.floor(b)),(w-Math.min(this.params.slidesPerGroupSkip,w))%this.params.slidesPerGroup==0&&u.push(b),h.push(b),b=b+S+y),this.virtualSize+=S+y,x=S,w+=1}}if(this.virtualSize=Math.max(this.virtualSize,i)+m,r&&o&&("slide"===e.effect||"coverflow"===e.effect)&&n.css({width:this.virtualSize+e.spaceBetween+"px"}),e.setWrapperSize&&(this.isHorizontal()?n.css({width:this.virtualSize+e.spaceBetween+"px"}):n.css({height:this.virtualSize+e.spaceBetween+"px"})),e.slidesPerColumn>1&&(this.virtualSize=(S+e.spaceBetween)*_,this.virtualSize=Math.ceil(this.virtualSize/e.slidesPerColumn)-e.spaceBetween,this.isHorizontal()?n.css({width:this.virtualSize+e.spaceBetween+"px"}):n.css({height:this.virtualSize+e.spaceBetween+"px"}),e.centeredSlides)){M=[];for(var nt=0;nt<u.length;nt+=1){var it=u[nt];e.roundLengths&&(it=Math.floor(it)),u[nt]<this.virtualSize+u[0]&&M.push(it)}u=M}if(!e.centeredSlides){M=[];for(var rt=0;rt<u.length;rt+=1){var ot=u[rt];e.roundLengths&&(ot=Math.floor(ot)),u[rt]<=this.virtualSize-i&&M.push(ot)}u=M,Math.floor(this.virtualSize-i)-Math.floor(u[u.length-1])>1&&u.push(this.virtualSize-i)}if(0===u.length&&(u=[0]),0!==e.spaceBetween&&(this.isHorizontal()?r?l.filter(p).css({marginLeft:y+"px"}):l.filter(p).css({marginRight:y+"px"}):l.filter(p).css({marginBottom:y+"px"})),e.centeredSlides&&e.centeredSlidesBounds){var st=0;d.forEach((function(t){st+=t+(e.spaceBetween?e.spaceBetween:0)}));var at=(st-=e.spaceBetween)-i;u=u.map((function(t){return t<0?-f:t>at?at+m:t}))}if(e.centerInsufficientSlides){var lt=0;if(d.forEach((function(t){lt+=t+(e.spaceBetween?e.spaceBetween:0)})),(lt-=e.spaceBetween)<i){var ct=(i-lt)/2;u.forEach((function(t,e){u[e]=t-ct})),h.forEach((function(t,e){h[e]=t+ct}))}}dt(this,{slides:l,snapGrid:u,slidesGrid:h,slidesSizesGrid:d}),c!==a&&this.emit("slidesLengthChange"),u.length!==g&&(this.params.watchOverflow&&this.checkOverflow(),this.emit("snapGridLengthChange")),h.length!==v&&this.emit("slidesGridLengthChange"),(e.watchSlidesProgress||e.watchSlidesVisibility)&&this.updateSlidesOffset()}},updateAutoHeight:function(t){var e,n=[],i=0;if("number"==typeof t?this.setTransition(t):!0===t&&this.setTransition(this.params.speed),"auto"!==this.params.slidesPerView&&this.params.slidesPerView>1)if(this.params.centeredSlides)this.visibleSlides.each((function(t){n.push(t)}));else for(e=0;e<Math.ceil(this.params.slidesPerView);e+=1){var r=this.activeIndex+e;if(r>this.slides.length)break;n.push(this.slides.eq(r)[0])}else n.push(this.slides.eq(this.activeIndex)[0]);for(e=0;e<n.length;e+=1)if(void 0!==n[e]){var o=n[e].offsetHeight;i=o>i?o:i}i&&this.$wrapperEl.css("height",i+"px")},updateSlidesOffset:function(){for(var t=this.slides,e=0;e<t.length;e+=1)t[e].swiperSlideOffset=this.isHorizontal()?t[e].offsetLeft:t[e].offsetTop},updateSlidesProgress:function(t){void 0===t&&(t=this&&this.translate||0);var e=this.params,n=this.slides,i=this.rtlTranslate;if(0!==n.length){void 0===n[0].swiperSlideOffset&&this.updateSlidesOffset();var r=-t;i&&(r=t),n.removeClass(e.slideVisibleClass),this.visibleSlidesIndexes=[],this.visibleSlides=[];for(var o=0;o<n.length;o+=1){var s=n[o],a=(r+(e.centeredSlides?this.minTranslate():0)-s.swiperSlideOffset)/(s.swiperSlideSize+e.spaceBetween);if(e.watchSlidesVisibility||e.centeredSlides&&e.autoHeight){var l=-(r-s.swiperSlideOffset),c=l+this.slidesSizesGrid[o];(l>=0&&l<this.size-1||c>1&&c<=this.size||l<=0&&c>=this.size)&&(this.visibleSlides.push(s),this.visibleSlidesIndexes.push(o),n.eq(o).addClass(e.slideVisibleClass))}s.progress=i?-a:a}this.visibleSlides=lt(this.visibleSlides)}},updateProgress:function(t){if(void 0===t){var e=this.rtlTranslate?-1:1;t=this&&this.translate&&this.translate*e||0}var n=this.params,i=this.maxTranslate()-this.minTranslate(),r=this.progress,o=this.isBeginning,s=this.isEnd,a=o,l=s;0===i?(r=0,o=!0,s=!0):(o=(r=(t-this.minTranslate())/i)<=0,s=r>=1),dt(this,{progress:r,isBeginning:o,isEnd:s}),(n.watchSlidesProgress||n.watchSlidesVisibility||n.centeredSlides&&n.autoHeight)&&this.updateSlidesProgress(t),o&&!a&&this.emit("reachBeginning toEdge"),s&&!l&&this.emit("reachEnd toEdge"),(a&&!o||l&&!s)&&this.emit("fromEdge"),this.emit("progress",r)},updateSlidesClasses:function(){var t,e=this.slides,n=this.params,i=this.$wrapperEl,r=this.activeIndex,o=this.realIndex,s=this.virtual&&n.virtual.enabled;e.removeClass(n.slideActiveClass+" "+n.slideNextClass+" "+n.slidePrevClass+" "+n.slideDuplicateActiveClass+" "+n.slideDuplicateNextClass+" "+n.slideDuplicatePrevClass),(t=s?this.$wrapperEl.find("."+n.slideClass+'[data-swiper-slide-index="'+r+'"]'):e.eq(r)).addClass(n.slideActiveClass),n.loop&&(t.hasClass(n.slideDuplicateClass)?i.children("."+n.slideClass+":not(."+n.slideDuplicateClass+')[data-swiper-slide-index="'+o+'"]').addClass(n.slideDuplicateActiveClass):i.children("."+n.slideClass+"."+n.slideDuplicateClass+'[data-swiper-slide-index="'+o+'"]').addClass(n.slideDuplicateActiveClass));var a=t.nextAll("."+n.slideClass).eq(0).addClass(n.slideNextClass);n.loop&&0===a.length&&(a=e.eq(0)).addClass(n.slideNextClass);var l=t.prevAll("."+n.slideClass).eq(0).addClass(n.slidePrevClass);n.loop&&0===l.length&&(l=e.eq(-1)).addClass(n.slidePrevClass),n.loop&&(a.hasClass(n.slideDuplicateClass)?i.children("."+n.slideClass+":not(."+n.slideDuplicateClass+')[data-swiper-slide-index="'+a.attr("data-swiper-slide-index")+'"]').addClass(n.slideDuplicateNextClass):i.children("."+n.slideClass+"."+n.slideDuplicateClass+'[data-swiper-slide-index="'+a.attr("data-swiper-slide-index")+'"]').addClass(n.slideDuplicateNextClass),l.hasClass(n.slideDuplicateClass)?i.children("."+n.slideClass+":not(."+n.slideDuplicateClass+')[data-swiper-slide-index="'+l.attr("data-swiper-slide-index")+'"]').addClass(n.slideDuplicatePrevClass):i.children("."+n.slideClass+"."+n.slideDuplicateClass+'[data-swiper-slide-index="'+l.attr("data-swiper-slide-index")+'"]').addClass(n.slideDuplicatePrevClass)),this.emitSlidesClasses()},updateActiveIndex:function(t){var e,n=this.rtlTranslate?this.translate:-this.translate,i=this.slidesGrid,r=this.snapGrid,o=this.params,s=this.activeIndex,a=this.realIndex,l=this.snapIndex,c=t;if(void 0===c){for(var u=0;u<i.length;u+=1)void 0!==i[u+1]?n>=i[u]&&n<i[u+1]-(i[u+1]-i[u])/2?c=u:n>=i[u]&&n<i[u+1]&&(c=u+1):n>=i[u]&&(c=u);o.normalizeSlideIndex&&(c<0||void 0===c)&&(c=0)}if(r.indexOf(n)>=0)e=r.indexOf(n);else{var h=Math.min(o.slidesPerGroupSkip,c);e=h+Math.floor((c-h)/o.slidesPerGroup)}if(e>=r.length&&(e=r.length-1),c!==s){var d=parseInt(this.slides.eq(c).attr("data-swiper-slide-index")||c,10);dt(this,{snapIndex:e,realIndex:d,previousIndex:s,activeIndex:c}),this.emit("activeIndexChange"),this.emit("snapIndexChange"),a!==d&&this.emit("realIndexChange"),(this.initialized||this.params.runCallbacksOnInit)&&this.emit("slideChange")}else e!==l&&(this.snapIndex=e,this.emit("snapIndexChange"))},updateClickedSlide:function(t){var e=this.params,n=lt(t.target).closest("."+e.slideClass)[0],i=!1;if(n)for(var r=0;r<this.slides.length;r+=1)this.slides[r]===n&&(i=!0);if(!n||!i)return this.clickedSlide=void 0,void(this.clickedIndex=void 0);this.clickedSlide=n,this.virtual&&this.params.virtual.enabled?this.clickedIndex=parseInt(lt(n).attr("data-swiper-slide-index"),10):this.clickedIndex=lt(n).index(),e.slideToClickedSlide&&void 0!==this.clickedIndex&&this.clickedIndex!==this.activeIndex&&this.slideToClickedSlide()}},translate:{getTranslate:function(t){void 0===t&&(t=this.isHorizontal()?"x":"y");var e=this.params,n=this.rtlTranslate,i=this.translate,r=this.$wrapperEl;if(e.virtualTranslate)return n?-i:i;if(e.cssMode)return i;var o=function(t,e){void 0===e&&(e="x");var n,i,r,o=q(),s=o.getComputedStyle(t,null);return o.WebKitCSSMatrix?((i=s.transform||s.webkitTransform).split(",").length>6&&(i=i.split(", ").map((function(t){return t.replace(",",".")})).join(", ")),r=new o.WebKitCSSMatrix("none"===i?"":i)):n=(r=s.MozTransform||s.OTransform||s.MsTransform||s.msTransform||s.transform||s.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,")).toString().split(","),"x"===e&&(i=o.WebKitCSSMatrix?r.m41:16===n.length?parseFloat(n[12]):parseFloat(n[4])),"y"===e&&(i=o.WebKitCSSMatrix?r.m42:16===n.length?parseFloat(n[13]):parseFloat(n[5])),i||0}(r[0],t);return n&&(o=-o),o||0},setTranslate:function(t,e){var n=this.rtlTranslate,i=this.params,r=this.$wrapperEl,o=this.wrapperEl,s=this.progress,a=0,l=0;this.isHorizontal()?a=n?-t:t:l=t,i.roundLengths&&(a=Math.floor(a),l=Math.floor(l)),i.cssMode?o[this.isHorizontal()?"scrollLeft":"scrollTop"]=this.isHorizontal()?-a:-l:i.virtualTranslate||r.transform("translate3d("+a+"px, "+l+"px, 0px)"),this.previousTranslate=this.translate,this.translate=this.isHorizontal()?a:l;var c=this.maxTranslate()-this.minTranslate();(0===c?0:(t-this.minTranslate())/c)!==s&&this.updateProgress(t),this.emit("setTranslate",this.translate,e)},minTranslate:function(){return-this.snapGrid[0]},maxTranslate:function(){return-this.snapGrid[this.snapGrid.length-1]},translateTo:function(t,e,n,i,r){void 0===t&&(t=0),void 0===e&&(e=this.params.speed),void 0===n&&(n=!0),void 0===i&&(i=!0);var o=this,s=o.params,a=o.wrapperEl;if(o.animating&&s.preventInteractionOnTransition)return!1;var l,c=o.minTranslate(),u=o.maxTranslate();if(l=i&&t>c?c:i&&t<u?u:t,o.updateProgress(l),s.cssMode){var h,d=o.isHorizontal();if(0===e)a[d?"scrollLeft":"scrollTop"]=-l;else if(a.scrollTo)a.scrollTo(((h={})[d?"left":"top"]=-l,h.behavior="smooth",h));else a[d?"scrollLeft":"scrollTop"]=-l;return!0}return 0===e?(o.setTransition(0),o.setTranslate(l),n&&(o.emit("beforeTransitionStart",e,r),o.emit("transitionEnd"))):(o.setTransition(e),o.setTranslate(l),n&&(o.emit("beforeTransitionStart",e,r),o.emit("transitionStart")),o.animating||(o.animating=!0,o.onTranslateToWrapperTransitionEnd||(o.onTranslateToWrapperTransitionEnd=function(t){o&&!o.destroyed&&t.target===this&&(o.$wrapperEl[0].removeEventListener("transitionend",o.onTranslateToWrapperTransitionEnd),o.$wrapperEl[0].removeEventListener("webkitTransitionEnd",o.onTranslateToWrapperTransitionEnd),o.onTranslateToWrapperTransitionEnd=null,delete o.onTranslateToWrapperTransitionEnd,n&&o.emit("transitionEnd"))}),o.$wrapperEl[0].addEventListener("transitionend",o.onTranslateToWrapperTransitionEnd),o.$wrapperEl[0].addEventListener("webkitTransitionEnd",o.onTranslateToWrapperTransitionEnd))),!0}},transition:{setTransition:function(t,e){this.params.cssMode||this.$wrapperEl.transition(t),this.emit("setTransition",t,e)},transitionStart:function(t,e){void 0===t&&(t=!0);var n=this.activeIndex,i=this.params,r=this.previousIndex;if(!i.cssMode){i.autoHeight&&this.updateAutoHeight();var o=e;if(o||(o=n>r?"next":n<r?"prev":"reset"),this.emit("transitionStart"),t&&n!==r){if("reset"===o)return void this.emit("slideResetTransitionStart");this.emit("slideChangeTransitionStart"),"next"===o?this.emit("slideNextTransitionStart"):this.emit("slidePrevTransitionStart")}}},transitionEnd:function(t,e){void 0===t&&(t=!0);var n=this.activeIndex,i=this.previousIndex,r=this.params;if(this.animating=!1,!r.cssMode){this.setTransition(0);var o=e;if(o||(o=n>i?"next":n<i?"prev":"reset"),this.emit("transitionEnd"),t&&n!==i){if("reset"===o)return void this.emit("slideResetTransitionEnd");this.emit("slideChangeTransitionEnd"),"next"===o?this.emit("slideNextTransitionEnd"):this.emit("slidePrevTransitionEnd")}}}},slide:{slideTo:function(t,e,n,i){void 0===t&&(t=0),void 0===e&&(e=this.params.speed),void 0===n&&(n=!0);var r=this,o=t;o<0&&(o=0);var s=r.params,a=r.snapGrid,l=r.slidesGrid,c=r.previousIndex,u=r.activeIndex,h=r.rtlTranslate,d=r.wrapperEl;if(r.animating&&s.preventInteractionOnTransition)return!1;var p=Math.min(r.params.slidesPerGroupSkip,o),f=p+Math.floor((o-p)/r.params.slidesPerGroup);f>=a.length&&(f=a.length-1),(u||s.initialSlide||0)===(c||0)&&n&&r.emit("beforeSlideChangeStart");var m,g=-a[f];if(r.updateProgress(g),s.normalizeSlideIndex)for(var v=0;v<l.length;v+=1)-Math.floor(100*g)>=Math.floor(100*l[v])&&(o=v);if(r.initialized&&o!==u){if(!r.allowSlideNext&&g<r.translate&&g<r.minTranslate())return!1;if(!r.allowSlidePrev&&g>r.translate&&g>r.maxTranslate()&&(u||0)!==o)return!1}if(m=o>u?"next":o<u?"prev":"reset",h&&-g===r.translate||!h&&g===r.translate)return r.updateActiveIndex(o),s.autoHeight&&r.updateAutoHeight(),r.updateSlidesClasses(),"slide"!==s.effect&&r.setTranslate(g),"reset"!==m&&(r.transitionStart(n,m),r.transitionEnd(n,m)),!1;if(s.cssMode){var y,b=r.isHorizontal(),x=-g;if(h&&(x=d.scrollWidth-d.offsetWidth-x),0===e)d[b?"scrollLeft":"scrollTop"]=x;else if(d.scrollTo)d.scrollTo(((y={})[b?"left":"top"]=x,y.behavior="smooth",y));else d[b?"scrollLeft":"scrollTop"]=x;return!0}return 0===e?(r.setTransition(0),r.setTranslate(g),r.updateActiveIndex(o),r.updateSlidesClasses(),r.emit("beforeTransitionStart",e,i),r.transitionStart(n,m),r.transitionEnd(n,m)):(r.setTransition(e),r.setTranslate(g),r.updateActiveIndex(o),r.updateSlidesClasses(),r.emit("beforeTransitionStart",e,i),r.transitionStart(n,m),r.animating||(r.animating=!0,r.onSlideToWrapperTransitionEnd||(r.onSlideToWrapperTransitionEnd=function(t){r&&!r.destroyed&&t.target===this&&(r.$wrapperEl[0].removeEventListener("transitionend",r.onSlideToWrapperTransitionEnd),r.$wrapperEl[0].removeEventListener("webkitTransitionEnd",r.onSlideToWrapperTransitionEnd),r.onSlideToWrapperTransitionEnd=null,delete r.onSlideToWrapperTransitionEnd,r.transitionEnd(n,m))}),r.$wrapperEl[0].addEventListener("transitionend",r.onSlideToWrapperTransitionEnd),r.$wrapperEl[0].addEventListener("webkitTransitionEnd",r.onSlideToWrapperTransitionEnd))),!0},slideToLoop:function(t,e,n,i){void 0===t&&(t=0),void 0===e&&(e=this.params.speed),void 0===n&&(n=!0);var r=t;return this.params.loop&&(r+=this.loopedSlides),this.slideTo(r,e,n,i)},slideNext:function(t,e,n){void 0===t&&(t=this.params.speed),void 0===e&&(e=!0);var i=this.params,r=this.animating,o=this.activeIndex<i.slidesPerGroupSkip?1:i.slidesPerGroup;if(i.loop){if(r&&i.loopPreventsSlide)return!1;this.loopFix(),this._clientLeft=this.$wrapperEl[0].clientLeft}return this.slideTo(this.activeIndex+o,t,e,n)},slidePrev:function(t,e,n){void 0===t&&(t=this.params.speed),void 0===e&&(e=!0);var i=this.params,r=this.animating,o=this.snapGrid,s=this.slidesGrid,a=this.rtlTranslate;if(i.loop){if(r&&i.loopPreventsSlide)return!1;this.loopFix(),this._clientLeft=this.$wrapperEl[0].clientLeft}function l(t){return t<0?-Math.floor(Math.abs(t)):Math.floor(t)}var c,u=l(a?this.translate:-this.translate),h=o.map((function(t){return l(t)})),d=(o[h.indexOf(u)],o[h.indexOf(u)-1]);return void 0===d&&i.cssMode&&o.forEach((function(t){!d&&u>=t&&(d=t)})),void 0!==d&&(c=s.indexOf(d))<0&&(c=this.activeIndex-1),this.slideTo(c,t,e,n)},slideReset:function(t,e,n){return void 0===t&&(t=this.params.speed),void 0===e&&(e=!0),this.slideTo(this.activeIndex,t,e,n)},slideToClosest:function(t,e,n,i){void 0===t&&(t=this.params.speed),void 0===e&&(e=!0),void 0===i&&(i=.5);var r=this.activeIndex,o=Math.min(this.params.slidesPerGroupSkip,r),s=o+Math.floor((r-o)/this.params.slidesPerGroup),a=this.rtlTranslate?this.translate:-this.translate;if(a>=this.snapGrid[s]){var l=this.snapGrid[s];a-l>(this.snapGrid[s+1]-l)*i&&(r+=this.params.slidesPerGroup)}else{var c=this.snapGrid[s-1];a-c<=(this.snapGrid[s]-c)*i&&(r-=this.params.slidesPerGroup)}return r=Math.max(r,0),r=Math.min(r,this.slidesGrid.length-1),this.slideTo(r,t,e,n)},slideToClickedSlide:function(){var t,e=this,n=e.params,i=e.$wrapperEl,r="auto"===n.slidesPerView?e.slidesPerViewDynamic():n.slidesPerView,o=e.clickedIndex;if(n.loop){if(e.animating)return;t=parseInt(lt(e.clickedSlide).attr("data-swiper-slide-index"),10),n.centeredSlides?o<e.loopedSlides-r/2||o>e.slides.length-e.loopedSlides+r/2?(e.loopFix(),o=i.children("."+n.slideClass+'[data-swiper-slide-index="'+t+'"]:not(.'+n.slideDuplicateClass+")").eq(0).index(),ct((function(){e.slideTo(o)}))):e.slideTo(o):o>e.slides.length-r?(e.loopFix(),o=i.children("."+n.slideClass+'[data-swiper-slide-index="'+t+'"]:not(.'+n.slideDuplicateClass+")").eq(0).index(),ct((function(){e.slideTo(o)}))):e.slideTo(o)}else e.slideTo(o)}},loop:{loopCreate:function(){var t=this,e=V(),n=t.params,i=t.$wrapperEl;i.children("."+n.slideClass+"."+n.slideDuplicateClass).remove();var r=i.children("."+n.slideClass);if(n.loopFillGroupWithBlank){var o=n.slidesPerGroup-r.length%n.slidesPerGroup;if(o!==n.slidesPerGroup){for(var s=0;s<o;s+=1){var a=lt(e.createElement("div")).addClass(n.slideClass+" "+n.slideBlankClass);i.append(a)}r=i.children("."+n.slideClass)}}"auto"!==n.slidesPerView||n.loopedSlides||(n.loopedSlides=r.length),t.loopedSlides=Math.ceil(parseFloat(n.loopedSlides||n.slidesPerView,10)),t.loopedSlides+=n.loopAdditionalSlides,t.loopedSlides>r.length&&(t.loopedSlides=r.length);var l=[],c=[];r.each((function(e,n){var i=lt(e);n<t.loopedSlides&&c.push(e),n<r.length&&n>=r.length-t.loopedSlides&&l.push(e),i.attr("data-swiper-slide-index",n)}));for(var u=0;u<c.length;u+=1)i.append(lt(c[u].cloneNode(!0)).addClass(n.slideDuplicateClass));for(var h=l.length-1;h>=0;h-=1)i.prepend(lt(l[h].cloneNode(!0)).addClass(n.slideDuplicateClass))},loopFix:function(){this.emit("beforeLoopFix");var t,e=this.activeIndex,n=this.slides,i=this.loopedSlides,r=this.allowSlidePrev,o=this.allowSlideNext,s=this.snapGrid,a=this.rtlTranslate;this.allowSlidePrev=!0,this.allowSlideNext=!0;var l=-s[e]-this.getTranslate();if(e<i)t=n.length-3*i+e,t+=i,this.slideTo(t,0,!1,!0)&&0!==l&&this.setTranslate((a?-this.translate:this.translate)-l);else if(e>=n.length-i){t=-n.length+e+i,t+=i,this.slideTo(t,0,!1,!0)&&0!==l&&this.setTranslate((a?-this.translate:this.translate)-l)}this.allowSlidePrev=r,this.allowSlideNext=o,this.emit("loopFix")},loopDestroy:function(){var t=this.$wrapperEl,e=this.params,n=this.slides;t.children("."+e.slideClass+"."+e.slideDuplicateClass+",."+e.slideClass+"."+e.slideBlankClass).remove(),n.removeAttr("data-swiper-slide-index")}},grabCursor:{setGrabCursor:function(t){if(!(this.support.touch||!this.params.simulateTouch||this.params.watchOverflow&&this.isLocked||this.params.cssMode)){var e=this.el;e.style.cursor="move",e.style.cursor=t?"-webkit-grabbing":"-webkit-grab",e.style.cursor=t?"-moz-grabbin":"-moz-grab",e.style.cursor=t?"grabbing":"grab"}},unsetGrabCursor:function(){this.support.touch||this.params.watchOverflow&&this.isLocked||this.params.cssMode||(this.el.style.cursor="")}},manipulation:{appendSlide:function(t){var e=this.$wrapperEl,n=this.params;if(n.loop&&this.loopDestroy(),"object"==typeof t&&"length"in t)for(var i=0;i<t.length;i+=1)t[i]&&e.append(t[i]);else e.append(t);n.loop&&this.loopCreate(),n.observer&&this.support.observer||this.update()},prependSlide:function(t){var e=this.params,n=this.$wrapperEl,i=this.activeIndex;e.loop&&this.loopDestroy();var r=i+1;if("object"==typeof t&&"length"in t){for(var o=0;o<t.length;o+=1)t[o]&&n.prepend(t[o]);r=i+t.length}else n.prepend(t);e.loop&&this.loopCreate(),e.observer&&this.support.observer||this.update(),this.slideTo(r,0,!1)},addSlide:function(t,e){var n=this.$wrapperEl,i=this.params,r=this.activeIndex;i.loop&&(r-=this.loopedSlides,this.loopDestroy(),this.slides=n.children("."+i.slideClass));var o=this.slides.length;if(t<=0)this.prependSlide(e);else if(t>=o)this.appendSlide(e);else{for(var s=r>t?r+1:r,a=[],l=o-1;l>=t;l-=1){var c=this.slides.eq(l);c.remove(),a.unshift(c)}if("object"==typeof e&&"length"in e){for(var u=0;u<e.length;u+=1)e[u]&&n.append(e[u]);s=r>t?r+e.length:r}else n.append(e);for(var h=0;h<a.length;h+=1)n.append(a[h]);i.loop&&this.loopCreate(),i.observer&&this.support.observer||this.update(),i.loop?this.slideTo(s+this.loopedSlides,0,!1):this.slideTo(s,0,!1)}},removeSlide:function(t){var e=this.params,n=this.$wrapperEl,i=this.activeIndex;e.loop&&(i-=this.loopedSlides,this.loopDestroy(),this.slides=n.children("."+e.slideClass));var r,o=i;if("object"==typeof t&&"length"in t){for(var s=0;s<t.length;s+=1)r=t[s],this.slides[r]&&this.slides.eq(r).remove(),r<o&&(o-=1);o=Math.max(o,0)}else r=t,this.slides[r]&&this.slides.eq(r).remove(),r<o&&(o-=1),o=Math.max(o,0);e.loop&&this.loopCreate(),e.observer&&this.support.observer||this.update(),e.loop?this.slideTo(o+this.loopedSlides,0,!1):this.slideTo(o,0,!1)},removeAllSlides:function(){for(var t=[],e=0;e<this.slides.length;e+=1)t.push(e);this.removeSlide(t)}},events:{attachEvents:function(){var t=V(),e=this.params,n=this.touchEvents,i=this.el,r=this.wrapperEl,o=this.device,s=this.support;this.onTouchStart=wt.bind(this),this.onTouchMove=_t.bind(this),this.onTouchEnd=St.bind(this),e.cssMode&&(this.onScroll=Tt.bind(this)),this.onClick=Et.bind(this);var a=!!e.nested;if(!s.touch&&s.pointerEvents)i.addEventListener(n.start,this.onTouchStart,!1),t.addEventListener(n.move,this.onTouchMove,a),t.addEventListener(n.end,this.onTouchEnd,!1);else{if(s.touch){var l=!("touchstart"!==n.start||!s.passiveListener||!e.passiveListeners)&&{passive:!0,capture:!1};i.addEventListener(n.start,this.onTouchStart,l),i.addEventListener(n.move,this.onTouchMove,s.passiveListener?{passive:!1,capture:a}:a),i.addEventListener(n.end,this.onTouchEnd,l),n.cancel&&i.addEventListener(n.cancel,this.onTouchEnd,l),At||(t.addEventListener("touchstart",Lt),At=!0)}(e.simulateTouch&&!o.ios&&!o.android||e.simulateTouch&&!s.touch&&o.ios)&&(i.addEventListener("mousedown",this.onTouchStart,!1),t.addEventListener("mousemove",this.onTouchMove,a),t.addEventListener("mouseup",this.onTouchEnd,!1))}(e.preventClicks||e.preventClicksPropagation)&&i.addEventListener("click",this.onClick,!0),e.cssMode&&r.addEventListener("scroll",this.onScroll),e.updateOnWindowResize?this.on(o.ios||o.android?"resize orientationchange observerUpdate":"resize observerUpdate",Mt,!0):this.on("observerUpdate",Mt,!0)},detachEvents:function(){var t=V(),e=this.params,n=this.touchEvents,i=this.el,r=this.wrapperEl,o=this.device,s=this.support,a=!!e.nested;if(!s.touch&&s.pointerEvents)i.removeEventListener(n.start,this.onTouchStart,!1),t.removeEventListener(n.move,this.onTouchMove,a),t.removeEventListener(n.end,this.onTouchEnd,!1);else{if(s.touch){var l=!("onTouchStart"!==n.start||!s.passiveListener||!e.passiveListeners)&&{passive:!0,capture:!1};i.removeEventListener(n.start,this.onTouchStart,l),i.removeEventListener(n.move,this.onTouchMove,a),i.removeEventListener(n.end,this.onTouchEnd,l),n.cancel&&i.removeEventListener(n.cancel,this.onTouchEnd,l)}(e.simulateTouch&&!o.ios&&!o.android||e.simulateTouch&&!s.touch&&o.ios)&&(i.removeEventListener("mousedown",this.onTouchStart,!1),t.removeEventListener("mousemove",this.onTouchMove,a),t.removeEventListener("mouseup",this.onTouchEnd,!1))}(e.preventClicks||e.preventClicksPropagation)&&i.removeEventListener("click",this.onClick,!0),e.cssMode&&r.removeEventListener("scroll",this.onScroll),this.off(o.ios||o.android?"resize orientationchange observerUpdate":"resize observerUpdate",Mt)}},breakpoints:{setBreakpoint:function(){var t=this.activeIndex,e=this.initialized,n=this.loopedSlides,i=void 0===n?0:n,r=this.params,o=this.$el,s=r.breakpoints;if(s&&(!s||0!==Object.keys(s).length)){var a=this.getBreakpoint(s);if(a&&this.currentBreakpoint!==a){var l=a in s?s[a]:void 0;l&&["slidesPerView","spaceBetween","slidesPerGroup","slidesPerGroupSkip","slidesPerColumn"].forEach((function(t){var e=l[t];void 0!==e&&(l[t]="slidesPerView"!==t||"AUTO"!==e&&"auto"!==e?"slidesPerView"===t?parseFloat(e):parseInt(e,10):"auto")}));var c=l||this.originalParams,u=r.slidesPerColumn>1,h=c.slidesPerColumn>1;u&&!h?(o.removeClass(r.containerModifierClass+"multirow "+r.containerModifierClass+"multirow-column"),this.emitContainerClasses()):!u&&h&&(o.addClass(r.containerModifierClass+"multirow"),"column"===c.slidesPerColumnFill&&o.addClass(r.containerModifierClass+"multirow-column"),this.emitContainerClasses());var d=c.direction&&c.direction!==r.direction,p=r.loop&&(c.slidesPerView!==r.slidesPerView||d);d&&e&&this.changeDirection(),dt(this.params,c),dt(this,{allowTouchMove:this.params.allowTouchMove,allowSlideNext:this.params.allowSlideNext,allowSlidePrev:this.params.allowSlidePrev}),this.currentBreakpoint=a,this.emit("_beforeBreakpoint",c),p&&e&&(this.loopDestroy(),this.loopCreate(),this.updateSlides(),this.slideTo(t-i+this.loopedSlides,0,!1)),this.emit("breakpoint",c)}}},getBreakpoint:function(t){var e=q();if(t){var n=!1,i=Object.keys(t).map((function(t){if("string"==typeof t&&0===t.indexOf("@")){var n=parseFloat(t.substr(1));return{value:e.innerHeight*n,point:t}}return{value:t,point:t}}));i.sort((function(t,e){return parseInt(t.value,10)-parseInt(e.value,10)}));for(var r=0;r<i.length;r+=1){var o=i[r],s=o.point;o.value<=e.innerWidth&&(n=s)}return n||"max"}}},checkOverflow:{checkOverflow:function(){var t=this.params,e=this.isLocked,n=this.slides.length>0&&t.slidesOffsetBefore+t.spaceBetween*(this.slides.length-1)+this.slides[0].offsetWidth*this.slides.length;t.slidesOffsetBefore&&t.slidesOffsetAfter&&n?this.isLocked=n<=this.size:this.isLocked=1===this.snapGrid.length,this.allowSlideNext=!this.isLocked,this.allowSlidePrev=!this.isLocked,e!==this.isLocked&&this.emit(this.isLocked?"lock":"unlock"),e&&e!==this.isLocked&&(this.isEnd=!1,this.navigation&&this.navigation.update())}},classes:{addClasses:function(){var t=this.classNames,e=this.params,n=this.rtl,i=this.$el,r=this.device,o=[];o.push("initialized"),o.push(e.direction),e.freeMode&&o.push("free-mode"),e.autoHeight&&o.push("autoheight"),n&&o.push("rtl"),e.slidesPerColumn>1&&(o.push("multirow"),"column"===e.slidesPerColumnFill&&o.push("multirow-column")),r.android&&o.push("android"),r.ios&&o.push("ios"),e.cssMode&&o.push("css-mode"),o.forEach((function(n){t.push(e.containerModifierClass+n)})),i.addClass(t.join(" ")),this.emitContainerClasses()},removeClasses:function(){var t=this.$el,e=this.classNames;t.removeClass(e.join(" ")),this.emitContainerClasses()}},images:{loadImage:function(t,e,n,i,r,o){var s,a=q();function l(){o&&o()}lt(t).parent("picture")[0]||t.complete&&r?l():e?((s=new a.Image).onload=l,s.onerror=l,i&&(s.sizes=i),n&&(s.srcset=n),e&&(s.src=e)):l()},preloadImages:function(){var t=this;function e(){null!=t&&t&&!t.destroyed&&(void 0!==t.imagesLoaded&&(t.imagesLoaded+=1),t.imagesLoaded===t.imagesToLoad.length&&(t.params.updateOnImagesReady&&t.update(),t.emit("imagesReady")))}t.imagesToLoad=t.$el.find("img");for(var n=0;n<t.imagesToLoad.length;n+=1){var i=t.imagesToLoad[n];t.loadImage(i,i.currentSrc||i.getAttribute("src"),i.srcset||i.getAttribute("srcset"),i.sizes||i.getAttribute("sizes"),!0,e)}}}},Ot={},It=function(){function t(){for(var e,n,i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];1===r.length&&r[0].constructor&&r[0].constructor===Object?n=r[0]:(e=r[0],n=r[1]),n||(n={}),n=dt({},n),e&&!n.el&&(n.el=e);var s=this;s.support=ft(),s.device=mt({userAgent:n.userAgent}),s.browser=gt(),s.eventsListeners={},s.eventsAnyListeners=[],void 0===s.modules&&(s.modules={}),Object.keys(s.modules).forEach((function(t){var e=s.modules[t];if(e.params){var i=Object.keys(e.params)[0],r=e.params[i];if("object"!=typeof r||null===r)return;if(!(i in n)||!("enabled"in r))return;!0===n[i]&&(n[i]={enabled:!0}),"object"!=typeof n[i]||"enabled"in n[i]||(n[i].enabled=!0),n[i]||(n[i]={enabled:!1})}}));var a=dt({},Pt);s.useParams(a),s.params=dt({},a,Ot,n),s.originalParams=dt({},s.params),s.passedParams=dt({},n),s.params&&s.params.on&&Object.keys(s.params.on).forEach((function(t){s.on(t,s.params.on[t])})),s.params&&s.params.onAny&&s.onAny(s.params.onAny),s.$=lt;var l=lt(s.params.el);if(e=l[0]){if(l.length>1){var c=[];return l.each((function(e){var i=dt({},n,{el:e});c.push(new t(i))})),c}var u,h,d;return e.swiper=s,e&&e.shadowRoot&&e.shadowRoot.querySelector?(u=lt(e.shadowRoot.querySelector("."+s.params.wrapperClass))).children=function(t){return l.children(t)}:u=l.children("."+s.params.wrapperClass),dt(s,{$el:l,el:e,$wrapperEl:u,wrapperEl:u[0],classNames:[],slides:lt(),slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal:function(){return"horizontal"===s.params.direction},isVertical:function(){return"vertical"===s.params.direction},rtl:"rtl"===e.dir.toLowerCase()||"rtl"===l.css("direction"),rtlTranslate:"horizontal"===s.params.direction&&("rtl"===e.dir.toLowerCase()||"rtl"===l.css("direction")),wrongRTL:"-webkit-box"===u.css("display"),activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,allowSlideNext:s.params.allowSlideNext,allowSlidePrev:s.params.allowSlidePrev,touchEvents:(h=["touchstart","touchmove","touchend","touchcancel"],d=["mousedown","mousemove","mouseup"],s.support.pointerEvents&&(d=["pointerdown","pointermove","pointerup"]),s.touchEventsTouch={start:h[0],move:h[1],end:h[2],cancel:h[3]},s.touchEventsDesktop={start:d[0],move:d[1],end:d[2]},s.support.touch||!s.params.simulateTouch?s.touchEventsTouch:s.touchEventsDesktop),touchEventsData:{isTouched:void 0,isMoved:void 0,allowTouchCallbacks:void 0,touchStartTime:void 0,isScrolling:void 0,currentTranslate:void 0,startTranslate:void 0,allowThresholdMove:void 0,formElements:"input, select, option, textarea, button, video, label",lastClickTime:ut(),clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,isTouchEvent:void 0,startMoving:void 0},allowClick:!0,allowTouchMove:s.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),s.useModules(),s.emit("_swiper"),s.params.init&&s.init(),s}}var e,n,i,r=t.prototype;return r.emitContainerClasses=function(){var t=this;if(t.params._emitClasses&&t.el){var e=t.el.className.split(" ").filter((function(e){return 0===e.indexOf("swiper-container")||0===e.indexOf(t.params.containerModifierClass)}));t.emit("_containerClasses",e.join(" "))}},r.getSlideClasses=function(t){var e=this;return t.className.split(" ").filter((function(t){return 0===t.indexOf("swiper-slide")||0===t.indexOf(e.params.slideClass)})).join(" ")},r.emitSlidesClasses=function(){var t=this;t.params._emitClasses&&t.el&&t.slides.each((function(e){var n=t.getSlideClasses(e);t.emit("_slideClass",e,n)}))},r.slidesPerViewDynamic=function(){var t=this.params,e=this.slides,n=this.slidesGrid,i=this.size,r=this.activeIndex,o=1;if(t.centeredSlides){for(var s,a=e[r].swiperSlideSize,l=r+1;l<e.length;l+=1)e[l]&&!s&&(o+=1,(a+=e[l].swiperSlideSize)>i&&(s=!0));for(var c=r-1;c>=0;c-=1)e[c]&&!s&&(o+=1,(a+=e[c].swiperSlideSize)>i&&(s=!0))}else for(var u=r+1;u<e.length;u+=1)n[u]-n[r]<i&&(o+=1);return o},r.update=function(){var t=this;if(t&&!t.destroyed){var e=t.snapGrid,n=t.params;n.breakpoints&&t.setBreakpoint(),t.updateSize(),t.updateSlides(),t.updateProgress(),t.updateSlidesClasses(),t.params.freeMode?(i(),t.params.autoHeight&&t.updateAutoHeight()):(("auto"===t.params.slidesPerView||t.params.slidesPerView>1)&&t.isEnd&&!t.params.centeredSlides?t.slideTo(t.slides.length-1,0,!1,!0):t.slideTo(t.activeIndex,0,!1,!0))||i(),n.watchOverflow&&e!==t.snapGrid&&t.checkOverflow(),t.emit("update")}function i(){var e=t.rtlTranslate?-1*t.translate:t.translate,n=Math.min(Math.max(e,t.maxTranslate()),t.minTranslate());t.setTranslate(n),t.updateActiveIndex(),t.updateSlidesClasses()}},r.changeDirection=function(t,e){void 0===e&&(e=!0);var n=this.params.direction;return t||(t="horizontal"===n?"vertical":"horizontal"),t===n||"horizontal"!==t&&"vertical"!==t||(this.$el.removeClass(""+this.params.containerModifierClass+n).addClass(""+this.params.containerModifierClass+t),this.emitContainerClasses(),this.params.direction=t,this.slides.each((function(e){"vertical"===t?e.style.width="":e.style.height=""})),this.emit("changeDirection"),e&&this.update()),this},r.init=function(){this.initialized||(this.emit("beforeInit"),this.params.breakpoints&&this.setBreakpoint(),this.addClasses(),this.params.loop&&this.loopCreate(),this.updateSize(),this.updateSlides(),this.params.watchOverflow&&this.checkOverflow(),this.params.grabCursor&&this.setGrabCursor(),this.params.preloadImages&&this.preloadImages(),this.params.loop?this.slideTo(this.params.initialSlide+this.loopedSlides,0,this.params.runCallbacksOnInit):this.slideTo(this.params.initialSlide,0,this.params.runCallbacksOnInit),this.attachEvents(),this.initialized=!0,this.emit("init"),this.emit("afterInit"))},r.destroy=function(t,e){void 0===t&&(t=!0),void 0===e&&(e=!0);var n,i=this,r=i.params,o=i.$el,s=i.$wrapperEl,a=i.slides;return void 0===i.params||i.destroyed||(i.emit("beforeDestroy"),i.initialized=!1,i.detachEvents(),r.loop&&i.loopDestroy(),e&&(i.removeClasses(),o.removeAttr("style"),s.removeAttr("style"),a&&a.length&&a.removeClass([r.slideVisibleClass,r.slideActiveClass,r.slideNextClass,r.slidePrevClass].join(" ")).removeAttr("style").removeAttr("data-swiper-slide-index")),i.emit("destroy"),Object.keys(i.eventsListeners).forEach((function(t){i.off(t)})),!1!==t&&(i.$el[0].swiper=null,n=i,Object.keys(n).forEach((function(t){try{n[t]=null}catch(t){}try{delete n[t]}catch(t){}}))),i.destroyed=!0),null},t.extendDefaults=function(t){dt(Ot,t)},t.installModule=function(e){t.prototype.modules||(t.prototype.modules={});var n=e.name||Object.keys(t.prototype.modules).length+"_"+ut();t.prototype.modules[n]=e},t.use=function(e){return Array.isArray(e)?(e.forEach((function(e){return t.installModule(e)})),t):(t.installModule(e),t)},e=t,i=[{key:"extendedDefaults",get:function(){return Ot}},{key:"defaults",get:function(){return Pt}}],(n=null)&&Ct(e.prototype,n),i&&Ct(e,i),t}();Object.keys(Rt).forEach((function(t){Object.keys(Rt[t]).forEach((function(e){It.prototype[e]=Rt[t][e]}))})),It.use([vt,xt]);var Nt=It;function Dt(){return(Dt=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(this,arguments)}var zt={update:function(){var t=this.params.navigation;if(!this.params.loop){var e=this.navigation,n=e.$nextEl,i=e.$prevEl;i&&i.length>0&&(this.isBeginning?i.addClass(t.disabledClass):i.removeClass(t.disabledClass),i[this.params.watchOverflow&&this.isLocked?"addClass":"removeClass"](t.lockClass)),n&&n.length>0&&(this.isEnd?n.addClass(t.disabledClass):n.removeClass(t.disabledClass),n[this.params.watchOverflow&&this.isLocked?"addClass":"removeClass"](t.lockClass))}},onPrevClick:function(t){t.preventDefault(),this.isBeginning&&!this.params.loop||this.slidePrev()},onNextClick:function(t){t.preventDefault(),this.isEnd&&!this.params.loop||this.slideNext()},init:function(){var t,e,n=this.params.navigation;(n.nextEl||n.prevEl)&&(n.nextEl&&(t=lt(n.nextEl),this.params.uniqueNavElements&&"string"==typeof n.nextEl&&t.length>1&&1===this.$el.find(n.nextEl).length&&(t=this.$el.find(n.nextEl))),n.prevEl&&(e=lt(n.prevEl),this.params.uniqueNavElements&&"string"==typeof n.prevEl&&e.length>1&&1===this.$el.find(n.prevEl).length&&(e=this.$el.find(n.prevEl))),t&&t.length>0&&t.on("click",this.navigation.onNextClick),e&&e.length>0&&e.on("click",this.navigation.onPrevClick),dt(this.navigation,{$nextEl:t,nextEl:t&&t[0],$prevEl:e,prevEl:e&&e[0]}))},destroy:function(){var t=this.navigation,e=t.$nextEl,n=t.$prevEl;e&&e.length&&(e.off("click",this.navigation.onNextClick),e.removeClass(this.params.navigation.disabledClass)),n&&n.length&&(n.off("click",this.navigation.onPrevClick),n.removeClass(this.params.navigation.disabledClass))}},kt={name:"navigation",params:{navigation:{nextEl:null,prevEl:null,hideOnClick:!1,disabledClass:"swiper-button-disabled",hiddenClass:"swiper-button-hidden",lockClass:"swiper-button-lock"}},create:function(){pt(this,{navigation:Dt({},zt)})},on:{init:function(t){t.navigation.init(),t.navigation.update()},toEdge:function(t){t.navigation.update()},fromEdge:function(t){t.navigation.update()},destroy:function(t){t.navigation.destroy()},click:function(t,e){var n,i=t.navigation,r=i.$nextEl,o=i.$prevEl;!t.params.navigation.hideOnClick||lt(e.target).is(o)||lt(e.target).is(r)||(r?n=r.hasClass(t.params.navigation.hiddenClass):o&&(n=o.hasClass(t.params.navigation.hiddenClass)),!0===n?t.emit("navigationShow"):t.emit("navigationHide"),r&&r.toggleClass(t.params.navigation.hiddenClass),o&&o.toggleClass(t.params.navigation.hiddenClass))}}};function Bt(){return(Bt=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(this,arguments)}var Ft={run:function(){var t=this,e=t.slides.eq(t.activeIndex),n=t.params.autoplay.delay;e.attr("data-swiper-autoplay")&&(n=e.attr("data-swiper-autoplay")||t.params.autoplay.delay),clearTimeout(t.autoplay.timeout),t.autoplay.timeout=ct((function(){var e;t.params.autoplay.reverseDirection?t.params.loop?(t.loopFix(),e=t.slidePrev(t.params.speed,!0,!0),t.emit("autoplay")):t.isBeginning?t.params.autoplay.stopOnLastSlide?t.autoplay.stop():(e=t.slideTo(t.slides.length-1,t.params.speed,!0,!0),t.emit("autoplay")):(e=t.slidePrev(t.params.speed,!0,!0),t.emit("autoplay")):t.params.loop?(t.loopFix(),e=t.slideNext(t.params.speed,!0,!0),t.emit("autoplay")):t.isEnd?t.params.autoplay.stopOnLastSlide?t.autoplay.stop():(e=t.slideTo(0,t.params.speed,!0,!0),t.emit("autoplay")):(e=t.slideNext(t.params.speed,!0,!0),t.emit("autoplay")),(t.params.cssMode&&t.autoplay.running||!1===e)&&t.autoplay.run()}),n)},start:function(){return void 0===this.autoplay.timeout&&(!this.autoplay.running&&(this.autoplay.running=!0,this.emit("autoplayStart"),this.autoplay.run(),!0))},stop:function(){return!!this.autoplay.running&&(void 0!==this.autoplay.timeout&&(this.autoplay.timeout&&(clearTimeout(this.autoplay.timeout),this.autoplay.timeout=void 0),this.autoplay.running=!1,this.emit("autoplayStop"),!0))},pause:function(t){this.autoplay.running&&(this.autoplay.paused||(this.autoplay.timeout&&clearTimeout(this.autoplay.timeout),this.autoplay.paused=!0,0!==t&&this.params.autoplay.waitForTransition?(this.$wrapperEl[0].addEventListener("transitionend",this.autoplay.onTransitionEnd),this.$wrapperEl[0].addEventListener("webkitTransitionEnd",this.autoplay.onTransitionEnd)):(this.autoplay.paused=!1,this.autoplay.run())))},onVisibilityChange:function(){var t=V();"hidden"===t.visibilityState&&this.autoplay.running&&this.autoplay.pause(),"visible"===t.visibilityState&&this.autoplay.paused&&(this.autoplay.run(),this.autoplay.paused=!1)},onTransitionEnd:function(t){this&&!this.destroyed&&this.$wrapperEl&&t.target===this.$wrapperEl[0]&&(this.$wrapperEl[0].removeEventListener("transitionend",this.autoplay.onTransitionEnd),this.$wrapperEl[0].removeEventListener("webkitTransitionEnd",this.autoplay.onTransitionEnd),this.autoplay.paused=!1,this.autoplay.running?this.autoplay.run():this.autoplay.stop())}},Ut={name:"autoplay",params:{autoplay:{enabled:!1,delay:3e3,waitForTransition:!0,disableOnInteraction:!0,stopOnLastSlide:!1,reverseDirection:!1}},create:function(){pt(this,{autoplay:Bt(Bt({},Ft),{},{running:!1,paused:!1})})},on:{init:function(t){t.params.autoplay.enabled&&(t.autoplay.start(),V().addEventListener("visibilitychange",t.autoplay.onVisibilityChange))},beforeTransitionStart:function(t,e,n){t.autoplay.running&&(n||!t.params.autoplay.disableOnInteraction?t.autoplay.pause(e):t.autoplay.stop())},sliderFirstMove:function(t){t.autoplay.running&&(t.params.autoplay.disableOnInteraction?t.autoplay.stop():t.autoplay.pause())},touchEnd:function(t){t.params.cssMode&&t.autoplay.paused&&!t.params.autoplay.disableOnInteraction&&t.autoplay.run()},destroy:function(t){t.autoplay.running&&t.autoplay.stop(),V().removeEventListener("visibilitychange",t.autoplay.onVisibilityChange)}}},jt=n("Womt");function Ht(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)}}var Gt=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.fallSpeed=0,this.flow=0,this.rot=0,this.angle=0,this.ratio=1,this.geometry=e,this.material=n,this.mesh=null}var e,n,i;return e=t,(n=[{key:"init",value:function(t){this.mesh=new jt.e(this.geometry,this.material),this.fallSpeed=.7*Math.random()+1.1,this.flow=.9*Math.random()+.6,this.rot=.05*Math.random()+.05,this.initTransform(t)}},{key:"initTransform",value:function(t){this.mesh.position.x=Math.random()*t.w-t.w/2,this.mesh.position.y=Math.random()*t.h-t.h/2,this.mesh.rotation.x=2*Math.random()*Math.PI,this.mesh.rotation.y=2*Math.random()*Math.PI,t.w>768?(this.mesh.scale.x=1,this.mesh.scale.y=1,this.ratio=1):(this.mesh.scale.x=.5,this.mesh.scale.y=.5,this.ratio=.5)}},{key:"update",value:function(t){this.mesh.position.x-=this.flow*(Math.sin(this.angle)+1.2)*this.ratio,this.mesh.position.y-=this.fallSpeed*this.ratio,this.mesh.rotation.x+=this.rot,this.mesh.rotation.y+=.8*this.rot,this.mesh.position.x<-t.w/2-50?this.mesh.position.x=t.w/2+50:this.mesh.position.x>t.w/2+50&&(this.mesh.position.x=-t.w/2-50),this.mesh.position.y<-t.h/2-50&&(this.mesh.position.y=t.h/2+50),this.angle+=.01}},{key:"delete",value:function(){this.geometry&&this.geometry.dispose(),this.material&&this.material.dispose()}}])&&Ht(e.prototype,n),i&&Ht(e,i),t}(),Vt=[],Wt={w:0,h:0},qt=Math.PI/180*22.5,Xt=null,Yt=null,Zt=null,Jt=null,Kt=new jt.h(26,26,30,30),$t=[],Qt=function(t){oe(t),(Xt=new jt.m({canvas:t})).setPixelRatio(window.devicePixelRatio),Xt.setSize(Wt.w,Wt.h),Xt.setClearColor(16777215,1),Yt=new jt.i;var e=Wt.h/2/Math.tan(qt);if((Zt=new jt.g(45,Wt.w/Wt.h,.1,2e3)).position.z=e,0===$t.length)for(var n=new jt.k,i=1;i<=4;i++){var r=n.load(t.getAttribute("data-image-url-0".concat(i))),o=new jt.f({map:r,side:jt.b,transparent:!0,alphaTest:.9});$t.push(o)}},te=function(){re(),se()},ee=function(){cancelAnimationFrame(Jt)},ne=function(t){Wt.w=t.width,Wt.h=t.height;var e=Wt.h/2/Math.tan(qt);Zt.position.z=e,Zt.aspect=Wt.w/Wt.h,Zt.updateProjectionMatrix(),Xt.setSize(Wt.w,Wt.h);for(var n=0;n<Vt.length;n++)Vt[n].initTransform(Wt)},ie=function(){for(var t=0;t<Vt.length;t++)Yt.remove(Vt[t].mesh),Vt[t].delete();Xt=null,Yt=null,Zt=null,Vt=[],$t=[]},re=function(){Vt.length=0;for(var t=0;t<30;t++){var e=new Gt(Kt,$t[t%4]);e.init(Wt),Vt.push(e),Yt.add(Vt[t].mesh)}},oe=function(t){Wt.w=t.clientWidth,Wt.h=t.clientHeight},se=function t(){Jt=requestAnimationFrame(t.bind(void 0));for(var e=0;e<Vt.length;e++)Vt[e].update(Wt);Xt.render(Yt,Zt)};function ae(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)}}var le={CREATED:1,MOUNTED:2,IDLE:3,MOVING:4,SCROLLING:5,DRAGGING:6,DESTROYED:7};function ce(t){t.length=0}function ue(t,e,n){return Array.prototype.slice.call(t,e,n)}function he(t){return t.bind.apply(t,[null].concat(ue(arguments,1)))}var de=setTimeout,pe=function(){};function fe(t){return requestAnimationFrame(t)}function me(t,e){return typeof e===t}function ge(t){return!we(t)&&me("object",t)}var ve=Array.isArray,ye=he(me,"function"),be=he(me,"string"),xe=he(me,"undefined");function we(t){return null===t}function _e(t){try{return t instanceof(t.ownerDocument.defaultView||window).HTMLElement}catch(t){return!1}}function Se(t){return ve(t)?t:[t]}function Me(t,e){Se(t).forEach(e)}function Ee(t,e){return t.indexOf(e)>-1}function Te(t,e){return t.push.apply(t,Se(e)),t}function Ae(t,e,n){t&&Me(e,(function(e){e&&t.classList[n?"add":"remove"](e)}))}function Le(t,e){Ae(t,be(e)?e.split(" "):e,!0)}function Pe(t,e){Me(e,t.appendChild.bind(t))}function Ce(t,e){Me(t,(function(t){var n=(e||t).parentNode;n&&n.insertBefore(t,e)}))}function Re(t,e){return _e(t)&&(t.msMatchesSelector||t.matches).call(t,e)}function Oe(t,e){var n=t?ue(t.children):[];return e?n.filter((function(t){return Re(t,e)})):n}function Ie(t,e){return e?Oe(t,e)[0]:t.firstElementChild}var Ne=Object.keys;function De(t,e,n){return t&&(n?Ne(t).reverse():Ne(t)).forEach((function(n){"__proto__"!==n&&e(t[n],n)})),t}function ze(t){return ue(arguments,1).forEach((function(e){De(e,(function(n,i){t[i]=e[i]}))})),t}function ke(t){return ue(arguments,1).forEach((function(e){De(e,(function(e,n){ve(e)?t[n]=e.slice():ge(e)?t[n]=ke({},ge(t[n])?t[n]:{},e):t[n]=e}))})),t}function Be(t,e){Me(e||Ne(t),(function(e){delete t[e]}))}function Fe(t,e){Me(t,(function(t){Me(e,(function(e){t&&t.removeAttribute(e)}))}))}function Ue(t,e,n){ge(e)?De(e,(function(e,n){Ue(t,n,e)})):Me(t,(function(t){we(n)||""===n?Fe(t,e):t.setAttribute(e,String(n))}))}function je(t,e,n){var i=document.createElement(t);return e&&(be(e)?Le(i,e):Ue(i,e)),n&&Pe(n,i),i}function He(t,e,n){if(xe(n))return getComputedStyle(t)[e];we(n)||(t.style[e]=""+n)}function Ge(t,e){He(t,"display",e)}function Ve(t){t.setActive&&t.setActive()||t.focus({preventScroll:!0})}function We(t,e){return t.getAttribute(e)}function qe(t,e){return t&&t.classList.contains(e)}function Xe(t){return t.getBoundingClientRect()}function Ye(t){Me(t,(function(t){t&&t.parentNode&&t.parentNode.removeChild(t)}))}function Ze(t){return Ie((new DOMParser).parseFromString(t,"text/html").body)}function Je(t,e){t.preventDefault(),e&&(t.stopPropagation(),t.stopImmediatePropagation())}function Ke(t,e){return t&&t.querySelector(e)}function $e(t,e){return e?ue(t.querySelectorAll(e)):[]}function Qe(t,e){Ae(t,e,!1)}function tn(t){return t.timeStamp}function en(t){return be(t)?t:t?t+"px":""}function nn(t,e){if(!t)throw new Error("[splide] "+(e||""))}var rn=Math.min,on=Math.max,sn=Math.floor,an=Math.ceil,ln=Math.abs;function cn(t,e,n){return ln(t-e)<n}function un(t,e,n,i){var r=rn(e,n),o=on(e,n);return i?r<t&&t<o:r<=t&&t<=o}function hn(t,e,n){var i=rn(e,n),r=on(e,n);return rn(on(i,t),r)}function dn(t){return+(t>0)-+(t<0)}function pn(t,e){return Me(e,(function(e){t=t.replace("%s",""+e)})),t}function fn(t){return t<10?"0"+t:""+t}var mn={};function gn(t){return""+t+fn(mn[t]=(mn[t]||0)+1)}function vn(){var t=[];function e(t,e,n){Me(t,(function(t){t&&Me(e,(function(e){e.split(" ").forEach((function(e){var i=e.split(".");n(t,i[0],i[1])}))}))}))}return{bind:function(n,i,r,o){e(n,i,(function(e,n,i){var s="addEventListener"in e,a=s?e.removeEventListener.bind(e,n,r,o):e.removeListener.bind(e,r);s?e.addEventListener(n,r,o):e.addListener(r),t.push([e,n,i,r,a])}))},unbind:function(n,i,r){e(n,i,(function(e,n,i){t=t.filter((function(t){return!!(t[0]!==e||t[1]!==n||t[2]!==i||r&&t[3]!==r)||(t[4](),!1)}))}))},dispatch:function(t,e,n){var i;return"function"==typeof CustomEvent?i=new CustomEvent(e,{bubbles:!0,detail:n}):(i=document.createEvent("CustomEvent")).initCustomEvent(e,!0,!1,n),t.dispatchEvent(i),i},destroy:function(){t.forEach((function(t){t[4]()})),ce(t)}}}function yn(t){var e=t?t.event.bus:document.createDocumentFragment(),n=vn();return t&&t.event.on("destroy",n.destroy),ze(n,{bus:e,on:function(t,i){n.bind(e,Se(t).join(" "),(function(t){i.apply(i,ve(t.detail)?t.detail:[])}))},off:he(n.unbind,e),emit:function(t){n.dispatch(e,t,ue(arguments,1))}})}function bn(t,e,n,i){var r,o,s=Date.now,a=0,l=!0,c=0;function u(){if(!l){if(a=t?rn((s()-r)/t,1):1,n&&n(a),a>=1&&(e(),r=s(),i&&++c>=i))return h();o=fe(u)}}function h(){l=!0}function d(){o&&cancelAnimationFrame(o),a=0,o=0,l=!0}return{start:function(e){e||d(),r=s()-(e?a*t:0),l=!1,o=fe(u)},rewind:function(){r=s(),a=0,n&&n(a)},pause:h,cancel:d,set:function(e){t=e},isPaused:function(){return l}}}var xn={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:["ArrowUp","ArrowRight"],ArrowRight:["ArrowDown","ArrowLeft"]};function wn(t,e,n){return{resolve:function(t,e,i){var r="rtl"!==(i=i||n.direction)||e?"ttb"===i?0:-1:1;return xn[t]&&xn[t][r]||t.replace(/width|left|right/i,(function(t,e){var n=xn[t.toLowerCase()][r]||t;return e>0?n.charAt(0).toUpperCase()+n.slice(1):n}))},orient:function(t){return t*("rtl"===n.direction?1:-1)}}}var _n="role",Sn=[_n,"tabindex","disabled","aria-controls","aria-current","aria-label","aria-labelledby","aria-hidden","aria-orientation","aria-roledescription"],Mn="splide",En="is-active",Tn=[En,"is-visible","is-prev","is-next","is-loading","is-focus-in","is-overflow"],An={slide:"splide__slide",clone:"splide__slide--clone",arrows:"splide__arrows",arrow:"splide__arrow",prev:"splide__arrow--prev",next:"splide__arrow--next",pagination:"splide__pagination",page:"splide__pagination__page",spinner:"splide__spinner"};var Ln="touchend touchcancel mouseup click";var Pn="loop";function Cn(t,e,n,i){var r,o=yn(t),s=o.on,a=o.emit,l=o.bind,c=t.Components,u=t.root,h=t.options,d=h.isNavigation,p=h.updateOnMove,f=h.i18n,m=h.pagination,g=h.slideFocus,v=c.Direction.resolve,y=We(i,"style"),b=We(i,"aria-label"),x=n>-1,w=Ie(i,".splide__slide__container");function _(){var r=t.splides.map((function(t){var n=t.splide.Components.Slides.getAt(e);return n?n.slide.id:""})).join(" ");Ue(i,"aria-label",pn(f.slideX,(x?n:e)+1)),Ue(i,"aria-controls",r),Ue(i,_n,g?"button":""),g&&Fe(i,"aria-roledescription")}function S(){r||M()}function M(){if(!r){var n=t.index;(o=E())!==qe(i,En)&&(Ae(i,En,o),Ue(i,"aria-current",d&&o||""),a(o?"active":"inactive",T)),function(){var e=function(){if(t.is("fade"))return E();var e=Xe(c.Elements.track),n=Xe(i),r=v("left",!0),o=v("right",!0);return sn(e[r])<=an(n[r])&&sn(n[o])<=an(e[o])}(),n=!e&&(!E()||x);t.state.is([4,5])||Ue(i,"aria-hidden",n||"");Ue($e(i,h.focusableNodes||""),"tabindex",n?-1:""),g&&Ue(i,"tabindex",n?-1:0);e!==qe(i,"is-visible")&&(Ae(i,"is-visible",e),a(e?"visible":"hidden",T));if(!e&&document.activeElement===i){var r=c.Slides.getAt(t.index);r&&Ve(r.slide)}}(),Ae(i,"is-prev",e===n-1),Ae(i,"is-next",e===n+1)}var o}function E(){var i=t.index;return i===e||h.cloneStatus&&i===n}var T={index:e,slideIndex:n,slide:i,container:w,isClone:x,mount:function(){x||(i.id=u.id+"-slide"+fn(e+1),Ue(i,_n,m?"tabpanel":"group"),Ue(i,"aria-roledescription",f.slide),Ue(i,"aria-label",b||pn(f.slideLabel,[e+1,t.length]))),l(i,"click",he(a,"click",T)),l(i,"keydown",he(a,"sk",T)),s(["moved","sh","scrolled"],M),s("navigation:mounted",_),p&&s("move",S)},destroy:function(){r=!0,o.destroy(),Qe(i,Tn),Fe(i,Sn),Ue(i,"style",y),Ue(i,"aria-label",b||"")},update:M,style:function(t,e,n){He(n&&w||i,t,e)},isWithin:function(n,i){var r=ln(n-e);return x||!h.rewind&&!t.is(Pn)||(r=rn(r,t.length-r)),r<=i}};return T}var Rn="m15.5 0.932-4.3 4.38 14.5 14.6-14.5 14.5 4.3 4.4 14.6-14.6 4.4-4.3-4.4-4.4-14.6-14.6z";var On={passive:!1,capture:!0};var In={Spacebar:" ",Right:"ArrowRight",Left:"ArrowLeft",Up:"ArrowUp",Down:"ArrowDown"};function Nn(t){return t=be(t)?t:t.key,In[t]||t}var Dn=[" ","Enter"];var zn=Object.freeze({__proto__:null,Media:function(t,e,n){var i=t.state,r=n.breakpoints||{},o=n.reducedMotion||{},s=vn(),a=[];function l(t){t&&s.destroy()}function c(t,e){var n=matchMedia(e);s.bind(n,"change",u),a.push([t,n])}function u(){var e=i.is(7),r=n.direction,o=a.reduce((function(t,e){return ke(t,e[1].matches?e[0]:{})}),{});Be(n),h(o),n.destroy?t.destroy("completely"===n.destroy):e?(l(!0),t.mount()):r!==n.direction&&t.refresh()}function h(e,r,o){ke(n,e),r&&ke(Object.getPrototypeOf(n),e),!o&&i.is(1)||t.emit("updated",n)}return{setup:function(){var t="min"===n.mediaQuery;Ne(r).sort((function(e,n){return t?+e-+n:+n-+e})).forEach((function(e){c(r[e],"("+(t?"min":"max")+"-width:"+e+"px)")})),c(o,"(prefers-reduced-motion: reduce)"),u()},destroy:l,reduce:function(t){matchMedia("(prefers-reduced-motion: reduce)").matches&&(t?ke(n,o):Be(n,Ne(o)))},set:h}},Direction:wn,Elements:function(t,e,n){var i,r,o,s=yn(t),a=s.on,l=s.bind,c=t.root,u=n.i18n,h={},d=[],p=[],f=[];function m(){i=y(".splide__track"),r=Ie(i,".splide__list"),nn(i&&r,"A track/list element is missing."),Te(d,Oe(r,".splide__slide:not(.splide__slide--clone)")),De({arrows:"splide__arrows",pagination:"splide__pagination",prev:"splide__arrow--prev",next:"splide__arrow--next",bar:"splide__progress__bar",toggle:"splide__toggle"},(function(t,e){h[e]=y("."+t)})),ze(h,{root:c,track:i,list:r,slides:d}),function(){var t=c.id||gn("splide"),e=n.role;c.id=t,i.id=i.id||t+"-track",r.id=r.id||t+"-list",!We(c,_n)&&"SECTION"!==c.tagName&&e&&Ue(c,_n,e);Ue(c,"aria-roledescription",u.carousel),Ue(r,_n,"presentation")}(),v()}function g(t){var e=Sn.concat("style");ce(d),Qe(c,p),Qe(i,f),Fe([i,r],e),Fe(c,t?e:["style","aria-roledescription"])}function v(){Qe(c,p),Qe(i,f),p=b(Mn),f=b("splide__track"),Le(c,p),Le(i,f),Ue(c,"aria-label",n.label),Ue(c,"aria-labelledby",n.labelledby)}function y(t){var e=Ke(c,t);return e&&function(t,e){if(ye(t.closest))return t.closest(e);for(var n=t;n&&1===n.nodeType&&!Re(n,e);)n=n.parentElement;return n}(e,"."+Mn)===c?e:void 0}function b(t){return[t+"--"+n.type,t+"--"+n.direction,n.drag&&t+"--draggable",n.isNavigation&&t+"--nav",t===Mn&&En]}return ze(h,{setup:m,mount:function(){a("refresh",g),a("refresh",m),a("updated",v),l(document,"touchstart mousedown keydown",(function(t){o="keydown"===t.type}),{capture:!0}),l(c,"focusin",(function(){Ae(c,"is-focus-in",!!o)}))},destroy:g})},Slides:function(t,e,n){var i=yn(t),r=i.on,o=i.emit,s=i.bind,a=e.Elements,l=a.slides,c=a.list,u=[];function h(){l.forEach((function(t,e){p(t,e,-1)}))}function d(){m((function(t){t.destroy()})),ce(u)}function p(e,n,i){var r=Cn(t,n,i,e);r.mount(),u.push(r),u.sort((function(t,e){return t.index-e.index}))}function f(t){return t?g((function(t){return!t.isClone})):u}function m(t,e){f(e).forEach(t)}function g(t){return u.filter(ye(t)?t:function(e){return be(t)?Re(e.slide,t):Ee(Se(t),e.index)})}return{mount:function(){h(),r("refresh",d),r("refresh",h)},destroy:d,update:function(){m((function(t){t.update()}))},register:p,get:f,getIn:function(t){var i=e.Controller,r=i.toIndex(t),o=i.hasFocus()?1:n.perPage;return g((function(t){return un(t.index,r,r+o-1)}))},getAt:function(t){return g(t)[0]},add:function(t,e){Me(t,(function(t){if(be(t)&&(t=Ze(t)),_e(t)){var i=l[e];i?Ce(t,i):Pe(c,t),Le(t,n.classes.slide),r=t,a=he(o,"resize"),u=$e(r,"img"),(h=u.length)?u.forEach((function(t){s(t,"load error",(function(){--h||a()}))})):a()}var r,a,u,h})),o("refresh")},remove:function(t){Ye(g(t).map((function(t){return t.slide}))),o("refresh")},forEach:m,filter:g,style:function(t,e,n){m((function(i){i.style(t,e,n)}))},getLength:function(t){return t?l.length:u.length},isEnough:function(){return u.length>n.perPage}}},Layout:function(t,e,n){var i,r,o,s=yn(t),a=s.on,l=s.bind,c=s.emit,u=e.Slides,h=e.Direction.resolve,d=e.Elements,p=d.root,f=d.track,m=d.list,g=u.getAt,v=u.style;function y(){i="ttb"===n.direction,He(p,"maxWidth",en(n.width)),He(f,h("paddingLeft"),x(!1)),He(f,h("paddingRight"),x(!0)),b(!0)}function b(t){var e=Xe(p);(t||r.width!==e.width||r.height!==e.height)&&(He(f,"height",function(){var t="";i&&(nn(t=w(),"height or heightRatio is missing."),t="calc("+t+" - "+x(!1)+" - "+x(!0)+")");return t}()),v(h("marginRight"),en(n.gap)),v("width",n.autoWidth?null:en(n.fixedWidth)||(i?"":_())),v("height",en(n.fixedHeight)||(i?n.autoHeight?null:_():w()),!0),r=e,c("resized"),o!==(o=L())&&(Ae(p,"is-overflow",o),c("overflow",o)))}function x(t){var e=n.padding,i=h(t?"right":"left");return e&&en(e[i]||(ge(e)?0:e))||"0px"}function w(){return en(n.height||Xe(m).width*n.heightRatio)}function _(){var t=en(n.gap);return"calc((100%"+(t&&" + "+t)+")/"+(n.perPage||1)+(t&&" - "+t)+")"}function S(){return Xe(m)[h("width")]}function M(t,e){var n=g(t||0);return n?Xe(n.slide)[h("width")]+(e?0:A()):0}function E(t,e){var n=g(t);if(n){var i=Xe(n.slide)[h("right")],r=Xe(m)[h("left")];return ln(i-r)+(e?0:A())}return 0}function T(e){return E(t.length-1)-E(0)+M(0,e)}function A(){var t=g(0);return t&&parseFloat(He(t.slide,h("marginRight")))||0}function L(){return t.is("fade")||T(!0)>S()}return{mount:function(){var t,e,n;y(),l(window,"resize load",(t=he(c,"resize"),n=bn(e||0,t,null,1),function(){n.isPaused()&&n.start()})),a(["updated","refresh"],y),a("resize",b)},resize:b,listSize:S,slideSize:M,sliderSize:T,totalSize:E,getPadding:function(t){return parseFloat(He(f,h("padding"+(t?"Right":"Left"))))||0},isOverflow:L}},Clones:function(t,e,n){var i,r=yn(t),o=r.on,s=e.Elements,a=e.Slides,l=e.Direction.resolve,c=[];function u(){o("refresh",h),o(["updated","resize"],p),(i=f())&&(!function(e){var i=a.get().slice(),r=i.length;if(r){for(;i.length<e;)Te(i,i);Te(i.slice(-e),i.slice(0,e)).forEach((function(o,l){var u=l<e,h=function(e,i){var r=e.cloneNode(!0);return Le(r,n.classes.clone),r.id=t.root.id+"-clone"+fn(i+1),r}(o.slide,l);u?Ce(h,i[0].slide):Pe(s.list,h),Te(c,h),a.register(h,l-e+(u?0:r),o.index)}))}}(i),e.Layout.resize(!0))}function h(){d(),u()}function d(){Ye(c),ce(c),r.destroy()}function p(){var t=f();i!==t&&(i<t||!t)&&r.emit("refresh")}function f(){var i=n.clones;if(t.is(Pn)){if(xe(i)){var r=n[l("fixedWidth")]&&e.Layout.slideSize(0);i=r&&an(Xe(s.track)[l("width")]/r)||n[l("autoWidth")]&&t.length||2*n.perPage}}else i=0;return i}return{mount:u,destroy:d}},Move:function(t,e,n){var i,r=yn(t),o=r.on,s=r.emit,a=t.state.set,l=e.Layout,c=l.slideSize,u=l.getPadding,h=l.totalSize,d=l.listSize,p=l.sliderSize,f=e.Direction,m=f.resolve,g=f.orient,v=e.Elements,y=v.list,b=v.track;function x(){e.Controller.isBusy()||(e.Scroll.cancel(),w(t.index),e.Slides.update())}function w(t){_(T(t,!0))}function _(n,i){if(!t.is("fade")){var r=i?n:function(n){if(t.is(Pn)){var i=E(n),r=i>e.Controller.getEnd();(i<0||r)&&(n=S(n,r))}return n}(n);He(y,"transform","translate"+m("X")+"("+r+"px)"),n!==r&&s("sh")}}function S(t,e){var n=t-L(e),i=p();return t-=g(i*(an(ln(n)/i)||1))*(e?1:-1)}function M(){_(A(),!0),i.cancel()}function E(t){for(var n=e.Slides.get(),i=0,r=1/0,o=0;o<n.length;o++){var s=n[o].index,a=ln(T(s,!0)-t);if(!(a<=r))break;r=a,i=s}return i}function T(e,i){var r=g(h(e-1)-function(t){var e=n.focus;return"center"===e?(d()-c(t,!0))/2:+e*c(t)||0}(e));return i?function(e){n.trimSpace&&t.is("slide")&&(e=hn(e,0,g(p(!0)-d())));return e}(r):r}function A(){var t=m("left");return Xe(y)[t]-Xe(b)[t]+g(u(!1))}function L(t){return T(t?e.Controller.getEnd():0,!!n.trimSpace)}return{mount:function(){i=e.Transition,o(["mounted","resized","updated","refresh"],x)},move:function(t,e,n,r){var o,l;t!==e&&(o=t>n,l=g(S(A(),o)),o?l>=0:l<=y[m("scrollWidth")]-Xe(b)[m("width")])&&(M(),_(S(A(),t>n),!0)),a(4),s("move",e,n,t),i.start(e,(function(){a(3),s("moved",e,n,t),r&&r()}))},jump:w,translate:_,shift:S,cancel:M,toIndex:E,toPosition:T,getPosition:A,getLimit:L,exceededLimit:function(t,e){e=xe(e)?A():e;var n=!0!==t&&g(e)<g(L(!1)),i=!1!==t&&g(e)>g(L(!0));return n||i},reposition:x}},Controller:function(t,e,n){var i,r,o,s,a=yn(t),l=a.on,c=a.emit,u=e.Move,h=u.getPosition,d=u.getLimit,p=u.toPosition,f=e.Slides,m=f.isEnough,g=f.getLength,v=n.omitEnd,y=t.is(Pn),b=t.is("slide"),x=he(T,!1),w=he(T,!0),_=n.start||0,S=_;function M(){r=g(!0),o=n.perMove,s=n.perPage,i=P();var t=hn(_,0,v?i:r-1);t!==_&&(_=t,u.reposition())}function E(){i!==P()&&c("ei")}function T(t,e){var n=o||(I()?1:s),r=A(_+n*(t?-1:1),_,!(o||I()));return-1===r&&b&&!cn(h(),d(!t),1)?t?0:i:e?r:L(r)}function A(e,a,l){if(m()||I()){var c=function(e){if(b&&"move"===n.trimSpace&&e!==_)for(var i=h();i===p(e,!0)&&un(e,0,t.length-1,!n.rewind);)e<_?--e:++e;return e}(e);c!==e&&(a=e,e=c,l=!1),e<0||e>i?e=o||!un(0,e,a,!0)&&!un(i,a,e,!0)?y?l?e<0?-(r%s||s):r:e:n.rewind?e<0?i:0:-1:C(R(e)):l&&e!==a&&(e=C(R(a)+(e<a?-1:1)))}else e=-1;return e}function L(t){return y?(t+r)%r||0:t}function P(){for(var t=r-(I()||y&&o?1:s);v&&t-- >0;)if(p(r-1,!0)!==p(t,!0)){t++;break}return hn(t,0,r-1)}function C(t){return hn(I()?t:s*t,0,i)}function R(t){return I()?rn(t,i):sn((t>=i?r-1:t)/s)}function O(t){t!==_&&(S=_,_=t)}function I(){return!xe(n.focus)||n.isNavigation}function N(){return t.state.is([4,5])&&!!n.waitForTransition}return{mount:function(){M(),l(["updated","refresh","ei"],M),l("resized",E)},go:function(t,e,n){if(!N()){var r=function(t){var e=_;if(be(t)){var n=t.match(/([+\-<>])(\d+)?/)||[],r=n[1],o=n[2];"+"===r||"-"===r?e=A(_+ +(""+r+(+o||1)),_):">"===r?e=o?C(+o):x(!0):"<"===r&&(e=w(!0))}else e=y?t:hn(t,0,i);return e}(t),o=L(r);o>-1&&(e||o!==_)&&(O(o),u.move(r,o,S,n))}},scroll:function(t,n,r,o){e.Scroll.scroll(t,n,r,(function(){var t=L(u.toIndex(h()));O(v?rn(t,i):t),o&&o()}))},getNext:x,getPrev:w,getAdjacent:T,getEnd:P,setIndex:O,getIndex:function(t){return t?S:_},toIndex:C,toPage:R,toDest:function(t){var e=u.toIndex(t);return b?hn(e,0,i):e},hasFocus:I,isBusy:N}},Arrows:function(t,e,n){var i,r,o=yn(t),s=o.on,a=o.bind,l=o.emit,c=n.classes,u=n.i18n,h=e.Elements,d=e.Controller,p=h.arrows,f=h.track,m=p,g=h.prev,v=h.next,y={};function b(){!function(){var t=n.arrows;!t||g&&v||(m=p||je("div",c.arrows),g=S(!0),v=S(!1),i=!0,Pe(m,[g,v]),!p&&Ce(m,f));g&&v&&(ze(y,{prev:g,next:v}),Ge(m,t?"":"none"),Le(m,r="splide__arrows--"+n.direction),t&&(s(["mounted","moved","refresh","scrolled","ei"],M),a(v,"click",he(_,">")),a(g,"click",he(_,"<")),M(),Ue([g,v],"aria-controls",f.id),l("arrows:mounted",g,v)))}(),s("updated",x)}function x(){w(),b()}function w(){o.destroy(),Qe(m,r),i?(Ye(p?[g,v]:m),g=v=null):Fe([g,v],Sn)}function _(t){d.go(t,!0)}function S(t){return Ze('<button class="'+c.arrow+" "+(t?c.prev:c.next)+'" type="button"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40" width="40" height="40" focusable="false"><path d="'+(n.arrowPath||Rn)+'" />')}function M(){if(g&&v){var e=t.index,n=d.getPrev(),i=d.getNext(),r=n>-1&&e<n?u.last:u.prev,o=i>-1&&e>i?u.first:u.next;g.disabled=n<0,v.disabled=i<0,Ue(g,"aria-label",r),Ue(v,"aria-label",o),l("arrows:updated",g,v,n,i)}}return{arrows:y,mount:b,destroy:w,update:M}},Autoplay:function(t,e,n){var i,r,o=yn(t),s=o.on,a=o.bind,l=o.emit,c=bn(n.interval,t.go.bind(t,">"),(function(t){var e=h.bar;e&&He(e,"width",100*t+"%"),l("autoplay:playing",t)})),u=c.isPaused,h=e.Elements,d=e.Elements,p=d.root,f=d.toggle,m=n.autoplay,g="pause"===m;function v(){u()&&e.Slides.isEnough()&&(c.start(!n.resetProgress),r=i=g=!1,x(),l("autoplay:play"))}function y(t){void 0===t&&(t=!0),g=!!t,x(),u()||(c.pause(),l("autoplay:pause"))}function b(){g||(i||r?y(!1):v())}function x(){f&&(Ae(f,En,!g),Ue(f,"aria-label",n.i18n[g?"play":"pause"]))}function w(t){var i=e.Slides.getAt(t);c.set(i&&+We(i.slide,"data-splide-interval")||n.interval)}return{mount:function(){m&&(!function(){n.pauseOnHover&&a(p,"mouseenter mouseleave",(function(t){i="mouseenter"===t.type,b()}));n.pauseOnFocus&&a(p,"focusin focusout",(function(t){r="focusin"===t.type,b()}));f&&a(f,"click",(function(){g?v():y(!0)}));s(["move","scroll","refresh"],c.rewind),s("move",w)}(),f&&Ue(f,"aria-controls",h.track.id),g||v(),x())},destroy:c.cancel,play:v,pause:y,isPaused:u}},Cover:function(t,e,n){var i=yn(t).on;function r(t){e.Slides.forEach((function(e){var n=Ie(e.container||e.slide,"img");n&&n.src&&o(t,n,e)}))}function o(t,e,n){n.style("background",t?'center/cover no-repeat url("'+e.src+'")':"",!0),Ge(e,t?"none":"")}return{mount:function(){n.cover&&(i("lazyload:loaded",he(o,!0)),i(["mounted","updated","refresh"],he(r,!0)))},destroy:he(r,!1)}},Scroll:function(t,e,n){var i,r,o=yn(t),s=o.on,a=o.emit,l=t.state.set,c=e.Move,u=c.getPosition,h=c.getLimit,d=c.exceededLimit,p=c.translate,f=t.is("slide"),m=1;function g(t,n,o,s,h){var p=u();if(b(),o&&(!f||!d())){var g=e.Layout.sliderSize(),x=dn(t)*g*sn(ln(t)/g)||0;t=c.toPosition(e.Controller.toDest(t%g))+x}var w=cn(p,t,1);m=1,n=w?0:n||on(ln(t-p)/1.5,800),r=s,i=bn(n,v,he(y,p,t,h),1),l(5),a("scroll"),i.start()}function v(){l(3),r&&r(),a("scrolled")}function y(t,e,i,o){var s,a,l=u(),c=(t+(e-t)*(s=o,(a=n.easingFunc)?a(s):1-Math.pow(1-s,4))-l)*m;p(l+c),f&&!i&&d()&&(m*=.6,ln(c)<10&&g(h(d(!0)),600,!1,r,!0))}function b(){i&&i.cancel()}function x(){i&&!i.isPaused()&&(b(),v())}return{mount:function(){s("move",b),s(["updated","refresh"],x)},destroy:b,scroll:g,cancel:x}},Drag:function(t,e,n){var i,r,o,s,a,l,c,u,h=yn(t),d=h.on,p=h.emit,f=h.bind,m=h.unbind,g=t.state,v=e.Move,y=e.Scroll,b=e.Controller,x=e.Elements.track,w=e.Media.reduce,_=e.Direction,S=_.resolve,M=_.orient,E=v.getPosition,T=v.exceededLimit,A=!1;function L(){var t=n.drag;F(!t),s="free"===t}function P(t){if(l=!1,!c){var e=B(t);i=t.target,r=n.noDrag,Re(i,".splide__pagination__page, .splide__arrow")||r&&Re(i,r)||!e&&t.button||(b.isBusy()?Je(t,!0):(u=e?x:window,a=g.is([4,5]),o=null,f(u,"touchmove mousemove",C,On),f(u,Ln,R,On),v.cancel(),y.cancel(),I(t)))}var i,r}function C(e){if(g.is(6)||(g.set(6),p("drag")),e.cancelable)if(a){v.translate(i+N(e)/(A&&t.is("slide")?5:1));var r=D(e)>200,o=A!==(A=T());(r||o)&&I(e),l=!0,p("dragging"),Je(e)}else(function(t){return ln(N(t))>ln(N(t,!0))})(e)&&(a=function(t){var e=n.dragMinThreshold,i=ge(e),r=i&&e.mouse||0,o=(i?e.touch:+e)||10;return ln(N(t))>(B(t)?o:r)}(e),Je(e))}function R(i){g.is(6)&&(g.set(3),p("dragged")),a&&(!function(i){var r=function(e){if(t.is(Pn)||!A){var n=D(e);if(n&&n<200)return N(e)/n}return 0}(i),o=function(t){return E()+dn(t)*rn(ln(t)*(n.flickPower||600),s?1/0:e.Layout.listSize()*(n.flickMaxPages||1))}(r),a=n.rewind&&n.rewindByDrag;w(!1),s?b.scroll(o,0,n.snap):t.is("fade")?b.go(M(dn(r))<0?a?"<":"-":a?">":"+"):t.is("slide")&&A&&a?b.go(T(!0)?">":"<"):b.go(b.toDest(o),!0);w(!0)}(i),Je(i)),m(u,"touchmove mousemove",C),m(u,Ln,R),a=!1}function O(t){!c&&l&&Je(t,!0)}function I(t){o=r,r=t,i=E()}function N(t,e){return k(t,e)-k(z(t),e)}function D(t){return tn(t)-tn(z(t))}function z(t){return r===t&&o||r}function k(t,e){return(B(t)?t.changedTouches[0]:t)["page"+S(e?"Y":"X")]}function B(t){return"undefined"!=typeof TouchEvent&&t instanceof TouchEvent}function F(t){c=t}return{mount:function(){f(x,"touchmove mousemove",pe,On),f(x,Ln,pe,On),f(x,"touchstart mousedown",P,On),f(x,"click",O,{capture:!0}),f(x,"dragstart",Je),d(["mounted","updated"],L)},disable:F,isDragging:function(){return a}}},Keyboard:function(t,e,n){var i,r,o=yn(t),s=o.on,a=o.bind,l=o.unbind,c=t.root,u=e.Direction.resolve;function h(){var t=n.keyboard;t&&(i="global"===t?window:c,a(i,"keydown",f))}function d(){l(i,"keydown")}function p(){var t=r;r=!0,de((function(){r=t}))}function f(e){if(!r){var n=Nn(e);n===u("ArrowLeft")?t.go("<"):n===u("ArrowRight")&&t.go(">")}}return{mount:function(){h(),s("updated",d),s("updated",h),s("move",p)},destroy:d,disable:function(t){r=t}}},LazyLoad:function(t,e,n){var i=yn(t),r=i.on,o=i.off,s=i.bind,a=i.emit,l="sequential"===n.lazyLoad,c=["moved","scrolled"],u=[];function h(){ce(u),e.Slides.forEach((function(t){$e(t.slide,"[data-splide-lazy], [data-splide-lazy-srcset]").forEach((function(e){var i=We(e,"data-splide-lazy"),r=We(e,"data-splide-lazy-srcset");if(i!==e.src||r!==e.srcset){var o=n.classes.spinner,s=e.parentElement,a=Ie(s,"."+o)||je("span",o,s);u.push([e,t,a]),e.src||Ge(e,"none")}}))})),l?m():(o(c),r(c,d),d())}function d(){(u=u.filter((function(e){var i=n.perPage*((n.preloadPages||1)+1)-1;return!e[1].isWithin(t.index,i)||p(e)}))).length||o(c)}function p(t){var e=t[0];Le(t[1].slide,"is-loading"),s(e,"load error",he(f,t)),Ue(e,"src",We(e,"data-splide-lazy")),Ue(e,"srcset",We(e,"data-splide-lazy-srcset")),Fe(e,"data-splide-lazy"),Fe(e,"data-splide-lazy-srcset")}function f(t,e){var n=t[0],i=t[1];Qe(i.slide,"is-loading"),"error"!==e.type&&(Ye(t[2]),Ge(n,""),a("lazyload:loaded",n,i),a("resize")),l&&m()}function m(){u.length&&p(u.shift())}return{mount:function(){n.lazyLoad&&(h(),r("refresh",h))},destroy:he(ce,u),check:d}},Pagination:function(t,e,n){var i,r,o=yn(t),s=o.on,a=o.emit,l=o.bind,c=e.Slides,u=e.Elements,h=e.Controller,d=h.hasFocus,p=h.getIndex,f=h.go,m=e.Direction.resolve,g=u.pagination,v=[];function y(){i&&(Ye(g?ue(i.children):i),Qe(i,r),ce(v),i=null),o.destroy()}function b(t){f(">"+t,!0)}function x(t,e){var n=v.length,i=Nn(e),r=w(),o=-1;i===m("ArrowRight",!1,r)?o=++t%n:i===m("ArrowLeft",!1,r)?o=(--t+n)%n:"Home"===i?o=0:"End"===i&&(o=n-1);var s=v[o];s&&(Ve(s.button),f(">"+o),Je(e,!0))}function w(){return n.paginationDirection||n.direction}function _(t){return v[h.toPage(t)]}function S(){var t=_(p(!0)),e=_(p());if(t){var n=t.button;Qe(n,En),Fe(n,"aria-selected"),Ue(n,"tabindex",-1)}if(e){var r=e.button;Le(r,En),Ue(r,"aria-selected",!0),Ue(r,"tabindex","")}a("pagination:updated",{list:i,items:v},t,e)}return{items:v,mount:function e(){y(),s(["updated","refresh","ei"],e);var o=n.pagination;g&&Ge(g,o?"":"none"),o&&(s(["move","scroll","scrolled"],S),function(){var e=t.length,o=n.classes,s=n.i18n,a=n.perPage,p=d()?h.getEnd()+1:an(e/a);Le(i=g||je("ul",o.pagination,u.track.parentElement),r="splide__pagination--"+w()),Ue(i,_n,"tablist"),Ue(i,"aria-label",s.select),Ue(i,"aria-orientation","ttb"===w()?"vertical":"");for(var f=0;f<p;f++){var m=je("li",null,i),y=je("button",{class:o.page,type:"button"},m),_=c.getIn(f).map((function(t){return t.slide.id})),S=!d()&&a>1?s.pageX:s.slideX;l(y,"click",he(b,f)),n.paginationKeyboard&&l(y,"keydown",he(x,f)),Ue(m,_n,"presentation"),Ue(y,_n,"tab"),Ue(y,"aria-controls",_.join(" ")),Ue(y,"aria-label",pn(S,f+1)),Ue(y,"tabindex",-1),v.push({li:m,button:y,page:f})}}(),S(),a("pagination:mounted",{list:i,items:v},_(t.index)))},destroy:y,getAt:_,update:S}},Sync:function(t,e,n){var i=n.isNavigation,r=n.slideFocus,o=[];function s(){t.splides.forEach((function(e){e.isParent||(l(t,e.splide),l(e.splide,t))})),i&&function(){var e=yn(t),n=e.on;n("click",u),n("sk",h),n(["mounted","updated"],c),o.push(e),e.emit("navigation:mounted",t.splides)}()}function a(){o.forEach((function(t){t.destroy()})),ce(o)}function l(t,e){var n=yn(t);n.on("move",(function(t,n,i){e.go(e.is(Pn)?i:t)})),o.push(n)}function c(){Ue(e.Elements.list,"aria-orientation","ttb"===n.direction?"vertical":"")}function u(e){t.go(e.index)}function h(t,e){Ee(Dn,Nn(e))&&(u(t),Je(e))}return{setup:he(e.Media.set,{slideFocus:xe(r)?i:r},!0),mount:s,destroy:a,remount:function(){a(),s()}}},Wheel:function(t,e,n){var i=yn(t).bind,r=0;function o(i){if(i.cancelable){var o=i.deltaY,s=o<0,a=tn(i),l=n.wheelMinThreshold||0,c=n.wheelSleep||0;ln(o)>l&&a-r>c&&(t.go(s?"<":">"),r=a),function(i){return!n.releaseWheel||t.state.is(4)||-1!==e.Controller.getAdjacent(i)}(s)&&Je(i)}}return{mount:function(){n.wheel&&i(e.Elements.track,"wheel",o,On)}}},Live:function(t,e,n){var i=yn(t).on,r=e.Elements.track,o=n.live&&!n.isNavigation,s=je("span","splide__sr"),a=bn(90,he(l,!1));function l(t){Ue(r,"aria-busy",t),t?(Pe(r,s),a.start()):(Ye(s),a.cancel())}function c(t){o&&Ue(r,"aria-live",t?"off":"polite")}return{mount:function(){o&&(c(!e.Autoplay.isPaused()),Ue(r,"aria-atomic",!0),s.textContent="…",i("autoplay:play",he(c,!0)),i("autoplay:pause",he(c,!1)),i(["moved","scrolled"],he(l,!0)))},disable:c,destroy:function(){Fe(r,["aria-live","aria-atomic","aria-busy"]),Ye(s)}}}}),kn={type:"slide",role:"region",speed:400,perPage:1,cloneStatus:!0,arrows:!0,pagination:!0,paginationKeyboard:!0,interval:5e3,pauseOnHover:!0,pauseOnFocus:!0,resetProgress:!0,easing:"cubic-bezier(0.25, 1, 0.5, 1)",drag:!0,direction:"ltr",trimSpace:!0,focusableNodes:"a, button, textarea, input, select, iframe",live:!0,classes:An,i18n:{prev:"Previous slide",next:"Next slide",first:"Go to first slide",last:"Go to last slide",slideX:"Go to slide %s",pageX:"Go to page %s",play:"Start autoplay",pause:"Pause autoplay",carousel:"carousel",slide:"slide",select:"Select a slide to show",slideLabel:"%s of %s"},reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function Bn(t,e,n){var i=e.Slides;function r(){i.forEach((function(t){t.style("transform","translateX(-"+100*t.index+"%)")}))}return{mount:function(){yn(t).on(["mounted","refresh"],r)},start:function(t,e){i.style("transition","opacity "+n.speed+"ms "+n.easing),de(e)},cancel:pe}}function Fn(t,e,n){var i,r=e.Move,o=e.Controller,s=e.Scroll,a=e.Elements.list,l=he(He,a,"transition");function c(){l(""),s.cancel()}return{mount:function(){yn(t).bind(a,"transitionend",(function(t){t.target===a&&i&&(c(),i())}))},start:function(e,a){var c=r.toPosition(e,!0),u=r.getPosition(),h=function(e){var i=n.rewindSpeed;if(t.is("slide")&&i){var r=o.getIndex(!0),s=o.getEnd();if(0===r&&e>=s||r>=s&&0===e)return i}return n.speed}(e);ln(c-u)>=1&&h>=1?n.useScroll?s.scroll(c,h,!1,a):(l("transform "+h+"ms "+n.easing),r.translate(c,!0),i=a):(r.jump(e),a())},cancel:c}}var Un=function(){function t(e,n){var i;this.event=yn(),this.Components={},this.state=(i=1,{set:function(t){i=t},is:function(t){return Ee(Se(t),i)}}),this.splides=[],this._o={},this._E={};var r=be(e)?Ke(document,e):e;nn(r,r+" is invalid."),this.root=r,n=ke({label:We(r,"aria-label")||"",labelledby:We(r,"aria-labelledby")||""},kn,t.defaults,n||{});try{ke(n,JSON.parse(We(r,"data-splide")))}catch(t){nn(!1,"Invalid JSON")}this._o=Object.create(ke({},n))}var e,n,i,r=t.prototype;return r.mount=function(t,e){var n=this,i=this.state,r=this.Components;return nn(i.is([1,7]),"Already mounted!"),i.set(1),this._C=r,this._T=e||this._T||(this.is("fade")?Bn:Fn),this._E=t||this._E,De(ze({},zn,this._E,{Transition:this._T}),(function(t,e){var i=t(n,r,n._o);r[e]=i,i.setup&&i.setup()})),De(r,(function(t){t.mount&&t.mount()})),this.emit("mounted"),Le(this.root,"is-initialized"),i.set(3),this.emit("ready"),this},r.sync=function(t){return this.splides.push({splide:t}),t.splides.push({splide:this,isParent:!0}),this.state.is(3)&&(this._C.Sync.remount(),t.Components.Sync.remount()),this},r.go=function(t){return this._C.Controller.go(t),this},r.on=function(t,e){return this.event.on(t,e),this},r.off=function(t){return this.event.off(t),this},r.emit=function(t){var e;return(e=this.event).emit.apply(e,[t].concat(ue(arguments,1))),this},r.add=function(t,e){return this._C.Slides.add(t,e),this},r.remove=function(t){return this._C.Slides.remove(t),this},r.is=function(t){return this._o.type===t},r.refresh=function(){return this.emit("refresh"),this},r.destroy=function(t){void 0===t&&(t=!0);var e=this.event,n=this.state;return n.is(1)?yn(this).on("ready",this.destroy.bind(this,t)):(De(this._C,(function(e){e.destroy&&e.destroy(t)}),!0),e.emit("destroy"),e.destroy(),t&&ce(this.splides),n.set(7)),this},e=t,(n=[{key:"options",get:function(){return this._o},set:function(t){this._C.Media.set(t,!0,!0)}},{key:"length",get:function(){return this._C.Slides.getLength(!0)}},{key:"index",get:function(){return this._C.Controller.getIndex()}}])&&ae(e.prototype,n),i&&ae(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();Un.defaults={},Un.STATES=le;function jn(t){return function(t){if(Array.isArray(t))return Hn(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return Hn(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Hn(t,e)}(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 Hn(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}var Gn=[],Vn=null,Wn=function(){var t={speed:300,loop:Gn.length>1,slidesPerView:"auto",centeredSlides:!0,watchOverflow:!0,autoplay:{delay:3e3},wrapperClass:"slider__list",slideClass:"slider__item",navigation:{nextEl:".slider__next-button",prevEl:".slider__prev-button"},breakpoints:{768:{loop:Gn.length>3,slidesPerView:Gn.length>3?"auto":Gn.length,centeredSlides:!1,slidesOffsetBefore:30,slidesOffsetAfter:30,allowTouchMove:!1}},on:{init:function(){var t=3;"max"==this.currentBreakpoint&&(t=1),Gn.length<=t&&(document.querySelector(".js-slider__body").classList.add("is-no__slide"),this.params.autoplay=!1,this.params.loop=!1)}}};Vn&&Vn.destroy(),Vn=new Nt(".slider__body",t)};Nt.use([kt,Ut]);var qn=null,Xn=null,Yn=null,Zn=function(t){Xn&&Xn.classList.toggle("is-active",t.isIntersecting)},Jn=null,Kn=null,$n=new U.a((function(t){ne(t[0].contentRect)}));jn(document.querySelectorAll(".splide__slide")).length>1&&new Un(".splide",{type:"loop",perPage:1,perMove:1,speed:1e3,rewind:!0,autoplay:!0,interval:5e3,arrows:!1,pagination:!0}).mount();var Qn={namespace:"front-page",beforeEnter:function(t){var e=t.next.container;(Gn=jn(e.querySelectorAll(".js-slider__item"))).length&&(navigator.userAgent.match(/(iPhone|iPod|Android.*Mobile)/i)&&Gn.forEach((function(t){""!=t.dataset.spurl&&t.setAttribute("href",t.dataset.spurl)})),window.wasedazemi.mql.addListener?window.wasedazemi.mql.addListener(Wn):window.wasedazemi.mql.addEventListener("change",Wn),Wn()),qn=e.querySelector('[data-intersection="sticky-footer"]'),Xn=document.querySelector(".js-sticky-footer"),Yn=Object(p.a)(qn,Zn),Jn=e.querySelector("#js-canvas-front-wrapper"),Kn=e.querySelector("#js-canvas-front"),$n.observe(Jn),Qt(Kn),te()},afterEnter:function(){},beforeLeave:function(){},afterLeave:function(){Gn.length&&(window.wasedazemi.mql.addListener?window.wasedazemi.mql.removeListener(Wn):window.wasedazemi.mql.removeEventListener("change",Wn),Vn.destroy()),Gn=[],Yn(),qn=null,Xn=null,Yn=null,ee(),ie(),$n.unobserve(Jn)}},ti=null,ei=null,ni=new U.a((function(t){ne(t[0].contentRect)})),ii={namespace:"page-chuko",beforeEnter:function(t){var e=t.next.container;ti=e.querySelector("#js-canvas-chuko-wrapper"),ei=e.querySelector("#js-canvas-chuko"),ni.observe(ti),Qt(ei),te()},afterEnter:function(){},beforeLeave:function(){},afterLeave:function(){ee(),ie(),ni.unobserve(ti)}},ri=null,oi=null,si=new U.a((function(t){ne(t[0].contentRect)})),ai={namespace:"page-results",beforeEnter:function(t){var e=t.next.container;ri=e.querySelector("#js-canvas-results-wrapper"),oi=e.querySelector("#js-canvas-results"),si.observe(ri),Qt(oi),te()},afterEnter:function(){},beforeLeave:function(){},afterLeave:function(){ee(),ie(),si.unobserve(ri)}},li=function(t){if("TABLE"===t.tagName){var e=document.createElement("div");e.className="table-wrapper is-hiding-scroll-bar-if-win",t.parentNode.insertBefore(e,t),t.parentNode.removeChild(t),e.appendChild(t)}};function ci(t){return function(t){if(Array.isArray(t))return ui(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return ui(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ui(t,e)}(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 ui(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}var hi={namespace:"single-feature",beforeEnter:function(t){ci(t.next.container.querySelectorAll(".article__body table")).forEach(li)},afterEnter:function(){},beforeLeave:function(){},afterLeave:function(){}};function di(t){return function(t){if(Array.isArray(t))return mi(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||fi(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 pi(t,e){var n;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=fi(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,r=function(){};return{s:r,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return s=t.done,t},e:function(t){a=!0,o=t},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw o}}}}function fi(t,e){if(t){if("string"==typeof t)return mi(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)?mi(t,e):void 0}}function mi(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}var gi=[],vi=null,yi=function(t){var e,n=t.currentTarget,i=pi(gi);try{for(i.s();!(e=i.n()).done;){var r=e.value,o=r===n;r.classList.toggle("is-active",o)}}catch(t){i.e(t)}finally{i.f()}var s=n.classList.contains("js-tab__item--map");vi.classList.toggle("is-active",s)},bi=[],xi=function(t){t.currentTarget.classList.toggle("is-active")},wi={namespace:"archive-school-area",beforeEnter:function(t){var e=t.next.container;gi=di(e.querySelectorAll(".js-tab__item")),vi=e.querySelector(".js-map");var n,i=pi(gi);try{for(i.s();!(n=i.n()).done;){n.value.addEventListener("click",yi)}}catch(t){i.e(t)}finally{i.f()}var r,o=pi(bi=di(e.querySelectorAll(".js-prefectures__header")));try{for(o.s();!(r=o.n()).done;){r.value.addEventListener("click",xi)}}catch(t){o.e(t)}finally{o.f()}},afterEnter:function(){},beforeLeave:function(){},afterLeave:function(){var t,e=pi(gi);try{for(e.s();!(t=e.n()).done;){t.value.removeEventListener("click",yi)}}catch(t){e.e(t)}finally{e.f()}var n,i=pi(bi);try{for(i.s();!(n=i.n()).done;){n.value.removeEventListener("click",xi)}}catch(t){i.e(t)}finally{i.f()}gi=[],bi=[]}};function _i(t,e){var n;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=Mi(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,r=function(){};return{s:r,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return s=t.done,t},e:function(t){a=!0,o=t},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw o}}}}function Si(t){return function(t){if(Array.isArray(t))return Ei(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||Mi(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 Mi(t,e){if(t){if("string"==typeof t)return Ei(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)?Ei(t,e):void 0}}function Ei(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}var Ti=function(t){if(null==t)return function(){};var e=Si(t.querySelectorAll('[role="tab"]'));if(!e.length)return function(){};for(var n=e.map((function(e){var n=e.getAttribute("aria-controls");return n?t.querySelector('[data-tab-name="'.concat(n,'"]')):null})),i=e.map((function(t,i){return function(){if(null!=e[i]&&null!=n[i]){e[i].setAttribute("aria-selected","true"),n[i].setAttribute("aria-hidden","false");var t,r=_i(e.filter((function(t,e){return i!==e})));try{for(r.s();!(t=r.n()).done;){var o=t.value;null!=o&&o.setAttribute("aria-selected","false")}}catch(t){r.e(t)}finally{r.f()}var s,a=_i(n.filter((function(t,e){return i!==e})));try{for(a.s();!(s=a.n()).done;){var l=s.value;null!=l&&l.setAttribute("aria-hidden","true")}}catch(t){a.e(t)}finally{a.f()}}}})),r=0;r<i.length;r++)e[r].addEventListener("click",i[r]);return function(){for(var t=0;t<i.length;t++)e[t].removeEventListener("click",i[t])}},Ai=n("HToz"),Li=n.n(Ai),Pi=n("vX6Q"),Ci=n.n(Pi),Ri=n("IdG6"),Oi=n("J1uU"),Ii=n("bh9V");function Ni(t){return function(t){if(Array.isArray(t))return zi(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||Di(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 Di(t,e){if(t){if("string"==typeof t)return zi(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)?zi(t,e):void 0}}function zi(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 ki(t){var e,n=function(t){t.isIntersecting?t.target.classList.add("is-active"):t.target.classList.remove("is-active")},i=function(t,e){var n;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=Di(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,r=function(){};return{s:r,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return s=t.done,t},e:function(t){a=!0,o=t},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw o}}}}(Ni(t.querySelectorAll('[data-intersection="decoration"]')));try{for(i.s();!(e=i.n()).done;){var r=e.value;Object(p.a)(r,n)}}catch(t){i.e(t)}finally{i.f()}var o=t.querySelector(".js-canvas--benefit"),s=t.querySelector(".js-canvas-wrapper--benefit"),a=new Ri.a(o,s);a.renderer.setClearColor(14564373);var l=Object(Oi.a)(a);a.scene.add(l.meshArray[0]);var c=t.querySelector(".js-canvas--price"),u=t.querySelector(".js-canvas-wrapper--price"),h=new Ri.a(c,u);h.renderer.setClearColor(15461355);var d=t.querySelector(".js-canvas--school"),f=t.querySelector(".js-canvas-wrapper--school"),m=new Ri.a(d,f);m.renderer.setClearColor(1123667);var g=t.querySelector(".js-canvas--flow"),v=t.querySelector(".js-canvas-wrapper--flow"),y=new Ri.a(g,v);y.renderer.setClearColor(12442106);var b=Object(Ii.a)(h);h.scene.add(b.meshArray[0]),m.scene.add(b.meshArray[1]),y.scene.add(b.meshArray[2]);var x={benefit:!1,price:!1,school:!1,flow:!1},w=new IntersectionObserver((function(t){t.forEach((function(t){t.isIntersecting?x[t.target.dataset.canvas]=!0:x[t.target.dataset.canvas]=!1}))}),{rootMargin:"100px 0px"});t.querySelectorAll(".js-canvas-wrapper").forEach((function(t){w.observe(t)}));!function t(){l.loop(),b.loop(),x.benefit&&a.loop(),x.price&&h.loop(),x.school&&m.loop(),x.flow&&y.loop(),window.requestAnimationFrame(t)}();var _=0,S=window.innerWidth,M=function(){S!==window.innerWidth&&(a.resize(),l.resize(a),l.uniforms.uTiltX.value=window.innerWidth<768?.1:.25,h.resize(),m.resize(),y.resize(),b.resize(h),S=window.innerWidth)};window.addEventListener("resize",(function(){_&&clearTimeout(_),_=setTimeout(M,200)}));var E=t.querySelector(".js-mv-image"),T=t.querySelector(".js-mv-fade-01"),A=t.querySelector(".js-mv-fade-02");Ci()(E,(function(){E.style.opacity=1,E.style.transform="scaleY(1)",T.style.opacity=1,T.style.transform="translateY(0)",A.style.opacity=1,A.style.transform="translateY(0)"}))}function Bi(t,e){var n;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=Ui(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,r=function(){};return{s:r,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return s=t.done,t},e:function(t){a=!0,o=t},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw o}}}}function Fi(t){return function(t){if(Array.isArray(t))return ji(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||Ui(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 Ui(t,e){if(t){if("string"==typeof t)return ji(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)?ji(t,e):void 0}}function ji(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}window.wasedazemi={mql:matchMedia("(min-width: 768px)")};var Hi=null,Gi=[],Vi=[],Wi=[],qi=null,Xi=null,Yi=null,Zi=null,Ji={speed:300,loop:Gi.length>=2,slidesPerView:"auto",centeredSlides:!0,autoplay:{delay:3e3},wrapperClass:"slider__list",slideClass:"slider__item",navigation:{nextEl:".slider__next-button",prevEl:".slider__prev-button"},breakpoints:{768:{loop:Gi.length>=3,slidesPerView:3,centeredSlides:!1,autoplay:!1}}},Ki=function(){Xi&&Xi.destroy(),Ji.loop=Gi.length>=2,Ji.breakpoints[768].loop=Gi.length>=3,Xi=new Nt(".slider__body",Ji)},$i=function(){var t={speed:300,loop:Vi.length>1,slidesPerView:"auto",centeredSlides:!0,watchOverflow:!0,autoplay:{delay:3e3},wrapperClass:"js-sliderBanner__list",slideClass:"js-sliderBanner__item",navigation:{nextEl:".js-sliderBanner__next-button",prevEl:".js-sliderBanner__prev-button"},breakpoints:{768:{loop:Vi.length>2,slidesOffsetBefore:20,slidesOffsetAfter:20,centeredSlides:!1,allowTouchMove:!1,spaceBetween:10}},on:{init:function(){var t=2;"max"==this.currentBreakpoint&&(t=1),Vi.length<=t&&(document.querySelector(".js-sliderBanner__body").classList.add("is-no__slide"),this.params.autoplay=!1,this.params.loop=!1)}}};Yi&&Yi.destroy(),Yi=new Nt(".js-sliderBanner__body",t)},Qi=function(){var t={speed:300,loop:Wi.length>1,slidesPerView:"auto",centeredSlides:!0,watchOverflow:!0,autoplay:{delay:3e3},wrapperClass:"js-sliderBanner__list2",slideClass:"js-sliderBanner__item2",navigation:{nextEl:".js-sliderBanner__next-button2",prevEl:".js-sliderBanner__prev-button2"},breakpoints:{768:{loop:Wi.length>2,slidesOffsetBefore:20,slidesOffsetAfter:20,centeredSlides:!1,allowTouchMove:!1,spaceBetween:10}},on:{init:function(){var t=2;"max"==this.currentBreakpoint&&(t=1),Wi.length<=t&&(document.querySelector(".js-sliderBanner__body2").classList.add("is-no__slide"),this.params.autoplay=!1,this.params.loop=!1)}}};Zi&&Zi.destroy(),Zi=new Nt(".js-sliderBanner__body2",t)};Nt.use([kt,Ut]);var tr,er,nr=[],ir=function(t){t.currentTarget.classList.toggle("is-active")},rr=[];tr=document.querySelector(".principals__box-btn"),er=document.querySelector(".principals__box-body"),tr&&tr.addEventListener("click",(function(){er.classList.add("is-active"),tr.classList.add("is-active")}));var or={namespace:"single-school-area",beforeEnter:function(t){var e=t.next.container;qi=new Li.a({threshold:550},Fi(e.querySelectorAll(".lazy"))),(Vi=Fi(e.querySelectorAll(".js-sliderBanner__item"))).length&&(Vi.length>2?e.querySelector(".js-sliderBanner__body").classList.add("loopTrue"):e.querySelector(".js-sliderBanner__body").classList.add("loopFalse"),window.wasedazemi.mql.addListener?window.wasedazemi.mql.addListener($i):window.wasedazemi.mql.addEventListener("change",$i),$i()),(Wi=Fi(e.querySelectorAll(".js-sliderBanner__item2"))).length&&(Wi.length>2?e.querySelector(".js-sliderBanner__body2").classList.add("loopTrue"):e.querySelector(".js-sliderBanner__body2").classList.add("loopFalse"),window.wasedazemi.mql.addListener?window.wasedazemi.mql.addListener(Qi):window.wasedazemi.mql.addEventListener("change",Qi),Qi()),(Gi=Fi(e.querySelectorAll(".js-slider__item"))).length&&(window.wasedazemi.mql.addListener?window.wasedazemi.mql.addListener(Ki):window.wasedazemi.mql.addEventListener("change",Ki),Ki());var n,i=Bi(nr=Fi(e.querySelectorAll(".js-pricing__course-header")));try{for(i.s();!(n=i.n()).done;){n.value.addEventListener("click",ir)}}catch(t){i.e(t)}finally{i.f()}var r,o=Bi(Fi(e.querySelectorAll('[role="tablist"]')));try{for(o.s();!(r=o.n()).done;){var s=r.value;rr.push(Ti(s))}}catch(t){o.e(t)}finally{o.f()}var a=e.querySelector("#js-school_tabs");a&&a.classList.contains("is-course")&&(Hi=ki(e))},afterEnter:function(){},beforeLeave:function(){},afterLeave:function(){Gi.length&&(window.wasedazemi.mql.addListener?window.wasedazemi.mql.removeListener(Ki):window.wasedazemi.mql.removeEventListener("change",Ki),Xi.destroy()),Gi=[],Vi.length&&(window.wasedazemi.mql.addListener?window.wasedazemi.mql.removeListener($i):window.wasedazemi.mql.removeEventListener("change",$i),Yi.destroy()),Vi=[],Wi.length&&(window.wasedazemi.mql.addListener?window.wasedazemi.mql.removeListener(Qi):window.wasedazemi.mql.removeEventListener("change",Qi),Zi.destroy()),Wi=[];var t,e=Bi(nr);try{for(e.s();!(t=e.n()).done;){t.value.removeEventListener("click",ir)}}catch(t){e.e(t)}finally{e.f()}nr=[];var n,i=Bi(rr);try{for(i.s();!(n=i.n()).done;){(0,n.value)()}}catch(t){i.e(t)}finally{i.f()}[],qi.destroy(),qi=null,Hi&&(Hi(),Hi=null)}};function sr(t){return function(t){if(Array.isArray(t))return ar(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return ar(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ar(t,e)}(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 ar(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}var lr=[],cr=null,ur={speed:300,loop:lr.length>=2,slidesPerView:"auto",centeredSlides:!0,autoplay:{delay:3e3},wrapperClass:"slider__list",slideClass:"slider__item",navigation:{nextEl:".slider__next-button",prevEl:".slider__prev-button"},breakpoints:{768:{loop:lr.length>=3,slidesPerView:3,centeredSlides:!1,autoplay:!1}}},hr=function(){cr&&cr.destroy(),cr=new Nt(".slider__body",ur)};Nt.use([kt,Ut]);var dr={namespace:"single-steps",beforeEnter:function(t){var e=t.next.container;(lr=sr(e.querySelectorAll(".js-slider__item"))).length&&(window.wasedazemi.mql.addListener?window.wasedazemi.mql.addListener(hr):window.wasedazemi.mql.addEventListener("change",hr),hr())},afterEnter:function(){},beforeLeave:function(){},afterLeave:function(){lr.length&&(window.wasedazemi.mql.addListener?window.wasedazemi.mql.removeListener(hr):window.wasedazemi.mql.removeEventListener("change",hr),cr.destroy()),lr=[]}};function pr(t){return function(t){if(Array.isArray(t))return gr(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||mr(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 fr(t,e){var n;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=mr(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,r=function(){};return{s:r,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return s=t.done,t},e:function(t){a=!0,o=t},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw o}}}}function mr(t,e){if(t){if("string"==typeof t)return gr(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)?gr(t,e):void 0}}function gr(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}var vr=[],yr=null,br=function(t){var e,n=t.currentTarget,i=fr(vr);try{for(i.s();!(e=i.n()).done;){var r=e.value,o=r===n;r.classList.toggle("is-active",o)}}catch(t){i.e(t)}finally{i.f()}var s=n.classList.contains("js-tab__item--map");yr.classList.toggle("is-active",s)},xr=[],wr=function(t){t.currentTarget.classList.toggle("is-active")},_r={namespace:"page-entry",beforeEnter:function(t){var e=t.next.container;vr=pr(e.querySelectorAll(".js-tab__item")),yr=e.querySelector(".js-map");var n,i=fr(vr);try{for(i.s();!(n=i.n()).done;){n.value.addEventListener("click",br)}}catch(t){i.e(t)}finally{i.f()}var r,o=fr(xr=pr(e.querySelectorAll(".js-prefectures__header")));try{for(o.s();!(r=o.n()).done;){r.value.addEventListener("click",wr)}}catch(t){o.e(t)}finally{o.f()}},afterEnter:function(){},beforeLeave:function(){},afterLeave:function(){var t,e=fr(vr);try{for(e.s();!(t=e.n()).done;){t.value.removeEventListener("click",br)}}catch(t){e.e(t)}finally{e.f()}var n,i=fr(xr);try{for(i.s();!(n=i.n()).done;){n.value.removeEventListener("click",wr)}}catch(t){i.e(t)}finally{i.f()}vr=[],xr=[]}},Sr=function(){Ar.classList.remove("is-disable")},Mr=function(){Ar.classList.add("is-disable")},Er=function(t){window.location.href=t.target.options[t.target.selectedIndex].value},Tr=null,Ar=null,Lr=null,Pr={namespace:"archive-success",beforeEnter:function(){},afterEnter:function(t){var e=t.next.container;Tr=e.querySelector("#js-success_icon_hs"),Ar=e.querySelector("#js-item-pref-list"),(Lr=e.querySelector("#js-static-item-pref"))||(Tr.addEventListener("mouseenter",Sr),Tr.addEventListener("mouseleave",Mr)),e.querySelector("#js-pagination-select").addEventListener("change",Er)},beforeLeave:function(){},afterLeave:function(){Lr||(Tr.removeEventListener("mouseenter",Sr),Tr.removeEventListener("mouseleave",Mr)),Tr=null,Ar=null,Lr=null,null}},Cr=function(){Nr.classList.remove("is-disable")},Rr=function(){Nr.classList.add("is-disable")},Or=function(t){window.location.href=t.target.options[t.target.selectedIndex].value},Ir=null,Nr=null,Dr=null,zr={namespace:"archive-report",beforeEnter:function(){},afterEnter:function(t){var e=t.next.container;e.querySelector("#js-pagination-select").addEventListener("change",Or)},beforeLeave:function(){},afterLeave:function(){Dr||(Ir.removeEventListener("mouseenter",Cr),Ir.removeEventListener("mouseleave",Rr)),Ir=null,Nr=null,Dr=null,null}},kr=(n("KKXr"),function(t){var e=t.previousElementSibling,n=t.selectedIndex,i=window.innerWidth,r=t.options[n].text;"知りたいエリアを選択"===r&&i>768?r="知りたい<br>エリアを選択":"自身の学年を選択"===r&&i>768?r="自身の<br>学年を選択":"知りたい情報を選択"===r&&i>768&&(r="知りたい<br>情報を選択"),e.innerHTML=r});window.matchMedia("(min-width: 768px)").addListener((function(){document.querySelectorAll("select.column__text").forEach((function(t){return kr(t)}))}));var Br=function(t,e){var n="/column";(function(t){var e=[];return Array.from(t).forEach((function(t){e.push(t.value)})),e})(t).forEach((function(t){n+="".concat(t)})),n=n.replace("//","/"),n=n+="/",e.setAttribute("href",n)},Fr=function(t){window.location.href=t.target.options[t.target.selectedIndex].value},Ur={namespace:"archive-column",beforeEnter:function(){},afterEnter:function(t){var e=t.next.container,n=e.querySelectorAll("select.column__text"),i=e.querySelector('select[name="column-pref"]'),r=e.querySelector('select[name="column-schoolyear"]'),o=e.querySelector('select[name="column-content"]'),s=e.querySelector(".js-column-filter-button"),a=e.querySelector(".button-clear"),l=location.pathname.split("/").filter(Boolean);l.splice(0,1);var c=[];for(var u in l.forEach((function(t,e){e%2==0?c[t]=t:c[l[e-1]]=t})),c)if("pref"===u){var h=i.querySelector('option[value="/'.concat(u,"/").concat(c[u],'"]'));i.selectedIndex=h.index}else if("school-year"===u){var d=r.querySelector('option[value="/'.concat(u,"/").concat(c[u],'"]'));r.selectedIndex=d.index}else if("content"===u){var p=o.querySelector('option[value="/'.concat(u,"/").concat(c[u],'"]'));o.selectedIndex=p.index}Array.from(n).forEach((function(t){kr(t),t.addEventListener("change",(function(t){Br(n,s),kr(t.target)}))})),a.addEventListener("click",(function(){Array.from(n).forEach((function(t){t.selectedIndex=0,kr(t)})),s.setAttribute("href","/column/")})),e.querySelector("#js-pagination-select").addEventListener("change",Fr)},beforeLeave:function(){},afterLeave:function(){null}};function jr(t,e){var n;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return Hr(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Hr(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,r=function(){};return{s:r,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return s=t.done,t},e:function(t){a=!0,o=t},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw o}}}}function Hr(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}var Gr={namespace:"page-waseda_form-confirm",beforeEnter:function(t){t.next.container.querySelector("#js-form-checkbox").removeAttribute("required")},afterEnter:function(t){var e=t.next.container,n=e.querySelector('button[type="submit"]'),i=e.querySelector(".overlay");n.addEventListener("click",(function(){i.classList.add("is-active")}));var r,o=jr(e.querySelectorAll(".is-no-after"));try{for(o.s();!(r=o.n()).done;){var s=r.value,a=s.getAttribute("data-confirm-target");if(""!=a){var l=!0,c=t.next.container.querySelectorAll("input[name="+a+"]");c.length>1?t.next.containerquerySelectorAll(".gender-checked").length>0&&(l=!1):""!=c[0].value&&(l=!1),!1===l&&s.classList.remove("is-no-after")}}}catch(t){o.e(t)}finally{o.f()}var u=document.querySelector('[name="inquiry_content"]'),h=document.getElementById("js-form-display-target-required"),d=document.getElementById("js-form-display-target-any");"資料請求"===u.value?(h.style.display="block",d.style.display="none"):(h.style.display="none",d.style.display="block")},beforeLeave:function(){},afterLeave:function(){}},Vr=(n("OG14"),function(t){var e=function(t,e){var n=document.createElement("option");return n.value=t,n.innerHTML=e,n.defaultSelected=o==t,n.disabled=!1,n},n=t.next.container.querySelector("#js-prefecture").value,i=window.pref_schools[n];""==n&&(i=window.pref_schools.saitama.concat(window.pref_schools.tochigi).concat(window.pref_schools.gunma));var r=t.next.container.querySelector("#js-school_building"),o=r.value;for(var s in r.innerHTML="",r.appendChild(e("","選択してください")),i)r.appendChild(e(i[s].id,i[s].name))}),Wr=null,qr=null,Xr=function(t,e){t.checkValidity()?e.removeAttribute("disabled"):e.setAttribute("disabled","disabled")},Yr=null,Zr=document.getElementById("js-inquiry-content"),Jr=document.getElementById("js-form-display-target-required"),Kr=document.querySelectorAll("#js-form-display-target-required input");document.addEventListener("DOMContentLoaded",(function(){var t=document.getElementById("js-inquiry-content"),e=window.location.search;if(e.includes("?type=summer")&&t){var n=t.querySelector("option[value='お問い合わせ(夏期講習)']");n&&(n.selected=!0)}if(e.includes("?type=winter")&&t){var i=t.querySelector("option[value='お問い合わせ(冬期講習)']");i&&(i.selected=!0)}if(e.includes("?type=spring")&&t){var r=t.querySelector("option[value='お問い合わせ(春期講習)']");r&&(r.selected=!0)}if(e.includes("?type=experience")&&t){var o=t.querySelector("option[value='無料体験受付中']");o&&(o.selected=!0)}}));var $r=document.getElementById("js-form-display-target-any"),Qr=function(){Jr.style.display="none",$r.style.display="block",Kr.forEach((function(t){t.removeAttribute("required")}))},to={namespace:"page-waseda_form",beforeEnter:function(t){var e=t.next.container;e.querySelector("#js-form-checkbox").setAttribute("required",!0),Wr=e.querySelector("form"),qr=Wr.querySelector('[type="submit"]'),Yr=Xr.bind(null,Wr,qr),Wr.addEventListener("change",Yr),Yr()},afterEnter:function(t){var e=document.body.dataset.themeUrl+"api/school-json.php",n=new XMLHttpRequest;n.onreadystatechange=function(){4==n.readyState&&200==n.status&&(window.pref_schools=JSON.parse(n.responseText),this.pref=t.next.container.querySelector("#js-prefecture"),this.prefChangeEvent=Vr.bind(this,t),this.pref.addEventListener("change",this.prefChangeEvent),Vr(t))},n.open("GET",e,!1),n.send(null),Qr(),Zr.addEventListener("change",Qr)},beforeLeave:function(){},afterLeave:function(){Wr.removeEventListener("change",Yr),Wr=null,qr=null,Yr=null,this.pref.removeEventListener("change",this.prefChangeEvent)}};function eo(t){return function(t){if(Array.isArray(t))return no(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return no(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return no(t,e)}(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 no(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}var io=null,ro=null,oo=new U.a((function(t){ne(t[0].contentRect)})),so=[],ao=null,lo=function(){var t={speed:300,loop:so.length>1,slidesPerView:"auto",centeredSlides:!0,watchOverflow:!0,autoplay:{delay:3e3},wrapperClass:"sliderBanner__list",slideClass:"sliderBanner__item",navigation:{nextEl:".sliderBanner__next-button",prevEl:".sliderBanner__prev-button"},breakpoints:{768:{loop:so.length>2,slidesOffsetBefore:20,slidesOffsetAfter:20,centeredSlides:!1,allowTouchMove:!1,spaceBetween:10}},on:{init:function(){var t=2;"max"==this.currentBreakpoint&&(t=1),so.length<=t&&(document.querySelector(".js-sliderBanner__body").classList.add("is-no__slide"),this.params.autoplay=!1,this.params.loop=!1)}}};ao&&ao.destroy(),ao=new Nt(".sliderBanner__body",t)};Nt.use([kt,Ut]);var co=null,uo=null,ho=document.querySelectorAll(".tab-trigger"),po=document.querySelectorAll(".tab-target");Array.from(ho).forEach((function(t){t.addEventListener("click",(function(t){!function(t){Array.from(ho).forEach((function(t){t.classList.remove("is-active")})),Array.from(po).forEach((function(t){t.classList.remove("is-active")})),t.target.classList.add("is-active");var e=[].slice.call(ho).indexOf(t.target);po[e].classList.add("is-active")}(t)}))}));var fo={namespace:"page-course",beforeEnter:function(t){var e=t.next.container;co=new Li.a({threshold:550},eo(e.querySelectorAll(".lazy")));var n=e.querySelector("#js-school_tabs");n&&n.classList.contains("is-course")&&(uo=ki(e)),io=e.querySelector("#js-canvas-chuko-wrapper"),ro=e.querySelector("#js-canvas-chuko"),oo.observe(io),Qt(ro),te()},afterEnter:function(t){var e=t.next.container;e.querySelectorAll(".js-reasons-item").forEach((function(t){t.querySelector(".js-reasons-button").addEventListener("click",(function(e){e.preventDefault(),t.classList.toggle("active");var n=t.querySelector(".js-reasons-content");t.classList.contains("active")?n.style.maxHeight=n.scrollHeight+"px":n.style.maxHeight="0"}))})),(so=eo(e.querySelectorAll(".js-sliderBanner__item"))).length>2?e.querySelector(".js-sliderBanner__body").classList.add("loopTrue"):e.querySelector(".js-sliderBanner__body").classList.add("loopFalse"),so.length&&(window.wasedazemi.mql.addListener?window.wasedazemi.mql.addListener(lo):window.wasedazemi.mql.addEventListener("change",lo),lo())},beforeLeave:function(){},afterLeave:function(){co.destroy(),co=null,so.length&&(window.wasedazemi.mql.addListener?window.wasedazemi.mql.removeListener(lo):window.wasedazemi.mql.removeEventListener("change",lo),ao.destroy()),so=[],uo&&(uo(),uo=null),ee(),ie(),oo.unobserve(io)}},mo=function(t){var e=function(t,e){var n=document.createElement("option");return n.value=""==t?"":e,n.innerHTML=e,n.defaultSelected=o==e,n.disabled=!1,n},n=t.next.container.querySelector("#js-prefecture").value,i=window.pref_schools[n];""==n&&(i=window.pref_schools["埼玉県"].concat(window.pref_schools["栃木県"]).concat(window.pref_schools["群馬県"]));var r=t.next.container.querySelector("#js-school_building"),o=r.value,s=t.next.container.querySelector("#js-grade_selection").value;for(var a in r.innerHTML="",r.appendChild(e("","校舎を選択してください")),i){if(-1!=s.indexOf("高校")){if(-1==i[a].name.indexOf("ハイスクール")&&"高等部 熊女館"!=i[a].name)continue}else if(-1!=s.indexOf("小学")){if(-1!=i[a].name.indexOf("ハイスクール")||"高等部 熊女館"==i[a].name)continue}else if(-1!=s.indexOf("中学")&&(-1!=i[a].name.indexOf("ハイスクール")||"高等部 熊女館"==i[a].name))continue;r.appendChild(e(a,i[a].name))}},go=document.getElementById("js-inquiry-content"),vo=document.getElementById("js-form-display-target-required"),yo=document.querySelectorAll("#js-form-display-target-required input"),bo=document.getElementById("js-form-display-target-any"),xo=function(t){3===(void 0===t?go.selectedIndex:t.target.selectedIndex)?(vo.style.display="block",bo.style.display="none",yo.forEach((function(t){t.setAttribute("required",!0)}))):(vo.style.display="none",bo.style.display="block",yo.forEach((function(t){t.removeAttribute("required")})))},wo={namespace:"page-2021-spring-form",beforeEnter:function(t){t.next.container.querySelector("#js-form-checkbox").setAttribute("required",!0)},afterEnter:function(t){var e=document.body.dataset.themeUrl+"api/2021-spring-json.php",n=new XMLHttpRequest;n.onreadystatechange=function(){4==n.readyState&&200==n.status&&(window.pref_schools=JSON.parse(n.responseText),this.pref=t.next.container.querySelector("#js-prefecture"),this.grande=t.next.container.querySelector("#js-grade_selection"),this.prefChangeEvent=mo.bind(this,t),this.grandeChangeEvent=mo.bind(this,t),this.pref.addEventListener("change",this.prefChangeEvent),this.grande.addEventListener("change",this.grandeChangeEvent),mo(t))},n.open("GET",e,!1),n.send(null),xo(),go.addEventListener("change",xo)},beforeLeave:function(){},afterLeave:function(){go.removeEventListener("change",xo),this.pref.removeEventListener("change",this.prefChangeEvent),this.grande.removeEventListener("change",this.grandeChangeEvent)}},_o=document.querySelector('[name="inquiry_content"]'),So=document.getElementById("js-form-display-target-required"),Mo=document.getElementById("js-form-display-target-any"),Eo={namespace:"page-2021-spring-form-confirm",beforeEnter:function(){},afterEnter:function(){"資料請求"===_o.value?(So.style.display="block",Mo.style.display="none"):(So.style.display="none",Mo.style.display="block")},beforeLeave:function(){},afterLeave:function(){}};function To(t){return function(t){if(Array.isArray(t))return Lo(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||Ao(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 Ao(t,e){if(t){if("string"==typeof t)return Lo(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)?Lo(t,e):void 0}}function Lo(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}var Po,Co,Ro=[],Oo=null,Io=function(){var t,e=function(t,e){var n;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=Ao(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,r=function(){};return{s:r,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return s=t.done,t},e:function(t){a=!0,o=t},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw o}}}}(Ro);try{for(e.s();!(t=e.n()).done;){t.value.classList.add("is-active")}}catch(t){e.e(t)}finally{e.f()}setTimeout((function(){Oo.classList.add("is-active")}),100)},No=null,Do=[],zo=null,ko=null,Bo=0,Fo=0,Uo=0,jo=null,Ho=null,Go=null,Vo=function(t){Ho&&Ho.classList.toggle("is-active",t.isIntersecting)},Wo=function t(){if(No.classList.contains("is-active")&&Bo%30==0){Do[Fo%2].style.display="none",Do[(Fo+1)%2].style.display="block",Fo++;var e=window.wasedazemi.mql.matches?13:3;if(Uo<e){for(var n=[zo.cloneNode(!0),zo.cloneNode(!0)],i=0;i<n.length;i++){var r=120*(Uo+1)*(i-.5)*2;n[i].style.transform="translateX(".concat(r,"%)"),zo.after(n[i])}Uo++}}Bo++,requestAnimationFrame(t)},qo={namespace:"page-2021-summer",beforeEnter:function(t){var e=t.next.container;Oo=e.querySelector(".js-mv-content"),Ro=To(e.querySelectorAll(".js-mv-animation")),new Ci.a(To(e.querySelectorAll(".mv")),{background:!0},Io),No=e.querySelector(".js-result-cheer"),Do[0]=e.querySelector("#js-result-cheer-man01"),Do[1]=e.querySelector("#js-result-cheer-man02"),zo=e.querySelector(".js-result-cheer-voice"),ko=requestAnimationFrame(Wo),jo=e.querySelector('[data-intersection="sticky-footer"]'),Ho=document.querySelector(".js-sticky-footer"),Go=Object(p.a)(jo,Vo)},afterEnter:function(){},beforeLeave:function(){},afterLeave:function(){cancelAnimationFrame(ko),Go(),jo=null,Ho=null,Go=null}},Xo=function(t){var e=function(t,e){var n=document.createElement("option");return n.value=t,n.innerHTML=e,n.defaultSelected=o==t,n.disabled=!1,n},n=t.next.container.querySelector("#js-prefecture").value,i=window.pref_schools[n];""==n&&(i=window.pref_schools.saitama.concat(window.pref_schools.tochigi).concat(window.pref_schools.gunma));var r=t.next.container.querySelector("#js-school_building"),o=r.value;for(var s in r.innerHTML="",r.appendChild(e("","選択してください")),i)r.appendChild(e(i[s].id,i[s].name))},Yo=null,Zo=null,Jo=function(t,e){t.checkValidity()?e.removeAttribute("disabled"):e.setAttribute("disabled","disabled")},Ko=null,$o=document.getElementById("js-inquiry-content"),Qo=document.getElementById("js-form-display-target-required"),ts=document.querySelectorAll("#js-form-display-target-required input"),es=document.getElementById("js-form-display-target-any"),ns=function(t){2===(void 0===t?$o.selectedIndex:t.target.selectedIndex)?(Qo.style.display="block",es.style.display="none",ts.forEach((function(t){t.setAttribute("required",!0)}))):(Qo.style.display="none",es.style.display="block",ts.forEach((function(t){t.removeAttribute("required")})))},is={namespace:"page-2021-summer-form",beforeEnter:function(t){var e=t.next.container;e.querySelector("#js-form-checkbox").setAttribute("required",!0),Yo=e.querySelector("form"),Zo=Yo.querySelector('[type="submit"]'),Ko=Jo.bind(null,Yo,Zo),Yo.addEventListener("change",Ko),Ko(),ns(),$o.addEventListener("change",ns)},afterEnter:function(t){var e=document.body.dataset.themeUrl+"api/school-json.php?type=normal",n=new XMLHttpRequest;n.onreadystatechange=function(){4==n.readyState&&200==n.status&&(window.pref_schools=JSON.parse(n.responseText),this.pref=t.next.container.querySelector("#js-prefecture"),this.prefChangeEvent=Xo.bind(this,t),this.pref.addEventListener("change",this.prefChangeEvent),Xo(t))},n.open("GET",e,!1),n.send(null),ns(),$o.addEventListener("change",ns)},beforeLeave:function(){},afterLeave:function(){Yo.removeEventListener("change",Ko),Yo=null,Zo=null,Ko=null,$o.removeEventListener("change",ns),this.pref.removeEventListener("change",this.prefChangeEvent)}},rs=document.querySelector('[name="inquiry_content"]'),os=document.getElementById("js-form-display-target-required"),ss=document.getElementById("js-form-display-target-any"),as={namespace:"page-2021-summer-form-confirm",beforeEnter:function(){},afterEnter:function(){"資料請求"===rs.value?(os.style.display="block",ss.style.display="none"):(os.style.display="none",ss.style.display="block")},beforeLeave:function(){},afterLeave:function(){}},ls=null,cs=null,us=null,hs=function(t){cs&&cs.classList.toggle("is-active",t.isIntersecting)},ds={namespace:"single-new-building",beforeEnter:function(t){var e=t.next.container;ls=e.querySelector('[data-intersection="sticky-footer"]'),cs=document.querySelector(".js-sticky-footer"),us=Object(p.a)(ls,hs)},afterEnter:function(){},beforeLeave:function(){},afterLeave:function(){us(),ls=null,cs=null,us=null}},ps=document.querySelector(".js-header__border"),fs="js-header__border-loading--once",ms="js-header__border-loading--loop",gs=!1;ps.addEventListener("animationend",(function(){ps.classList.contains(fs)&&(ps.classList.remove(fs),gs&&ps.classList.add(ms))})),r.a.polyfill(),window.wasedazemi={mql:matchMedia("(min-width: 768px)"),keyVisualPlayed:!1},Po=navigator.userAgent,Co=!(Po.indexOf("iPhone")>-1||Po.indexOf("Android")>-1&&Po.indexOf("Mobile")>-1)&&(Po.indexOf("iPad")>-1||Po.indexOf("Macintosh")>-1&&"ontouchend"in document||Po.indexOf("Android")>-1),new h.a(Co?1440:375),o&&document.documentElement.classList.add("is-win"),-1===document.cookie.indexOf("wp_user_logged_in")&&a.a.use(c.a),a.a.hooks.beforeEnter(z),a.a.hooks.afterEnter(k),a.a.hooks.beforeLeave(B),a.a.hooks.afterLeave(F),a.a.init({prevent:function(t){var e=t.href,n=["".concat(location.origin,"/"),"".concat(location.origin,"/guidance/"),"".concat(location.origin,"/school-area/"),"".concat(location.origin,"/results/"),"".concat(location.origin,"/highschool/"),"".concat(location.origin,"/elementary/"),"".concat(location.origin,"/jrhighschool/"),"".concat(location.origin,"/highschool/?type=session"),"".concat(location.origin,"/elementary/?type=session"),"".concat(location.origin,"/jrhighschool/?type=session"),"".concat(location.origin,"/chuko/?type=session"),"".concat(location.origin,"/waseda-form/?type=document"),"".concat(location.origin,"/waseda-form/?type=experience"),"".concat(location.origin,"/waseda-form/?type=contact"),"".concat(location.origin,"/success/"),"".concat(location.origin,"/column/"),"".concat(location.origin,"/qa/")],i=new RegExp("^".concat(location.origin,"/school-area/.*$")),r=new RegExp("^".concat(location.origin,"/new-building/.*$"));return n.includes(e)||n.includes(location.href)||i.test(e)||r.test(e)},views:[Qn,ii,{namespace:"page-guidance",beforeEnter:function(){},afterEnter:function(){},beforeLeave:function(){},afterLeave:function(){}},hi,wi,{namespace:"page-qa",beforeEnter:function(){},afterEnter:function(){},beforeLeave:function(){},afterLeave:function(){}},or,dr,_r,Pr,zr,{namespace:"page-waseda_form-complete",beforeEnter:function(){},afterEnter:function(){},beforeLeave:function(){},afterLeave:function(){}},Gr,to,{namespace:"archive-news",beforeEnter:function(){},afterEnter:function(){},beforeLeave:function(){},afterLeave:function(){}},{namespace:"page-company",beforeEnter:function(){},afterEnter:function(){},beforeLeave:function(){},afterLeave:function(){}},{namespace:"page-privacypolicy",beforeEnter:function(){},afterEnter:function(){},beforeLeave:function(){},afterLeave:function(){}},{namespace:"single-news",beforeEnter:function(){},afterEnter:function(){},beforeLeave:function(){},afterLeave:function(){}},fo,ii,ai,{namespace:"404",beforeEnter:function(){},afterEnter:function(){},beforeLeave:function(){},afterLeave:function(){}},wo,Eo,qo,is,as,Ur,ds],timeout:6e4,transitions:[{name:"header-border-animation",leave:function(){ps.classList.remove(fs),ps.classList.remove(ms),gs=!0,setTimeout((function(){ps.classList.add(fs)}))},enter:function(){gs=!1,ps.classList.remove(ms)}}]})},FJW5:function(t,e,n){var i=n("hswa"),r=n("y3w9"),o=n("DVgA");t.exports=n("nh4g")?Object.defineProperties:function(t,e){r(t);for(var n,s=o(e),a=s.length,l=0;a>l;)i.f(t,n=s[l++],e[n]);return t}},GUwg:function(t,e){},H6hf:function(t,e,n){var i=n("y3w9");t.exports=function(t,e,n,r){try{return r?e(i(n)[0],n[1]):e(n)}catch(e){var o=t.return;throw void 0!==o&&i(o.call(t)),e}}},HEwt:function(t,e,n){"use strict";var i=n("m0Pp"),r=n("XKFU"),o=n("S/j/"),s=n("H6hf"),a=n("M6Qj"),l=n("ne8i"),c=n("8a7r"),u=n("J+6e");r(r.S+r.F*!n("XMVh")((function(t){Array.from(t)})),"Array",{from:function(t){var e,n,r,h,d=o(t),p="function"==typeof this?this:Array,f=arguments.length,m=f>1?arguments[1]:void 0,g=void 0!==m,v=0,y=u(d);if(g&&(m=i(m,f>2?arguments[2]:void 0,2)),null==y||p==Array&&a(y))for(n=new p(e=l(d.length));e>v;v++)c(n,v,g?m(d[v],v):d[v]);else for(h=y.call(d),n=new p;!(r=h.next()).done;v++)c(n,v,g?s(h,m,[r.value,v],!0):r.value);return n.length=v,n}})},HToz:function(t,e,n){t.exports=function(){"use strict";function t(){return(t=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(this,arguments)}var e="undefined"!=typeof window,n=e&&!("onscroll"in window)||"undefined"!=typeof navigator&&/(gle|ing|ro)bot|crawl|spider/i.test(navigator.userAgent),i=e&&"IntersectionObserver"in window,r=e&&"classList"in document.createElement("p"),o=e&&window.devicePixelRatio>1,s={elements_selector:".lazy",container:n||e?document:null,threshold:300,thresholds:null,data_src:"src",data_srcset:"srcset",data_sizes:"sizes",data_bg:"bg",data_bg_hidpi:"bg-hidpi",data_bg_multi:"bg-multi",data_bg_multi_hidpi:"bg-multi-hidpi",data_poster:"poster",class_applied:"applied",class_loading:"loading",class_loaded:"loaded",class_error:"error",class_entered:"entered",class_exited:"exited",unobserve_completed:!0,unobserve_entered:!1,cancel_on_exit:!0,callback_enter:null,callback_exit:null,callback_applied:null,callback_loading:null,callback_loaded:null,callback_error:null,callback_finish:null,callback_cancel:null,use_native:!1},a=function(e){return t({},s,e)},l=function(t,e){var n,i="LazyLoad::Initialized",r=new t(e);try{n=new CustomEvent(i,{detail:{instance:r}})}catch(t){(n=document.createEvent("CustomEvent")).initCustomEvent(i,!1,!1,{instance:r})}window.dispatchEvent(n)},c="loading",u="loaded",h="applied",d="error",p="native",f=function(t,e){return t.getAttribute("data-"+e)},m=function(t){return f(t,"ll-status")},g=function(t,e){return function(t,e,n){var i="data-ll-status";null!==n?t.setAttribute(i,n):t.removeAttribute(i)}(t,0,e)},v=function(t){return g(t,null)},y=function(t){return null===m(t)},b=function(t){return m(t)===p},x=[c,u,h,d],w=function(t,e,n,i){t&&(void 0===i?void 0===n?t(e):t(e,n):t(e,n,i))},_=function(t,e){r?t.classList.add(e):t.className+=(t.className?" ":"")+e},S=function(t,e){r?t.classList.remove(e):t.className=t.className.replace(new RegExp("(^|\\s+)"+e+"(\\s+|$)")," ").replace(/^\s+/,"").replace(/\s+$/,"")},M=function(t){return t.llTempImage},E=function(t,e){if(e){var n=e._observer;n&&n.unobserve(t)}},T=function(t,e){t&&(t.loadingCount+=e)},A=function(t,e){t&&(t.toLoadCount=e)},L=function(t){for(var e,n=[],i=0;e=t.children[i];i+=1)"SOURCE"===e.tagName&&n.push(e);return n},P=function(t,e,n){n&&t.setAttribute(e,n)},C=function(t,e){t.removeAttribute(e)},R=function(t){return!!t.llOriginalAttrs},O=function(t){if(!R(t)){var e={};e.src=t.getAttribute("src"),e.srcset=t.getAttribute("srcset"),e.sizes=t.getAttribute("sizes"),t.llOriginalAttrs=e}},I=function(t){if(R(t)){var e=t.llOriginalAttrs;P(t,"src",e.src),P(t,"srcset",e.srcset),P(t,"sizes",e.sizes)}},N=function(t,e){P(t,"sizes",f(t,e.data_sizes)),P(t,"srcset",f(t,e.data_srcset)),P(t,"src",f(t,e.data_src))},D=function(t){C(t,"src"),C(t,"srcset"),C(t,"sizes")},z=function(t,e){var n=t.parentNode;n&&"PICTURE"===n.tagName&&L(n).forEach(e)},k={IMG:function(t,e){z(t,(function(t){O(t),N(t,e)})),O(t),N(t,e)},IFRAME:function(t,e){P(t,"src",f(t,e.data_src))},VIDEO:function(t,e){!function(t,n){L(t).forEach((function(t){P(t,"src",f(t,e.data_src))}))}(t),P(t,"poster",f(t,e.data_poster)),P(t,"src",f(t,e.data_src)),t.load()}},B=function(t,e){var n=k[t.tagName];n&&n(t,e)},F=function(t,e,n){T(n,1),_(t,e.class_loading),g(t,c),w(e.callback_loading,t,n)},U=["IMG","IFRAME","VIDEO"],j=function(t,e){!e||function(t){return t.loadingCount>0}(e)||function(t){return t.toLoadCount>0}(e)||w(t.callback_finish,e)},H=function(t,e,n){t.addEventListener(e,n),t.llEvLisnrs[e]=n},G=function(t,e,n){t.removeEventListener(e,n)},V=function(t){return!!t.llEvLisnrs},W=function(t){if(V(t)){var e=t.llEvLisnrs;for(var n in e){var i=e[n];G(t,n,i)}delete t.llEvLisnrs}},q=function(t,e,n){!function(t){delete t.llTempImage}(t),T(n,-1),function(t){t&&(t.toLoadCount-=1)}(n),S(t,e.class_loading),e.unobserve_completed&&E(t,n)},X=function(t,e,n){var i=M(t)||t;V(i)||function(t,e,n){V(t)||(t.llEvLisnrs={});var i="VIDEO"===t.tagName?"loadeddata":"load";H(t,i,e),H(t,"error",n)}(i,(function(r){!function(t,e,n,i){var r=b(e);q(e,n,i),_(e,n.class_loaded),g(e,u),w(n.callback_loaded,e,i),r||j(n,i)}(0,t,e,n),W(i)}),(function(r){!function(t,e,n,i){var r=b(e);q(e,n,i),_(e,n.class_error),g(e,d),w(n.callback_error,e,i),r||j(n,i)}(0,t,e,n),W(i)}))},Y=function(t,e,n){!function(t){return U.indexOf(t.tagName)>-1}(t)?function(t,e,n){!function(t){t.llTempImage=document.createElement("IMG")}(t),X(t,e,n),function(t,e,n){var i=f(t,e.data_bg),r=f(t,e.data_bg_hidpi),s=o&&r?r:i;s&&(t.style.backgroundImage='url("'.concat(s,'")'),M(t).setAttribute("src",s),F(t,e,n))}(t,e,n),function(t,e,n){var i=f(t,e.data_bg_multi),r=f(t,e.data_bg_multi_hidpi),s=o&&r?r:i;s&&(t.style.backgroundImage=s,function(t,e,n){_(t,e.class_applied),g(t,h),e.unobserve_completed&&E(t,e),w(e.callback_applied,t,n)}(t,e,n))}(t,e,n)}(t,e,n):function(t,e,n){X(t,e,n),B(t,e),F(t,e,n)}(t,e,n)},Z=["IMG","IFRAME"],J=function(t){return t.use_native&&"loading"in HTMLImageElement.prototype},K=function(t){return Array.prototype.slice.call(t)},$=function(t){return t.container.querySelectorAll(t.elements_selector)},Q=function(t){return function(t){return m(t)===d}(t)},tt=function(t,e){return function(t){return K(t).filter(y)}(t||$(e))},et=function(t,n){var r=a(t);this._settings=r,this.loadingCount=0,function(t,e){i&&!J(t)&&(e._observer=new IntersectionObserver((function(n){!function(t,e,n){t.forEach((function(t){return function(t){return t.isIntersecting||t.intersectionRatio>0}(t)?function(t,e,n,i){g(t,"entered"),_(t,n.class_entered),S(t,n.class_exited),function(t,e,n){e.unobserve_entered&&E(t,n)}(t,n,i),w(n.callback_enter,t,e,i),function(t){return x.indexOf(m(t))>=0}(t)||Y(t,n,i)}(t.target,t,e,n):function(t,e,n,i){y(t)||(_(t,n.class_exited),function(t,e,n,i){n.cancel_on_exit&&function(t){return m(t)===c}(t)&&"IMG"===t.tagName&&(W(t),function(t){z(t,(function(t){D(t)})),D(t)}(t),function(t){z(t,(function(t){I(t)})),I(t)}(t),S(t,n.class_loading),T(i,-1),v(t),w(n.callback_cancel,t,e,i))}(t,e,n,i),w(n.callback_exit,t,e,i))}(t.target,t,e,n)}))}(n,t,e)}),function(t){return{root:t.container===document?null:t.container,rootMargin:t.thresholds||t.threshold+"px"}}(t)))}(r,this),function(t,n){e&&window.addEventListener("online",(function(){!function(t,e){var n;(n=$(t),K(n).filter(Q)).forEach((function(e){S(e,t.class_error),v(e)})),e.update()}(t,n)}))}(r,this),this.update(n)};return et.prototype={update:function(t){var e,r,o=this._settings,s=tt(t,o);A(this,s.length),!n&&i?J(o)?function(t,e,n){t.forEach((function(t){-1!==Z.indexOf(t.tagName)&&(t.setAttribute("loading","lazy"),function(t,e,n){X(t,e,n),B(t,e),g(t,p)}(t,e,n))})),A(n,0)}(s,o,this):(r=s,function(t){t.disconnect()}(e=this._observer),function(t,e){e.forEach((function(e){t.observe(e)}))}(e,r)):this.loadAll(s)},destroy:function(){this._observer&&this._observer.disconnect(),$(this._settings).forEach((function(t){delete t.llOriginalAttrs})),delete this._observer,delete this._settings,delete this.loadingCount,delete this.toLoadCount},loadAll:function(t){var e=this,n=this._settings;tt(t,n).forEach((function(t){E(t,e),Y(t,n,e)}))}},et.load=function(t,e){var n=a(e);Y(t,n)},et.resetStatus=function(t){v(t)},e&&function(t,e){if(e)if(e.length)for(var n,i=0;n=e[i];i+=1)l(t,n);else l(t,e)}(et,window.lazyLoadOptions),et}()},"I8a+":function(t,e,n){var i=n("LZWt"),r=n("K0xU")("toStringTag"),o="Arguments"==i(function(){return arguments}());t.exports=function(t){var e,n,s;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),r))?n:o?i(e):"Object"==(s=i(e))&&"function"==typeof e.callee?"Arguments":s}},"IU+Z":function(t,e,n){"use strict";n("sMXx");var i=n("KroJ"),r=n("Mukb"),o=n("eeVq"),s=n("vhPU"),a=n("K0xU"),l=n("Ugos"),c=a("species"),u=!o((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})),h=function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2===n.length&&"a"===n[0]&&"b"===n[1]}();t.exports=function(t,e,n){var d=a(t),p=!o((function(){var e={};return e[d]=function(){return 7},7!=""[t](e)})),f=p?!o((function(){var e=!1,n=/a/;return n.exec=function(){return e=!0,null},"split"===t&&(n.constructor={},n.constructor[c]=function(){return n}),n[d](""),!e})):void 0;if(!p||!f||"replace"===t&&!u||"split"===t&&!h){var m=/./[d],g=n(s,d,""[t],(function(t,e,n,i,r){return e.exec===l?p&&!r?{done:!0,value:m.call(e,n,i)}:{done:!0,value:t.call(n,e,i)}:{done:!1}})),v=g[0],y=g[1];i(String.prototype,t,v),r(RegExp.prototype,d,2==e?function(t,e){return y.call(t,this,e)}:function(t){return y.call(t,this)})}}},IdG6:function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n("Womt");function r(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)}}var o=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.canvasEl=e,this.canvasWrapperEl=n,this.canvasSize={w:this.canvasWrapperEl.clientWidth,h:this.canvasWrapperEl.clientHeight},this.renderer=new i.m({canvas:this.canvasEl}),this.renderer.setPixelRatio(window.devicePixelRatio),this.renderer.setSize(this.canvasSize.w,this.canvasSize.h),this.scene=new i.i;var r=Math.PI/180*22.5,o=this.canvasSize.h/2/Math.tan(r);this.camera=new i.g(45,this.canvasSize.w/this.canvasSize.h,.1,1e4),this.camera.position.z=o}var e,n,o;return e=t,(n=[{key:"loop",value:function(){this.renderer.render(this.scene,this.camera)}},{key:"resize",value:function(){var t=this.canvasWrapperEl.clientWidth,e=this.canvasWrapperEl.clientHeight;this.canvasSize.w=t,this.canvasSize.h=e,this.renderer.setPixelRatio(window.devicePixelRatio),this.renderer.setSize(t,e),this.camera.aspect=t/e,this.camera.updateProjectionMatrix();var n=Math.PI/180*22.5,i=this.canvasSize.h/2/Math.tan(n);this.camera.position.z=i}}])&&r(e.prototype,n),o&&r(e,o),t}()},Iw71:function(t,e,n){var i=n("0/R4"),r=n("dyZX").document,o=i(r)&&i(r.createElement);t.exports=function(t){return o?r.createElement(t):{}}},"J+6e":function(t,e,n){var i=n("I8a+"),r=n("K0xU")("iterator"),o=n("hPIQ");t.exports=n("g3g5").getIteratorMethod=function(t){if(null!=t)return t[r]||t["@@iterator"]||o[i(t)]}},J1uU:function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n("Womt"),r=n("k0mU"),o=function(t){for(var e={uTiltX:{value:window.innerWidth<768?.1:.25}},n=new r.a(t,{meshNum:1,instanceNum:200,particleWidth:18,particleHeight:28.8,fallSpeed:{max:.1,min:.05},rotateSpeed:{max:.2,min:.1},shrinkRate:{max:1,min:.3},positionRangeRatio:.2,color:new i.a(16436736),vertexShader:"\n    attribute vec3 offsetPosition;\n    attribute vec3 initialRotate; // 回転の初期値\n    attribute float fallSpeed;\n    attribute float rotateSpeed;\n    attribute float shrinkRate;\n\n    varying vec2 vUv;\n\n    uniform float uTime;\n    uniform vec2 windowSize;\n    uniform float uTiltX;\n\n    highp mat2 rotate(float rad){\n        return mat2(cos(rad),sin(rad),-sin(rad),cos(rad));\n    }\n\n    void main() {\n        vUv = uv;\n        vec3 originPos = position * shrinkRate; // 大きさをばらつかせる\n        vec3 offsetPos = offsetPosition;\n\n        // 回転角に初期値を足しておくことで開始角をずらす\n        float angleX = initialRotate.x + uTime * rotateSpeed;\n        float angleY = initialRotate.y + uTime * rotateSpeed;\n        float angleZ = initialRotate.z + uTime * rotateSpeed;\n\n        // 回転\n        originPos.xz *= rotate(angleZ);\n        originPos.xy *= rotate(angleY);\n\n        // 下降\n        float visibleAreaY = windowSize.y * 2.0; // パーティクルは画面高さの2倍まで（上下で4倍）表示、超えたら消えて反対から出てくる\n        float initialPercent = offsetPosition.y / visibleAreaY; // 初期位置の画面内での割合\n        float currentPercent = (uTime / 100.0) * fallSpeed + initialPercent;\n        offsetPos.y = -(fract(currentPercent) - 0.5) * visibleAreaY; // fractの結果を-0.5~0.5にして表示エリアの分拡大\n        \n        // 中央に向かう\n        float moveX = offsetPos.x / abs(offsetPos.x) * uTiltX; // 中心に向かうようなx方向を決めるプラスマイナス判定\n        offsetPos.x += -(fract(currentPercent) - 0.5) * visibleAreaY  * moveX; // 上下の動きに連動させて横移動を足す\n\n        vec4 mvPosition = modelViewMatrix * vec4(originPos + offsetPos, 1.0);\n        gl_Position = projectionMatrix * mvPosition;\n    }\n    ",fragmentShader:"\n    uniform vec3 uColor;\n    varying vec2 vUv;\n\n    void main() {\n        vec2 uv = vUv;\n        vec3 color = uColor;\n\n\n        // カーブの光沢っぽいグラデーションをかける\n        float y = sin(uv.y * 6.0 - 1.5) ;\n        vec3 light = vec3(1.0);\n\n        gl_FragColor = vec4( color * (1.0 - y) + light * y ,1.0);\n    }\n    ",optionalUniforms:e}),o=n.geometry.attributes.position,s=0;s<o.count;s++){var a=o.getY(s),l=o.getZ(s);n.geometry.attributes.position.setZ(s,l+10*Math.cos(a/20))}return n}},JiEa:function(t,e){e.f=Object.getOwnPropertySymbols},K0xU:function(t,e,n){var i=n("VTer")("wks"),r=n("ylqs"),o=n("dyZX").Symbol,s="function"==typeof o;(t.exports=function(t){return i[t]||(i[t]=s&&o[t]||(s?o:r)("Symbol."+t))}).store=i},KKXr:function(t,e,n){"use strict";var i=n("quPj"),r=n("y3w9"),o=n("69bn"),s=n("A5AN"),a=n("ne8i"),l=n("Xxuz"),c=n("Ugos"),u=n("eeVq"),h=Math.min,d=[].push,p="length",f=!u((function(){RegExp(4294967295,"y")}));n("IU+Z")("split",2,(function(t,e,n,u){var m;return m="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1)[p]||2!="ab".split(/(?:ab)*/)[p]||4!=".".split(/(.?)(.?)/)[p]||".".split(/()()/)[p]>1||"".split(/.?/)[p]?function(t,e){var r=String(this);if(void 0===t&&0===e)return[];if(!i(t))return n.call(r,t,e);for(var o,s,a,l=[],u=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),h=0,f=void 0===e?4294967295:e>>>0,m=new RegExp(t.source,u+"g");(o=c.call(m,r))&&!((s=m.lastIndex)>h&&(l.push(r.slice(h,o.index)),o[p]>1&&o.index<r[p]&&d.apply(l,o.slice(1)),a=o[0][p],h=s,l[p]>=f));)m.lastIndex===o.index&&m.lastIndex++;return h===r[p]?!a&&m.test("")||l.push(""):l.push(r.slice(h)),l[p]>f?l.slice(0,f):l}:"0".split(void 0,0)[p]?function(t,e){return void 0===t&&0===e?[]:n.call(this,t,e)}:n,[function(n,i){var r=t(this),o=null==n?void 0:n[e];return void 0!==o?o.call(n,r,i):m.call(String(r),n,i)},function(t,e){var i=u(m,t,this,e,m!==n);if(i.done)return i.value;var c=r(t),d=String(this),p=o(c,RegExp),g=c.unicode,v=(c.ignoreCase?"i":"")+(c.multiline?"m":"")+(c.unicode?"u":"")+(f?"y":"g"),y=new p(f?c:"^(?:"+c.source+")",v),b=void 0===e?4294967295:e>>>0;if(0===b)return[];if(0===d.length)return null===l(y,d)?[d]:[];for(var x=0,w=0,_=[];w<d.length;){y.lastIndex=f?w:0;var S,M=l(y,f?d:d.slice(w));if(null===M||(S=h(a(y.lastIndex+(f?0:w)),d.length))===x)w=s(d,w,g);else{if(_.push(d.slice(x,w)),_.length===b)return _;for(var E=1;E<=M.length-1;E++)if(_.push(M[E]),_.length===b)return _;w=x=S}}return _.push(d.slice(x)),_}]}))},KroJ:function(t,e,n){var i=n("dyZX"),r=n("Mukb"),o=n("aagx"),s=n("ylqs")("src"),a=n("+lvF"),l=(""+a).split("toString");n("g3g5").inspectSource=function(t){return a.call(t)},(t.exports=function(t,e,n,a){var c="function"==typeof n;c&&(o(n,"name")||r(n,"name",e)),t[e]!==n&&(c&&(o(n,s)||r(n,s,t[e]?""+t[e]:l.join(String(e)))),t===i?t[e]=n:a?t[e]?t[e]=n:r(t,e,n):(delete t[e],r(t,e,n)))})(Function.prototype,"toString",(function(){return"function"==typeof this&&this[s]||a.call(this)}))},Kuth:function(t,e,n){var i=n("y3w9"),r=n("FJW5"),o=n("4R4u"),s=n("YTvA")("IE_PROTO"),a=function(){},l=function(){var t,e=n("Iw71")("iframe"),i=o.length;for(e.style.display="none",n("+rLv").appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),l=t.F;i--;)delete l.prototype[o[i]];return l()};t.exports=Object.create||function(t,e){var n;return null!==t?(a.prototype=i(t),n=new a,a.prototype=null,n[s]=t):n=l(),void 0===e?n:r(n,e)}},L9s1:function(t,e,n){"use strict";var i=n("XKFU"),r=n("0sh+");i(i.P+i.F*n("UUeW")("includes"),"String",{includes:function(t){return!!~r(this,t,"includes").indexOf(t,arguments.length>1?arguments[1]:void 0)}})},LQAc:function(t,e){t.exports=!1},LZWt:function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},LngM:function(t,e){},M6Qj:function(t,e,n){var i=n("hPIQ"),r=n("K0xU")("iterator"),o=Array.prototype;t.exports=function(t){return void 0!==t&&(i.Array===t||o[r]===t)}},Mukb:function(t,e,n){var i=n("hswa"),r=n("RjD/");t.exports=n("nh4g")?function(t,e,n){return i.f(t,e,r(1,n))}:function(t,e,n){return t[e]=n,t}},N8g3:function(t,e,n){e.f=n("K0xU")},Nr18:function(t,e,n){"use strict";var i=n("S/j/"),r=n("d/Gc"),o=n("ne8i");t.exports=function(t){for(var e=i(this),n=o(e.length),s=arguments.length,a=r(s>1?arguments[1]:void 0,n),l=s>2?arguments[2]:void 0,c=void 0===l?n:r(l,n);c>a;)e[a++]=t;return e}},OEbY:function(t,e,n){n("nh4g")&&"g"!=/./g.flags&&n("hswa").f(RegExp.prototype,"flags",{configurable:!0,get:n("C/va")})},OG14:function(t,e,n){"use strict";var i=n("y3w9"),r=n("g6HL"),o=n("Xxuz");n("IU+Z")("search",1,(function(t,e,n,s){return[function(n){var i=t(this),r=null==n?void 0:n[e];return void 0!==r?r.call(n,i):new RegExp(n)[e](String(i))},function(t){var e=s(n,t,this);if(e.done)return e.value;var a=i(t),l=String(this),c=a.lastIndex;r(c,0)||(a.lastIndex=0);var u=o(a,l);return r(a.lastIndex,c)||(a.lastIndex=c),null===u?-1:u.index}]}))},OP3Y:function(t,e,n){var i=n("aagx"),r=n("S/j/"),o=n("YTvA")("IE_PROTO"),s=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=r(t),i(t,o)?t[o]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?s:null}},OnI7:function(t,e,n){var i=n("dyZX"),r=n("g3g5"),o=n("LQAc"),s=n("N8g3"),a=n("hswa").f;t.exports=function(t){var e=r.Symbol||(r.Symbol=o?{}:i.Symbol||{});"_"==t.charAt(0)||t in e||a(e,t,{value:s.f(t)})}},Oyvg:function(t,e,n){var i=n("dyZX"),r=n("Xbzi"),o=n("hswa").f,s=n("kJMx").f,a=n("quPj"),l=n("C/va"),c=i.RegExp,u=c,h=c.prototype,d=/a/g,p=/a/g,f=new c(d)!==d;if(n("nh4g")&&(!f||n("eeVq")((function(){return p[n("K0xU")("match")]=!1,c(d)!=d||c(p)==p||"/a/i"!=c(d,"i")})))){c=function(t,e){var n=this instanceof c,i=a(t),o=void 0===e;return!n&&i&&t.constructor===c&&o?t:r(f?new u(i&&!o?t.source:t,e):u((i=t instanceof c)?t.source:t,i&&o?l.call(t):e),n?this:h,c)};for(var m=function(t){t in c||o(c,t,{configurable:!0,get:function(){return u[t]},set:function(e){u[t]=e}})},g=s(u),v=0;g.length>v;)m(g[v++]);h.constructor=c,c.prototype=h,n("KroJ")(i,"RegExp",c)}n("elZq")("RegExp")},PjFQ:function(t,e){},QaDb:function(t,e,n){"use strict";var i=n("Kuth"),r=n("RjD/"),o=n("fyDq"),s={};n("Mukb")(s,n("K0xU")("iterator"),(function(){return this})),t.exports=function(t,e,n){t.prototype=i(s,{next:r(1,n)}),o(t,e+" Iterator")}},RW0V:function(t,e,n){var i=n("S/j/"),r=n("DVgA");n("Xtr8")("keys",(function(){return function(t){return r(i(t))}}))},RYi7:function(t,e){var n=Math.ceil,i=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?i:n)(t)}},"RjD/":function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},"S/j/":function(t,e,n){var i=n("vhPU");t.exports=function(t){return Object(i(t))}},SRfc:function(t,e,n){"use strict";var i=n("y3w9"),r=n("ne8i"),o=n("A5AN"),s=n("Xxuz");n("IU+Z")("match",1,(function(t,e,n,a){return[function(n){var i=t(this),r=null==n?void 0:n[e];return void 0!==r?r.call(n,i):new RegExp(n)[e](String(i))},function(t){var e=a(n,t,this);if(e.done)return e.value;var l=i(t),c=String(this);if(!l.global)return s(l,c);var u=l.unicode;l.lastIndex=0;for(var h,d=[],p=0;null!==(h=s(l,c));){var f=String(h[0]);d[p]=f,""===f&&(l.lastIndex=o(c,r(l.lastIndex),u)),p++}return 0===p?null:d}]}))},UUeW:function(t,e,n){var i=n("K0xU")("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[i]=!1,!"/./"[t](e)}catch(t){}}return!0}},UceN:function(t,e){},Ugos:function(t,e,n){"use strict";var i,r,o=n("C/va"),s=RegExp.prototype.exec,a=String.prototype.replace,l=s,c=(i=/a/,r=/b*/g,s.call(i,"a"),s.call(r,"a"),0!==i.lastIndex||0!==r.lastIndex),u=void 0!==/()??/.exec("")[1];(c||u)&&(l=function(t){var e,n,i,r,l=this;return u&&(n=new RegExp("^"+l.source+"$(?!\\s)",o.call(l))),c&&(e=l.lastIndex),i=s.call(l,t),c&&i&&(l.lastIndex=l.global?i.index+i[0].length:e),u&&i&&i.length>1&&a.call(i[0],n,(function(){for(r=1;r<arguments.length-2;r++)void 0===arguments[r]&&(i[r]=void 0)})),i}),t.exports=l},UqcF:function(t,e){e.f={}.propertyIsEnumerable},VTer:function(t,e,n){var i=n("g3g5"),r=n("dyZX"),o=r["__core-js_shared__"]||(r["__core-js_shared__"]={});(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:i.version,mode:n("LQAc")?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},Womt:function(t,e,n){"use strict";n.d(e,"a",(function(){return Ft})),n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return pa})),n.d(e,"d",(function(){return da})),n.d(e,"e",(function(){return Pe})),n.d(e,"f",(function(){return Gt})),n.d(e,"g",(function(){return Be})),n.d(e,"h",(function(){return Ye})),n.d(e,"i",(function(){return er})),n.d(e,"j",(function(){return ze})),n.d(e,"k",(function(){return Ts})),n.d(e,"l",(function(){return l})),n.d(e,"m",(function(){return Qi}));const i=2;function r(){}Object.assign(r.prototype,{addEventListener:function(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:function(t,e){if(void 0===this._listeners)return!1;const n=this._listeners;return void 0!==n[t]&&-1!==n[t].indexOf(e)},removeEventListener:function(t,e){if(void 0===this._listeners)return;const n=this._listeners[t];if(void 0!==n){const t=n.indexOf(e);-1!==t&&n.splice(t,1)}},dispatchEvent:function(t){if(void 0===this._listeners)return;const e=this._listeners[t.type];if(void 0!==e){t.target=this;const n=e.slice(0);for(let e=0,i=n.length;e<i;e++)n[e].call(this,t)}}});const o=[];for(let t=0;t<256;t++)o[t]=(t<16?"0":"")+t.toString(16);let s=1234567;const a={DEG2RAD:Math.PI/180,RAD2DEG:180/Math.PI,generateUUID:function(){const t=4294967295*Math.random()|0,e=4294967295*Math.random()|0,n=4294967295*Math.random()|0,i=4294967295*Math.random()|0;return(o[255&t]+o[t>>8&255]+o[t>>16&255]+o[t>>24&255]+"-"+o[255&e]+o[e>>8&255]+"-"+o[e>>16&15|64]+o[e>>24&255]+"-"+o[63&n|128]+o[n>>8&255]+"-"+o[n>>16&255]+o[n>>24&255]+o[255&i]+o[i>>8&255]+o[i>>16&255]+o[i>>24&255]).toUpperCase()},clamp:function(t,e,n){return Math.max(e,Math.min(n,t))},euclideanModulo:function(t,e){return(t%e+e)%e},mapLinear:function(t,e,n,i,r){return i+(t-e)*(r-i)/(n-e)},lerp:function(t,e,n){return(1-n)*t+n*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){return void 0!==t&&(s=t%2147483647),s=16807*s%2147483647,(s-1)/2147483646},degToRad:function(t){return t*a.DEG2RAD},radToDeg:function(t){return t*a.RAD2DEG},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 o=Math.cos,s=Math.sin,a=o(n/2),l=s(n/2),c=o((e+i)/2),u=s((e+i)/2),h=o((e-i)/2),d=s((e-i)/2),p=o((i-e)/2),f=s((i-e)/2);switch(r){case"XYX":t.set(a*u,l*h,l*d,a*c);break;case"YZY":t.set(l*d,a*u,l*h,a*c);break;case"ZXZ":t.set(l*h,l*d,a*u,a*c);break;case"XZX":t.set(a*u,l*f,l*p,a*c);break;case"YXY":t.set(l*p,a*u,l*f,a*c);break;case"ZYZ":t.set(l*f,l*p,a*u,a*c);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+r)}}};class l{constructor(t=0,e=0){Object.defineProperty(this,"isVector2",{value:!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,e){return void 0!==e?(console.warn("THREE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(t,e)):(this.x+=t.x,this.y+=t.y,this)}addScalar(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,e){return void 0!==e?(console.warn("THREE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(t,e)):(this.x-=t.x,this.y-=t.y,this)}subScalar(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=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this}clampScalar(t,e){return this.x=Math.max(t,Math.min(e,this.x)),this.y=Math.max(t,Math.min(e,this.y)),this}clampLength(t,e){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))}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}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(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}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,n){return void 0!==n&&console.warn("THREE.Vector2: offset has been removed from .fromBufferAttribute()."),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,o=this.y-t.y;return this.x=r*n-o*i+t.x,this.y=r*i+o*n+t.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}}class c{constructor(){Object.defineProperty(this,"isMatrix3",{value:!0}),this.elements=[1,0,0,0,1,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.")}set(t,e,n,i,r,o,s,a,l){const c=this.elements;return c[0]=t,c[1]=i,c[2]=s,c[3]=e,c[4]=r,c[5]=a,c[6]=n,c[7]=o,c[8]=l,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}clone(){return(new this.constructor).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],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,o=n[0],s=n[3],a=n[6],l=n[1],c=n[4],u=n[7],h=n[2],d=n[5],p=n[8],f=i[0],m=i[3],g=i[6],v=i[1],y=i[4],b=i[7],x=i[2],w=i[5],_=i[8];return r[0]=o*f+s*v+a*x,r[3]=o*m+s*y+a*w,r[6]=o*g+s*b+a*_,r[1]=l*f+c*v+u*x,r[4]=l*m+c*y+u*w,r[7]=l*g+c*b+u*_,r[2]=h*f+d*v+p*x,r[5]=h*m+d*y+p*w,r[8]=h*g+d*b+p*_,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],o=t[4],s=t[5],a=t[6],l=t[7],c=t[8];return e*o*c-e*s*l-n*r*c+n*s*a+i*r*l-i*o*a}getInverse(t,e){void 0!==e&&console.warn("THREE.Matrix3: .getInverse() can no longer be configured to throw on degenerate.");const n=t.elements,i=this.elements,r=n[0],o=n[1],s=n[2],a=n[3],l=n[4],c=n[5],u=n[6],h=n[7],d=n[8],p=d*l-c*h,f=c*u-d*a,m=h*a-l*u,g=r*p+o*f+s*m;if(0===g)return this.set(0,0,0,0,0,0,0,0,0);const v=1/g;return i[0]=p*v,i[1]=(s*h-d*o)*v,i[2]=(c*o-s*l)*v,i[3]=f*v,i[4]=(d*r-s*u)*v,i[5]=(s*a-c*r)*v,i[6]=m*v,i[7]=(o*u-h*r)*v,i[8]=(l*r-o*a)*v,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).getInverse(this).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,o,s){const a=Math.cos(r),l=Math.sin(r);this.set(n*a,n*l,-n*(a*o+l*s)+o+t,-i*l,i*a,-i*(-l*o+a*s)+s+e,0,0,1)}scale(t,e){const n=this.elements;return n[0]*=t,n[3]*=t,n[6]*=t,n[1]*=e,n[4]*=e,n[7]*=e,this}rotate(t){const e=Math.cos(t),n=Math.sin(t),i=this.elements,r=i[0],o=i[3],s=i[6],a=i[1],l=i[4],c=i[7];return i[0]=e*r+n*a,i[3]=e*o+n*l,i[6]=e*s+n*c,i[1]=-n*r+e*a,i[4]=-n*o+e*l,i[7]=-n*s+e*c,this}translate(t,e){const n=this.elements;return n[0]+=t*n[2],n[3]+=t*n[5],n[6]+=t*n[8],n[1]+=e*n[2],n[4]+=e*n[5],n[7]+=e*n[8],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}}let u;const h={getDataURL:function(t){if(/^data:/i.test(t.src))return t.src;if("undefined"==typeof HTMLCanvasElement)return t.src;let e;if(t instanceof HTMLCanvasElement)e=t;else{void 0===u&&(u=document.createElementNS("http://www.w3.org/1999/xhtml","canvas")),u.width=t.width,u.height=t.height;const n=u.getContext("2d");t instanceof ImageData?n.putImageData(t,0,0):n.drawImage(t,0,0,t.width,t.height),e=u}return e.width>2048||e.height>2048?e.toDataURL("image/jpeg",.6):e.toDataURL("image/png")}};let d=0;function p(t,e,n,i,r,o,s,u,h,f){Object.defineProperty(this,"id",{value:d++}),this.uuid=a.generateUUID(),this.name="",this.image=void 0!==t?t:p.DEFAULT_IMAGE,this.mipmaps=[],this.mapping=void 0!==e?e:p.DEFAULT_MAPPING,this.wrapS=void 0!==n?n:1001,this.wrapT=void 0!==i?i:1001,this.magFilter=void 0!==r?r:1006,this.minFilter=void 0!==o?o:1008,this.anisotropy=void 0!==h?h:1,this.format=void 0!==s?s:1023,this.internalFormat=null,this.type=void 0!==u?u:1009,this.offset=new l(0,0),this.repeat=new l(1,1),this.center=new l(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new c,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=void 0!==f?f:3e3,this.version=0,this.onUpdate=null}p.DEFAULT_IMAGE=void 0,p.DEFAULT_MAPPING=300,p.prototype=Object.assign(Object.create(r.prototype),{constructor:p,isTexture:!0,updateMatrix:function(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.name=t.name,this.image=t.image,this.mipmaps=t.mipmaps.slice(0),this.mapping=t.mapping,this.wrapS=t.wrapS,this.wrapT=t.wrapT,this.magFilter=t.magFilter,this.minFilter=t.minFilter,this.anisotropy=t.anisotropy,this.format=t.format,this.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.encoding=t.encoding,this},toJSON:function(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.5,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,mapping:this.mapping,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,type:this.type,encoding:this.encoding,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};if(void 0!==this.image){const i=this.image;if(void 0===i.uuid&&(i.uuid=a.generateUUID()),!e&&void 0===t.images[i.uuid]){let e;if(Array.isArray(i)){e=[];for(let t=0,n=i.length;t<n;t++)e.push(h.getDataURL(i[t]))}else e=h.getDataURL(i);t.images[i.uuid]={uuid:i.uuid,url:e}}n.image=i.uuid}return e||(t.textures[this.uuid]=n),n},dispose:function(){this.dispatchEvent({type:"dispose"})},transformUv:function(t){if(300!==this.mapping)return t;if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case 1e3:t.x=t.x-Math.floor(t.x);break;case 1001:t.x=t.x<0?0:1;break;case 1002: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 1e3:t.y=t.y-Math.floor(t.y);break;case 1001:t.y=t.y<0?0:1;break;case 1002: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}}),Object.defineProperty(p.prototype,"needsUpdate",{set:function(t){!0===t&&this.version++}});class f{constructor(t=0,e=0,n=0,i=1){Object.defineProperty(this,"isVector4",{value:!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,e){return void 0!==e?(console.warn("THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(t,e)):(this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this)}addScalar(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,e){return void 0!==e?(console.warn("THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(t,e)):(this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this)}subScalar(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}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,o=t.elements;return this.x=o[0]*e+o[4]*n+o[8]*i+o[12]*r,this.y=o[1]*e+o[5]*n+o[9]*i+o[13]*r,this.z=o[2]*e+o[6]*n+o[10]*i+o[14]*r,this.w=o[3]*e+o[7]*n+o[11]*i+o[15]*r,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 o=t.elements,s=o[0],a=o[4],l=o[8],c=o[1],u=o[5],h=o[9],d=o[2],p=o[6],f=o[10];if(Math.abs(a-c)<.01&&Math.abs(l-d)<.01&&Math.abs(h-p)<.01){if(Math.abs(a+c)<.1&&Math.abs(l+d)<.1&&Math.abs(h+p)<.1&&Math.abs(s+u+f-3)<.1)return this.set(1,0,0,0),this;e=Math.PI;const t=(s+1)/2,o=(u+1)/2,m=(f+1)/2,g=(a+c)/4,v=(l+d)/4,y=(h+p)/4;return t>o&&t>m?t<.01?(n=0,i=.707106781,r=.707106781):(n=Math.sqrt(t),i=g/n,r=v/n):o>m?o<.01?(n=.707106781,i=0,r=.707106781):(i=Math.sqrt(o),n=g/i,r=y/i):m<.01?(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((p-h)*(p-h)+(l-d)*(l-d)+(c-a)*(c-a));return Math.abs(m)<.001&&(m=1),this.x=(p-h)/m,this.y=(l-d)/m,this.z=(c-a)/m,this.w=Math.acos((s+u+f-1)/2),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=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this.w=Math.max(t.w,Math.min(e.w,this.w)),this}clampScalar(t,e){return this.x=Math.max(t,Math.min(e,this.x)),this.y=Math.max(t,Math.min(e,this.y)),this.z=Math.max(t,Math.min(e,this.z)),this.w=Math.max(t,Math.min(e,this.w)),this}clampLength(t,e){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))}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=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this.w=this.w<0?Math.ceil(this.w):Math.floor(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,n){return void 0!==n&&console.warn("THREE.Vector4: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this.w=t.getW(e),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}}function m(t,e,n){this.width=t,this.height=e,this.scissor=new f(0,0,t,e),this.scissorTest=!1,this.viewport=new f(0,0,t,e),n=n||{},this.texture=new p(void 0,n.mapping,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.encoding),this.texture.image={},this.texture.image.width=t,this.texture.image.height=e,this.texture.generateMipmaps=void 0!==n.generateMipmaps&&n.generateMipmaps,this.texture.minFilter=void 0!==n.minFilter?n.minFilter:1006,this.depthBuffer=void 0===n.depthBuffer||n.depthBuffer,this.stencilBuffer=void 0!==n.stencilBuffer&&n.stencilBuffer,this.depthTexture=void 0!==n.depthTexture?n.depthTexture:null}function g(t,e,n){m.call(this,t,e,n),this.samples=4}m.prototype=Object.assign(Object.create(r.prototype),{constructor:m,isWebGLRenderTarget:!0,setSize:function(t,e){this.width===t&&this.height===e||(this.width=t,this.height=e,this.texture.image.width=t,this.texture.image.height=e,this.dispose()),this.viewport.set(0,0,t,e),this.scissor.set(0,0,t,e)},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.width=t.width,this.height=t.height,this.viewport.copy(t.viewport),this.texture=t.texture.clone(),this.depthBuffer=t.depthBuffer,this.stencilBuffer=t.stencilBuffer,this.depthTexture=t.depthTexture,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),g.prototype=Object.assign(Object.create(m.prototype),{constructor:g,isWebGLMultisampleRenderTarget:!0,copy:function(t){return m.prototype.copy.call(this,t),this.samples=t.samples,this}});class v{constructor(t=0,e=0,n=0,i=1){Object.defineProperty(this,"isQuaternion",{value:!0}),this._x=t,this._y=e,this._z=n,this._w=i}static slerp(t,e,n,i){return n.copy(t).slerp(e,i)}static slerpFlat(t,e,n,i,r,o,s){let a=n[i+0],l=n[i+1],c=n[i+2],u=n[i+3];const h=r[o+0],d=r[o+1],p=r[o+2],f=r[o+3];if(u!==f||a!==h||l!==d||c!==p){let t=1-s;const e=a*h+l*d+c*p+u*f,n=e>=0?1:-1,i=1-e*e;if(i>Number.EPSILON){const r=Math.sqrt(i),o=Math.atan2(r,e*n);t=Math.sin(t*o)/r,s=Math.sin(s*o)/r}const r=s*n;if(a=a*t+h*r,l=l*t+d*r,c=c*t+p*r,u=u*t+f*r,t===1-s){const t=1/Math.sqrt(a*a+l*l+c*c+u*u);a*=t,l*=t,c*=t,u*=t}}t[e]=a,t[e+1]=l,t[e+2]=c,t[e+3]=u}static multiplyQuaternionsFlat(t,e,n,i,r,o){const s=n[i],a=n[i+1],l=n[i+2],c=n[i+3],u=r[o],h=r[o+1],d=r[o+2],p=r[o+3];return t[e]=s*p+c*u+a*d-l*h,t[e+1]=a*p+c*h+l*u-s*d,t[e+2]=l*p+c*d+s*h-a*u,t[e+3]=c*p-s*u-a*h-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){if(!t||!t.isEuler)throw new Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");const n=t._x,i=t._y,r=t._z,o=t._order,s=Math.cos,a=Math.sin,l=s(n/2),c=s(i/2),u=s(r/2),h=a(n/2),d=a(i/2),p=a(r/2);switch(o){case"XYZ":this._x=h*c*u+l*d*p,this._y=l*d*u-h*c*p,this._z=l*c*p+h*d*u,this._w=l*c*u-h*d*p;break;case"YXZ":this._x=h*c*u+l*d*p,this._y=l*d*u-h*c*p,this._z=l*c*p-h*d*u,this._w=l*c*u+h*d*p;break;case"ZXY":this._x=h*c*u-l*d*p,this._y=l*d*u+h*c*p,this._z=l*c*p+h*d*u,this._w=l*c*u-h*d*p;break;case"ZYX":this._x=h*c*u-l*d*p,this._y=l*d*u+h*c*p,this._z=l*c*p-h*d*u,this._w=l*c*u+h*d*p;break;case"YZX":this._x=h*c*u+l*d*p,this._y=l*d*u+h*c*p,this._z=l*c*p-h*d*u,this._w=l*c*u-h*d*p;break;case"XZY":this._x=h*c*u-l*d*p,this._y=l*d*u-h*c*p,this._z=l*c*p+h*d*u,this._w=l*c*u+h*d*p;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+o)}return!1!==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],o=e[1],s=e[5],a=e[9],l=e[2],c=e[6],u=e[10],h=n+s+u;if(h>0){const t=.5/Math.sqrt(h+1);this._w=.25/t,this._x=(c-a)*t,this._y=(r-l)*t,this._z=(o-i)*t}else if(n>s&&n>u){const t=2*Math.sqrt(1+n-s-u);this._w=(c-a)/t,this._x=.25*t,this._y=(i+o)/t,this._z=(r+l)/t}else if(s>u){const t=2*Math.sqrt(1+s-n-u);this._w=(r-l)/t,this._x=(i+o)/t,this._y=.25*t,this._z=(a+c)/t}else{const t=2*Math.sqrt(1+u-n-s);this._w=(o-i)/t,this._x=(r+l)/t,this._y=(a+c)/t,this._z=.25*t}return this._onChangeCallback(),this}setFromUnitVectors(t,e){let n=t.dot(e)+1;return n<1e-6?(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(a.clamp(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)}inverse(){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,e){return void 0!==e?(console.warn("THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."),this.multiplyQuaternions(t,e)):this.multiplyQuaternions(this,t)}premultiply(t){return this.multiplyQuaternions(t,this)}multiplyQuaternions(t,e){const n=t._x,i=t._y,r=t._z,o=t._w,s=e._x,a=e._y,l=e._z,c=e._w;return this._x=n*c+o*s+i*l-r*a,this._y=i*c+o*a+r*s-n*l,this._z=r*c+o*l+n*a-i*s,this._w=o*c-n*s-i*a-r*l,this._onChangeCallback(),this}slerp(t,e){if(0===e)return this;if(1===e)return this.copy(t);const n=this._x,i=this._y,r=this._z,o=this._w;let s=o*t._w+n*t._x+i*t._y+r*t._z;if(s<0?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,s=-s):this.copy(t),s>=1)return this._w=o,this._x=n,this._y=i,this._z=r,this;const a=1-s*s;if(a<=Number.EPSILON){const t=1-e;return this._w=t*o+e*this._w,this._x=t*n+e*this._x,this._y=t*i+e*this._y,this._z=t*r+e*this._z,this.normalize(),this._onChangeCallback(),this}const l=Math.sqrt(a),c=Math.atan2(l,s),u=Math.sin((1-e)*c)/l,h=Math.sin(e*c)/l;return this._w=o*u+this._w*h,this._x=n*u+this._x*h,this._y=i*u+this._y*h,this._z=r*u+this._z*h,this._onChangeCallback(),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._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}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}}class y{constructor(t=0,e=0,n=0){Object.defineProperty(this,"isVector3",{value:!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,e){return void 0!==e?(console.warn("THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(t,e)):(this.x+=t.x,this.y+=t.y,this.z+=t.z,this)}addScalar(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,e){return void 0!==e?(console.warn("THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(t,e)):(this.x-=t.x,this.y-=t.y,this.z-=t.z,this)}subScalar(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,e){return void 0!==e?(console.warn("THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead."),this.multiplyVectors(t,e)):(this.x*=t.x,this.y*=t.y,this.z*=t.z,this)}multiplyScalar(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 t&&t.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."),this.applyQuaternion(x.setFromEuler(t))}applyAxisAngle(t,e){return this.applyQuaternion(x.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,o=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])*o,this.y=(r[1]*e+r[5]*n+r[9]*i+r[13])*o,this.z=(r[2]*e+r[6]*n+r[10]*i+r[14])*o,this}applyQuaternion(t){const e=this.x,n=this.y,i=this.z,r=t.x,o=t.y,s=t.z,a=t.w,l=a*e+o*i-s*n,c=a*n+s*e-r*i,u=a*i+r*n-o*e,h=-r*e-o*n-s*i;return this.x=l*a+h*-r+c*-s-u*-o,this.y=c*a+h*-o+u*-r-l*-s,this.z=u*a+h*-s+l*-o-c*-r,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=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this}clampScalar(t,e){return this.x=Math.max(t,Math.min(e,this.x)),this.y=Math.max(t,Math.min(e,this.y)),this.z=Math.max(t,Math.min(e,this.z)),this}clampLength(t,e){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))}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}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(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,e){return void 0!==e?(console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(t,e)):this.crossVectors(this,t)}crossVectors(t,e){const n=t.x,i=t.y,r=t.z,o=e.x,s=e.y,a=e.z;return this.x=i*a-r*s,this.y=r*o-n*a,this.z=n*s-i*o,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 b.copy(this).projectOnVector(t),this.sub(b)}reflect(t){return this.sub(b.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(a.clamp(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)}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,n){return void 0!==n&&console.warn("THREE.Vector3: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}}const b=new y,x=new v;class w{constructor(t,e){Object.defineProperty(this,"isBox3",{value:!0}),this.min=void 0!==t?t:new y(1/0,1/0,1/0),this.max=void 0!==e?e:new y(-1/0,-1/0,-1/0)}set(t,e){return this.min.copy(t),this.max.copy(e),this}setFromArray(t){let e=1/0,n=1/0,i=1/0,r=-1/0,o=-1/0,s=-1/0;for(let a=0,l=t.length;a<l;a+=3){const l=t[a],c=t[a+1],u=t[a+2];l<e&&(e=l),c<n&&(n=c),u<i&&(i=u),l>r&&(r=l),c>o&&(o=c),u>s&&(s=u)}return this.min.set(e,n,i),this.max.set(r,o,s),this}setFromBufferAttribute(t){let e=1/0,n=1/0,i=1/0,r=-1/0,o=-1/0,s=-1/0;for(let a=0,l=t.count;a<l;a++){const l=t.getX(a),c=t.getY(a),u=t.getZ(a);l<e&&(e=l),c<n&&(n=c),u<i&&(i=u),l>r&&(r=l),c>o&&(o=c),u>s&&(s=u)}return this.min.set(e,n,i),this.max.set(r,o,s),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=M.copy(e).multiplyScalar(.5);return this.min.copy(t).sub(n),this.max.copy(t).add(n),this}setFromObject(t){return this.makeEmpty(),this.expandByObject(t)}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 void 0===t&&(console.warn("THREE.Box3: .getCenter() target is now required"),t=new y),this.isEmpty()?t.set(0,0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(t){return void 0===t&&(console.warn("THREE.Box3: .getSize() target is now required"),t=new y),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){t.updateWorldMatrix(!1,!1);const e=t.geometry;void 0!==e&&(null===e.boundingBox&&e.computeBoundingBox(),E.copy(e.boundingBox),E.applyMatrix4(t.matrixWorld),this.union(E));const n=t.children;for(let t=0,e=n.length;t<e;t++)this.expandByObject(n[t]);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 void 0===e&&(console.warn("THREE.Box3: .getParameter() target is now required"),e=new y),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,M),M.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(O),I.subVectors(this.max,O),T.subVectors(t.a,O),A.subVectors(t.b,O),L.subVectors(t.c,O),P.subVectors(A,T),C.subVectors(L,A),R.subVectors(T,L);let e=[0,-P.z,P.y,0,-C.z,C.y,0,-R.z,R.y,P.z,0,-P.x,C.z,0,-C.x,R.z,0,-R.x,-P.y,P.x,0,-C.y,C.x,0,-R.y,R.x,0];return!!_(e,T,A,L,I)&&(e=[1,0,0,0,1,0,0,0,1],!!_(e,T,A,L,I)&&(N.crossVectors(P,C),e=[N.x,N.y,N.z],_(e,T,A,L,I)))}clampPoint(t,e){return void 0===e&&(console.warn("THREE.Box3: .clampPoint() target is now required"),e=new y),e.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return M.copy(t).clamp(this.min,this.max).sub(t).length()}getBoundingSphere(t){return void 0===t&&console.error("THREE.Box3: .getBoundingSphere() target is now required"),this.getCenter(t.center),t.radius=.5*this.getSize(M).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()||(S[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(t),S[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(t),S[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(t),S[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(t),S[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(t),S[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(t),S[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(t),S[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(t),this.setFromPoints(S)),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)}}function _(t,e,n,i,r){for(let o=0,s=t.length-3;o<=s;o+=3){D.fromArray(t,o);const s=r.x*Math.abs(D.x)+r.y*Math.abs(D.y)+r.z*Math.abs(D.z),a=e.dot(D),l=n.dot(D),c=i.dot(D);if(Math.max(-Math.max(a,l,c),Math.min(a,l,c))>s)return!1}return!0}const S=[new y,new y,new y,new y,new y,new y,new y,new y],M=new y,E=new w,T=new y,A=new y,L=new y,P=new y,C=new y,R=new y,O=new y,I=new y,N=new y,D=new y,z=new w;class k{constructor(t,e){this.center=void 0!==t?t:new y,this.radius=void 0!==e?e:-1}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):z.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}clone(){return(new this.constructor).copy(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 void 0===e&&(console.warn("THREE.Sphere: .clampPoint() target is now required"),e=new y),e.copy(t),n>this.radius*this.radius&&(e.sub(this.center).normalize(),e.multiplyScalar(this.radius).add(this.center)),e}getBoundingBox(t){return void 0===t&&(console.warn("THREE.Sphere: .getBoundingBox() target is now required"),t=new w),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}equals(t){return t.center.equals(this.center)&&t.radius===this.radius}}const B=new y,F=new y,U=new y,j=new y,H=new y,G=new y,V=new y;class W{constructor(t,e){this.origin=void 0!==t?t:new y,this.direction=void 0!==e?e:new y(0,0,-1)}set(t,e){return this.origin.copy(t),this.direction.copy(e),this}clone(){return(new this.constructor).copy(this)}copy(t){return this.origin.copy(t.origin),this.direction.copy(t.direction),this}at(t,e){return void 0===e&&(console.warn("THREE.Ray: .at() target is now required"),e=new y),e.copy(this.direction).multiplyScalar(t).add(this.origin)}lookAt(t){return this.direction.copy(t).sub(this.origin).normalize(),this}recast(t){return this.origin.copy(this.at(t,B)),this}closestPointToPoint(t,e){void 0===e&&(console.warn("THREE.Ray: .closestPointToPoint() target is now required"),e=new y),e.subVectors(t,this.origin);const n=e.dot(this.direction);return n<0?e.copy(this.origin):e.copy(this.direction).multiplyScalar(n).add(this.origin)}distanceToPoint(t){return Math.sqrt(this.distanceSqToPoint(t))}distanceSqToPoint(t){const e=B.subVectors(t,this.origin).dot(this.direction);return e<0?this.origin.distanceToSquared(t):(B.copy(this.direction).multiplyScalar(e).add(this.origin),B.distanceToSquared(t))}distanceSqToSegment(t,e,n,i){F.copy(t).add(e).multiplyScalar(.5),U.copy(e).sub(t).normalize(),j.copy(this.origin).sub(F);const r=.5*t.distanceTo(e),o=-this.direction.dot(U),s=j.dot(this.direction),a=-j.dot(U),l=j.lengthSq(),c=Math.abs(1-o*o);let u,h,d,p;if(c>0)if(u=o*a-s,h=o*s-a,p=r*c,u>=0)if(h>=-p)if(h<=p){const t=1/c;u*=t,h*=t,d=u*(u+o*h+2*s)+h*(o*u+h+2*a)+l}else h=r,u=Math.max(0,-(o*h+s)),d=-u*u+h*(h+2*a)+l;else h=-r,u=Math.max(0,-(o*h+s)),d=-u*u+h*(h+2*a)+l;else h<=-p?(u=Math.max(0,-(-o*r+s)),h=u>0?-r:Math.min(Math.max(-r,-a),r),d=-u*u+h*(h+2*a)+l):h<=p?(u=0,h=Math.min(Math.max(-r,-a),r),d=h*(h+2*a)+l):(u=Math.max(0,-(o*r+s)),h=u>0?r:Math.min(Math.max(-r,-a),r),d=-u*u+h*(h+2*a)+l);else h=o>0?-r:r,u=Math.max(0,-(o*h+s)),d=-u*u+h*(h+2*a)+l;return n&&n.copy(this.direction).multiplyScalar(u).add(this.origin),i&&i.copy(U).multiplyScalar(h).add(F),d}intersectSphere(t,e){B.subVectors(t.center,this.origin);const n=B.dot(this.direction),i=B.dot(B)-n*n,r=t.radius*t.radius;if(i>r)return null;const o=Math.sqrt(r-i),s=n-o,a=n+o;return s<0&&a<0?null:s<0?this.at(a,e):this.at(s,e)}intersectsSphere(t){return 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,o,s,a;const l=1/this.direction.x,c=1/this.direction.y,u=1/this.direction.z,h=this.origin;return l>=0?(n=(t.min.x-h.x)*l,i=(t.max.x-h.x)*l):(n=(t.max.x-h.x)*l,i=(t.min.x-h.x)*l),c>=0?(r=(t.min.y-h.y)*c,o=(t.max.y-h.y)*c):(r=(t.max.y-h.y)*c,o=(t.min.y-h.y)*c),n>o||r>i?null:((r>n||n!=n)&&(n=r),(o<i||i!=i)&&(i=o),u>=0?(s=(t.min.z-h.z)*u,a=(t.max.z-h.z)*u):(s=(t.max.z-h.z)*u,a=(t.min.z-h.z)*u),n>a||s>i?null:((s>n||n!=n)&&(n=s),(a<i||i!=i)&&(i=a),i<0?null:this.at(n>=0?n:i,e)))}intersectsBox(t){return null!==this.intersectBox(t,B)}intersectTriangle(t,e,n,i,r){H.subVectors(e,t),G.subVectors(n,t),V.crossVectors(H,G);let o,s=this.direction.dot(V);if(s>0){if(i)return null;o=1}else{if(!(s<0))return null;o=-1,s=-s}j.subVectors(this.origin,t);const a=o*this.direction.dot(G.crossVectors(j,G));if(a<0)return null;const l=o*this.direction.dot(H.cross(j));if(l<0)return null;if(a+l>s)return null;const c=-o*j.dot(V);return c<0?null:this.at(c/s,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)}}class q{constructor(){Object.defineProperty(this,"isMatrix4",{value:!0}),this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.")}set(t,e,n,i,r,o,s,a,l,c,u,h,d,p,f,m){const g=this.elements;return g[0]=t,g[4]=e,g[8]=n,g[12]=i,g[1]=r,g[5]=o,g[9]=s,g[13]=a,g[2]=l,g[6]=c,g[10]=u,g[14]=h,g[3]=d,g[7]=p,g[11]=f,g[15]=m,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 q).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}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/X.setFromMatrixColumn(t,0).length(),r=1/X.setFromMatrixColumn(t,1).length(),o=1/X.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]*o,e[9]=n[9]*o,e[10]=n[10]*o,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromEuler(t){t&&t.isEuler||console.error("THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");const e=this.elements,n=t.x,i=t.y,r=t.z,o=Math.cos(n),s=Math.sin(n),a=Math.cos(i),l=Math.sin(i),c=Math.cos(r),u=Math.sin(r);if("XYZ"===t.order){const t=o*c,n=o*u,i=s*c,r=s*u;e[0]=a*c,e[4]=-a*u,e[8]=l,e[1]=n+i*l,e[5]=t-r*l,e[9]=-s*a,e[2]=r-t*l,e[6]=i+n*l,e[10]=o*a}else if("YXZ"===t.order){const t=a*c,n=a*u,i=l*c,r=l*u;e[0]=t+r*s,e[4]=i*s-n,e[8]=o*l,e[1]=o*u,e[5]=o*c,e[9]=-s,e[2]=n*s-i,e[6]=r+t*s,e[10]=o*a}else if("ZXY"===t.order){const t=a*c,n=a*u,i=l*c,r=l*u;e[0]=t-r*s,e[4]=-o*u,e[8]=i+n*s,e[1]=n+i*s,e[5]=o*c,e[9]=r-t*s,e[2]=-o*l,e[6]=s,e[10]=o*a}else if("ZYX"===t.order){const t=o*c,n=o*u,i=s*c,r=s*u;e[0]=a*c,e[4]=i*l-n,e[8]=t*l+r,e[1]=a*u,e[5]=r*l+t,e[9]=n*l-i,e[2]=-l,e[6]=s*a,e[10]=o*a}else if("YZX"===t.order){const t=o*a,n=o*l,i=s*a,r=s*l;e[0]=a*c,e[4]=r-t*u,e[8]=i*u+n,e[1]=u,e[5]=o*c,e[9]=-s*c,e[2]=-l*c,e[6]=n*u+i,e[10]=t-r*u}else if("XZY"===t.order){const t=o*a,n=o*l,i=s*a,r=s*l;e[0]=a*c,e[4]=-u,e[8]=l*c,e[1]=t*u+r,e[5]=o*c,e[9]=n*u-i,e[2]=i*u-n,e[6]=s*c,e[10]=r*u+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(Z,t,J)}lookAt(t,e,n){const i=this.elements;return Q.subVectors(t,e),0===Q.lengthSq()&&(Q.z=1),Q.normalize(),K.crossVectors(n,Q),0===K.lengthSq()&&(1===Math.abs(n.z)?Q.x+=1e-4:Q.z+=1e-4,Q.normalize(),K.crossVectors(n,Q)),K.normalize(),$.crossVectors(Q,K),i[0]=K.x,i[4]=$.x,i[8]=Q.x,i[1]=K.y,i[5]=$.y,i[9]=Q.y,i[2]=K.z,i[6]=$.z,i[10]=Q.z,this}multiply(t,e){return void 0!==e?(console.warn("THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."),this.multiplyMatrices(t,e)):this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,e){const n=t.elements,i=e.elements,r=this.elements,o=n[0],s=n[4],a=n[8],l=n[12],c=n[1],u=n[5],h=n[9],d=n[13],p=n[2],f=n[6],m=n[10],g=n[14],v=n[3],y=n[7],b=n[11],x=n[15],w=i[0],_=i[4],S=i[8],M=i[12],E=i[1],T=i[5],A=i[9],L=i[13],P=i[2],C=i[6],R=i[10],O=i[14],I=i[3],N=i[7],D=i[11],z=i[15];return r[0]=o*w+s*E+a*P+l*I,r[4]=o*_+s*T+a*C+l*N,r[8]=o*S+s*A+a*R+l*D,r[12]=o*M+s*L+a*O+l*z,r[1]=c*w+u*E+h*P+d*I,r[5]=c*_+u*T+h*C+d*N,r[9]=c*S+u*A+h*R+d*D,r[13]=c*M+u*L+h*O+d*z,r[2]=p*w+f*E+m*P+g*I,r[6]=p*_+f*T+m*C+g*N,r[10]=p*S+f*A+m*R+g*D,r[14]=p*M+f*L+m*O+g*z,r[3]=v*w+y*E+b*P+x*I,r[7]=v*_+y*T+b*C+x*N,r[11]=v*S+y*A+b*R+x*D,r[15]=v*M+y*L+b*O+x*z,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],o=t[1],s=t[5],a=t[9],l=t[13],c=t[2],u=t[6],h=t[10],d=t[14];return t[3]*(+r*a*u-i*l*u-r*s*h+n*l*h+i*s*d-n*a*d)+t[7]*(+e*a*d-e*l*h+r*o*h-i*o*d+i*l*c-r*a*c)+t[11]*(+e*l*u-e*s*d-r*o*u+n*o*d+r*s*c-n*l*c)+t[15]*(-i*s*c-e*a*u+e*s*h+i*o*u-n*o*h+n*a*c)}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}getInverse(t,e){void 0!==e&&console.warn("THREE.Matrix4: .getInverse() can no longer be configured to throw on degenerate.");const n=this.elements,i=t.elements,r=i[0],o=i[1],s=i[2],a=i[3],l=i[4],c=i[5],u=i[6],h=i[7],d=i[8],p=i[9],f=i[10],m=i[11],g=i[12],v=i[13],y=i[14],b=i[15],x=p*y*h-v*f*h+v*u*m-c*y*m-p*u*b+c*f*b,w=g*f*h-d*y*h-g*u*m+l*y*m+d*u*b-l*f*b,_=d*v*h-g*p*h+g*c*m-l*v*m-d*c*b+l*p*b,S=g*p*u-d*v*u-g*c*f+l*v*f+d*c*y-l*p*y,M=r*x+o*w+s*_+a*S;if(0===M)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const E=1/M;return n[0]=x*E,n[1]=(v*f*a-p*y*a-v*s*m+o*y*m+p*s*b-o*f*b)*E,n[2]=(c*y*a-v*u*a+v*s*h-o*y*h-c*s*b+o*u*b)*E,n[3]=(p*u*a-c*f*a-p*s*h+o*f*h+c*s*m-o*u*m)*E,n[4]=w*E,n[5]=(d*y*a-g*f*a+g*s*m-r*y*m-d*s*b+r*f*b)*E,n[6]=(g*u*a-l*y*a-g*s*h+r*y*h+l*s*b-r*u*b)*E,n[7]=(l*f*a-d*u*a+d*s*h-r*f*h-l*s*m+r*u*m)*E,n[8]=_*E,n[9]=(g*p*a-d*v*a-g*o*m+r*v*m+d*o*b-r*p*b)*E,n[10]=(l*v*a-g*c*a+g*o*h-r*v*h-l*o*b+r*c*b)*E,n[11]=(d*c*a-l*p*a-d*o*h+r*p*h+l*o*m-r*c*m)*E,n[12]=S*E,n[13]=(d*v*s-g*p*s+g*o*f-r*v*f-d*o*y+r*p*y)*E,n[14]=(g*c*s-l*v*s-g*o*u+r*v*u+l*o*y-r*c*y)*E,n[15]=(l*p*s-d*c*s+d*o*u-r*p*u-l*o*f+r*c*f)*E,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 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,o=t.x,s=t.y,a=t.z,l=r*o,c=r*s;return this.set(l*o+n,l*s-i*a,l*a+i*s,0,l*s+i*a,c*s+n,c*a-i*o,0,l*a-i*s,c*a+i*o,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){return this.set(1,e,n,0,t,1,n,0,t,e,1,0,0,0,0,1),this}compose(t,e,n){const i=this.elements,r=e._x,o=e._y,s=e._z,a=e._w,l=r+r,c=o+o,u=s+s,h=r*l,d=r*c,p=r*u,f=o*c,m=o*u,g=s*u,v=a*l,y=a*c,b=a*u,x=n.x,w=n.y,_=n.z;return i[0]=(1-(f+g))*x,i[1]=(d+b)*x,i[2]=(p-y)*x,i[3]=0,i[4]=(d-b)*w,i[5]=(1-(h+g))*w,i[6]=(m+v)*w,i[7]=0,i[8]=(p+y)*_,i[9]=(m-v)*_,i[10]=(1-(h+f))*_,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=X.set(i[0],i[1],i[2]).length();const o=X.set(i[4],i[5],i[6]).length(),s=X.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],Y.copy(this);const a=1/r,l=1/o,c=1/s;return Y.elements[0]*=a,Y.elements[1]*=a,Y.elements[2]*=a,Y.elements[4]*=l,Y.elements[5]*=l,Y.elements[6]*=l,Y.elements[8]*=c,Y.elements[9]*=c,Y.elements[10]*=c,e.setFromRotationMatrix(Y),n.x=r,n.y=o,n.z=s,this}makePerspective(t,e,n,i,r,o){void 0===o&&console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.");const s=this.elements,a=2*r/(e-t),l=2*r/(n-i),c=(e+t)/(e-t),u=(n+i)/(n-i),h=-(o+r)/(o-r),d=-2*o*r/(o-r);return s[0]=a,s[4]=0,s[8]=c,s[12]=0,s[1]=0,s[5]=l,s[9]=u,s[13]=0,s[2]=0,s[6]=0,s[10]=h,s[14]=d,s[3]=0,s[7]=0,s[11]=-1,s[15]=0,this}makeOrthographic(t,e,n,i,r,o){const s=this.elements,a=1/(e-t),l=1/(n-i),c=1/(o-r),u=(e+t)*a,h=(n+i)*l,d=(o+r)*c;return s[0]=2*a,s[4]=0,s[8]=0,s[12]=-u,s[1]=0,s[5]=2*l,s[9]=0,s[13]=-h,s[2]=0,s[6]=0,s[10]=-2*c,s[14]=-d,s[3]=0,s[7]=0,s[11]=0,s[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 X=new y,Y=new q,Z=new y(0,0,0),J=new y(1,1,1),K=new y,$=new y,Q=new y;class tt{constructor(t=0,e=0,n=0,i=tt.DefaultOrder){Object.defineProperty(this,"isEuler",{value:!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){return this._x=t,this._y=e,this._z=n,this._order=i||this._order,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,n){const i=a.clamp,r=t.elements,o=r[0],s=r[4],l=r[8],c=r[1],u=r[5],h=r[9],d=r[2],p=r[6],f=r[10];switch(e=e||this._order){case"XYZ":this._y=Math.asin(i(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-h,f),this._z=Math.atan2(-s,o)):(this._x=Math.atan2(p,u),this._z=0);break;case"YXZ":this._x=Math.asin(-i(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(l,f),this._z=Math.atan2(c,u)):(this._y=Math.atan2(-d,o),this._z=0);break;case"ZXY":this._x=Math.asin(i(p,-1,1)),Math.abs(p)<.9999999?(this._y=Math.atan2(-d,f),this._z=Math.atan2(-s,u)):(this._y=0,this._z=Math.atan2(c,o));break;case"ZYX":this._y=Math.asin(-i(d,-1,1)),Math.abs(d)<.9999999?(this._x=Math.atan2(p,f),this._z=Math.atan2(c,o)):(this._x=0,this._z=Math.atan2(-s,u));break;case"YZX":this._z=Math.asin(i(c,-1,1)),Math.abs(c)<.9999999?(this._x=Math.atan2(-h,u),this._y=Math.atan2(-d,o)):(this._x=0,this._y=Math.atan2(l,f));break;case"XZY":this._z=Math.asin(-i(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(p,u),this._y=Math.atan2(l,o)):(this._x=Math.atan2(-h,f),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+e)}return this._order=e,!1!==n&&this._onChangeCallback(),this}setFromQuaternion(t,e,n){return et.makeRotationFromQuaternion(t),this.setFromRotationMatrix(et,e,n)}setFromVector3(t,e){return this.set(t.x,t.y,t.z,e||this._order)}reorder(t){return nt.setFromEuler(this),this.setFromQuaternion(nt,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}toVector3(t){return t?t.set(this._x,this._y,this._z):new y(this._x,this._y,this._z)}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}}tt.DefaultOrder="XYZ",tt.RotationOrders=["XYZ","YZX","ZXY","XZY","YXZ","ZYX"];const et=new q,nt=new v;class it{constructor(){this.mask=1}set(t){this.mask=1<<t|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)}}let rt=0;const ot=new y,st=new v,at=new q,lt=new y,ct=new y,ut=new y,ht=new v,dt=new y(1,0,0),pt=new y(0,1,0),ft=new y(0,0,1),mt={type:"added"},gt={type:"removed"};function vt(){Object.defineProperty(this,"id",{value:rt++}),this.uuid=a.generateUUID(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=vt.DefaultUp.clone();const t=new y,e=new tt,n=new v,i=new y(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 q},normalMatrix:{value:new c}}),this.matrix=new q,this.matrixWorld=new q,this.matrixAutoUpdate=vt.DefaultMatrixAutoUpdate,this.matrixWorldNeedsUpdate=!1,this.layers=new it,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.userData={}}vt.DefaultUp=new y(0,1,0),vt.DefaultMatrixAutoUpdate=!0,vt.prototype=Object.assign(Object.create(r.prototype),{constructor:vt,isObject3D:!0,onBeforeRender:function(){},onAfterRender:function(){},applyMatrix4:function(t){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(t),this.matrix.decompose(this.position,this.quaternion,this.scale)},applyQuaternion:function(t){return this.quaternion.premultiply(t),this},setRotationFromAxisAngle:function(t,e){this.quaternion.setFromAxisAngle(t,e)},setRotationFromEuler:function(t){this.quaternion.setFromEuler(t,!0)},setRotationFromMatrix:function(t){this.quaternion.setFromRotationMatrix(t)},setRotationFromQuaternion:function(t){this.quaternion.copy(t)},rotateOnAxis:function(t,e){return st.setFromAxisAngle(t,e),this.quaternion.multiply(st),this},rotateOnWorldAxis:function(t,e){return st.setFromAxisAngle(t,e),this.quaternion.premultiply(st),this},rotateX:function(t){return this.rotateOnAxis(dt,t)},rotateY:function(t){return this.rotateOnAxis(pt,t)},rotateZ:function(t){return this.rotateOnAxis(ft,t)},translateOnAxis:function(t,e){return ot.copy(t).applyQuaternion(this.quaternion),this.position.add(ot.multiplyScalar(e)),this},translateX:function(t){return this.translateOnAxis(dt,t)},translateY:function(t){return this.translateOnAxis(pt,t)},translateZ:function(t){return this.translateOnAxis(ft,t)},localToWorld:function(t){return t.applyMatrix4(this.matrixWorld)},worldToLocal:function(t){return t.applyMatrix4(at.getInverse(this.matrixWorld))},lookAt:function(t,e,n){t.isVector3?lt.copy(t):lt.set(t,e,n);const i=this.parent;this.updateWorldMatrix(!0,!1),ct.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?at.lookAt(ct,lt,this.up):at.lookAt(lt,ct,this.up),this.quaternion.setFromRotationMatrix(at),i&&(at.extractRotation(i.matrixWorld),st.setFromRotationMatrix(at),this.quaternion.premultiply(st.inverse()))},add:function(t){if(arguments.length>1){for(let t=0;t<arguments.length;t++)this.add(arguments[t]);return this}return t===this?(console.error("THREE.Object3D.add: object can't be added as a child of itself.",t),this):(t&&t.isObject3D?(null!==t.parent&&t.parent.remove(t),t.parent=this,this.children.push(t),t.dispatchEvent(mt)):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",t),this)},remove:function(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(gt)),this},clear:function(){for(let t=0;t<this.children.length;t++){const e=this.children[t];e.parent=null,e.dispatchEvent(gt)}return this.children.length=0,this},attach:function(t){return this.updateWorldMatrix(!0,!1),at.getInverse(this.matrixWorld),null!==t.parent&&(t.parent.updateWorldMatrix(!0,!1),at.multiply(t.parent.matrixWorld)),t.applyMatrix4(at),t.updateWorldMatrix(!1,!1),this.add(t),this},getObjectById:function(t){return this.getObjectByProperty("id",t)},getObjectByName:function(t){return this.getObjectByProperty("name",t)},getObjectByProperty:function(t,e){if(this[t]===e)return this;for(let n=0,i=this.children.length;n<i;n++){const i=this.children[n].getObjectByProperty(t,e);if(void 0!==i)return i}},getWorldPosition:function(t){return void 0===t&&(console.warn("THREE.Object3D: .getWorldPosition() target is now required"),t=new y),this.updateWorldMatrix(!0,!1),t.setFromMatrixPosition(this.matrixWorld)},getWorldQuaternion:function(t){return void 0===t&&(console.warn("THREE.Object3D: .getWorldQuaternion() target is now required"),t=new v),this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(ct,t,ut),t},getWorldScale:function(t){return void 0===t&&(console.warn("THREE.Object3D: .getWorldScale() target is now required"),t=new y),this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(ct,ht,t),t},getWorldDirection:function(t){void 0===t&&(console.warn("THREE.Object3D: .getWorldDirection() target is now required"),t=new y),this.updateWorldMatrix(!0,!1);const e=this.matrixWorld.elements;return t.set(e[8],e[9],e[10]).normalize()},raycast:function(){},traverse:function(t){t(this);const e=this.children;for(let n=0,i=e.length;n<i;n++)e[n].traverse(t)},traverseVisible:function(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:function(t){const e=this.parent;null!==e&&(t(e),e.traverseAncestors(t))},updateMatrix:function(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0},updateMatrixWorld:function(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||t)&&(null===this.parent?this.matrixWorld.copy(this.matrix):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:function(t,e){const n=this.parent;if(!0===t&&null!==n&&n.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),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:function(t){const e=void 0===t||"string"==typeof t,n={};e&&(t={geometries:{},materials:{},textures:{},images:{},shapes:{}},n.metadata={version:4.5,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),"{}"!==JSON.stringify(this.userData)&&(i.userData=this.userData),i.layers=this.layers.mask,i.matrix=this.matrix.toArray(),!1===this.matrixAutoUpdate&&(i.matrixAutoUpdate=!1),this.isInstancedMesh&&(i.type="InstancedMesh",i.count=this.count,i.instanceMatrix=this.instanceMatrix.toJSON()),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(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(e){const e=o(t.geometries),i=o(t.materials),r=o(t.textures),s=o(t.images),a=o(t.shapes);e.length>0&&(n.geometries=e),i.length>0&&(n.materials=i),r.length>0&&(n.textures=r),s.length>0&&(n.images=s),a.length>0&&(n.shapes=a)}return n.object=i,n;function o(t){const e=[];for(const n in t){const i=t[n];delete i.metadata,e.push(i)}return e}},clone:function(t){return(new this.constructor).copy(this,t)},copy:function(t,e){if(void 0===e&&(e=!0),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.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.layers.mask=t.layers.mask,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.userData=JSON.parse(JSON.stringify(t.userData)),!0===e)for(let e=0;e<t.children.length;e++){const n=t.children[e];this.add(n.clone())}return this}});const yt=new y,bt=new y,xt=new c;class wt{constructor(t,e){Object.defineProperty(this,"isPlane",{value:!0}),this.normal=void 0!==t?t:new y(1,0,0),this.constant=void 0!==e?e:0}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=yt.subVectors(n,e).cross(bt.subVectors(t,e)).normalize();return this.setFromNormalAndCoplanarPoint(i,t),this}clone(){return(new this.constructor).copy(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 void 0===e&&(console.warn("THREE.Plane: .projectPoint() target is now required"),e=new y),e.copy(this.normal).multiplyScalar(-this.distanceToPoint(t)).add(t)}intersectLine(t,e){void 0===e&&(console.warn("THREE.Plane: .intersectLine() target is now required"),e=new y);const n=t.delta(yt),i=this.normal.dot(n);if(0===i)return 0===this.distanceToPoint(t.start)?e.copy(t.start):void 0;const r=-(t.start.dot(this.normal)+this.constant)/i;return r<0||r>1?void 0:e.copy(n).multiplyScalar(r).add(t.start)}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 void 0===t&&(console.warn("THREE.Plane: .coplanarPoint() target is now required"),t=new y),t.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(t,e){const n=e||xt.getNormalMatrix(t),i=this.coplanarPoint(yt).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}}const _t=new y,St=new y,Mt=new y,Et=new y,Tt=new y,At=new y,Lt=new y,Pt=new y,Ct=new y,Rt=new y;class Ot{constructor(t,e,n){this.a=void 0!==t?t:new y,this.b=void 0!==e?e:new y,this.c=void 0!==n?n:new y}static getNormal(t,e,n,i){void 0===i&&(console.warn("THREE.Triangle: .getNormal() target is now required"),i=new y),i.subVectors(n,e),_t.subVectors(t,e),i.cross(_t);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){_t.subVectors(i,e),St.subVectors(n,e),Mt.subVectors(t,e);const o=_t.dot(_t),s=_t.dot(St),a=_t.dot(Mt),l=St.dot(St),c=St.dot(Mt),u=o*l-s*s;if(void 0===r&&(console.warn("THREE.Triangle: .getBarycoord() target is now required"),r=new y),0===u)return r.set(-2,-1,-1);const h=1/u,d=(l*a-s*c)*h,p=(o*c-s*a)*h;return r.set(1-d-p,p,d)}static containsPoint(t,e,n,i){return this.getBarycoord(t,e,n,i,Et),Et.x>=0&&Et.y>=0&&Et.x+Et.y<=1}static getUV(t,e,n,i,r,o,s,a){return this.getBarycoord(t,e,n,i,Et),a.set(0,0),a.addScaledVector(r,Et.x),a.addScaledVector(o,Et.y),a.addScaledVector(s,Et.z),a}static isFrontFacing(t,e,n,i){return _t.subVectors(n,e),St.subVectors(t,e),_t.cross(St).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}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 _t.subVectors(this.c,this.b),St.subVectors(this.a,this.b),.5*_t.cross(St).length()}getMidpoint(t){return void 0===t&&(console.warn("THREE.Triangle: .getMidpoint() target is now required"),t=new y),t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(t){return Ot.getNormal(this.a,this.b,this.c,t)}getPlane(t){return void 0===t&&(console.warn("THREE.Triangle: .getPlane() target is now required"),t=new wt),t.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(t,e){return Ot.getBarycoord(t,this.a,this.b,this.c,e)}getUV(t,e,n,i,r){return Ot.getUV(t,this.a,this.b,this.c,e,n,i,r)}containsPoint(t){return Ot.containsPoint(t,this.a,this.b,this.c)}isFrontFacing(t){return Ot.isFrontFacing(this.a,this.b,this.c,t)}intersectsBox(t){return t.intersectsTriangle(this)}closestPointToPoint(t,e){void 0===e&&(console.warn("THREE.Triangle: .closestPointToPoint() target is now required"),e=new y);const n=this.a,i=this.b,r=this.c;let o,s;Tt.subVectors(i,n),At.subVectors(r,n),Pt.subVectors(t,n);const a=Tt.dot(Pt),l=At.dot(Pt);if(a<=0&&l<=0)return e.copy(n);Ct.subVectors(t,i);const c=Tt.dot(Ct),u=At.dot(Ct);if(c>=0&&u<=c)return e.copy(i);const h=a*u-c*l;if(h<=0&&a>=0&&c<=0)return o=a/(a-c),e.copy(n).addScaledVector(Tt,o);Rt.subVectors(t,r);const d=Tt.dot(Rt),p=At.dot(Rt);if(p>=0&&d<=p)return e.copy(r);const f=d*l-a*p;if(f<=0&&l>=0&&p<=0)return s=l/(l-p),e.copy(n).addScaledVector(At,s);const m=c*p-d*u;if(m<=0&&u-c>=0&&d-p>=0)return Lt.subVectors(r,i),s=(u-c)/(u-c+(d-p)),e.copy(i).addScaledVector(Lt,s);const g=1/(m+f+h);return o=f*g,s=h*g,e.copy(n).addScaledVector(Tt,o).addScaledVector(At,s)}equals(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}}const It={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},Nt={h:0,s:0,l:0},Dt={h:0,s:0,l:0};function zt(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}function kt(t){return t<.04045?.0773993808*t:Math.pow(.9478672986*t+.0521327014,2.4)}function Bt(t){return t<.0031308?12.92*t:1.055*Math.pow(t,.41666)-.055}class Ft{constructor(t,e,n){return Object.defineProperty(this,"isColor",{value:!0}),void 0===e&&void 0===n?this.set(t):this.setRGB(t,e,n)}set(t){return t&&t.isColor?this.copy(t):"number"==typeof t?this.setHex(t):"string"==typeof t&&this.setStyle(t),this}setScalar(t){return this.r=t,this.g=t,this.b=t,this}setHex(t){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(255&t)/255,this}setRGB(t,e,n){return this.r=t,this.g=e,this.b=n,this}setHSL(t,e,n){if(t=a.euclideanModulo(t,1),e=a.clamp(e,0,1),n=a.clamp(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=zt(r,i,t+1/3),this.g=zt(r,i,t),this.b=zt(r,i,t-1/3)}return this}setStyle(t){function e(e){void 0!==e&&parseFloat(e)<1&&console.warn("THREE.Color: Alpha component of "+t+" will be ignored.")}let n;if(n=/^((?:rgb|hsl)a?)\(\s*([^\)]*)\)/.exec(t)){let t;const i=n[1],r=n[2];switch(i){case"rgb":case"rgba":if(t=/^(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(r))return this.r=Math.min(255,parseInt(t[1],10))/255,this.g=Math.min(255,parseInt(t[2],10))/255,this.b=Math.min(255,parseInt(t[3],10))/255,e(t[5]),this;if(t=/^(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(r))return this.r=Math.min(100,parseInt(t[1],10))/100,this.g=Math.min(100,parseInt(t[2],10))/100,this.b=Math.min(100,parseInt(t[3],10))/100,e(t[5]),this;break;case"hsl":case"hsla":if(t=/^([0-9]*\.?[0-9]+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(r)){const n=parseFloat(t[1])/360,i=parseInt(t[2],10)/100,r=parseInt(t[3],10)/100;return e(t[5]),this.setHSL(n,i,r)}}}else if(n=/^\#([A-Fa-f0-9]+)$/.exec(t)){const t=n[1],e=t.length;if(3===e)return this.r=parseInt(t.charAt(0)+t.charAt(0),16)/255,this.g=parseInt(t.charAt(1)+t.charAt(1),16)/255,this.b=parseInt(t.charAt(2)+t.charAt(2),16)/255,this;if(6===e)return this.r=parseInt(t.charAt(0)+t.charAt(1),16)/255,this.g=parseInt(t.charAt(2)+t.charAt(3),16)/255,this.b=parseInt(t.charAt(4)+t.charAt(5),16)/255,this}return t&&t.length>0?this.setColorName(t):this}setColorName(t){const e=It[t];return void 0!==e?this.setHex(e):console.warn("THREE.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}copyGammaToLinear(t,e){return void 0===e&&(e=2),this.r=Math.pow(t.r,e),this.g=Math.pow(t.g,e),this.b=Math.pow(t.b,e),this}copyLinearToGamma(t,e){void 0===e&&(e=2);const n=e>0?1/e:1;return this.r=Math.pow(t.r,n),this.g=Math.pow(t.g,n),this.b=Math.pow(t.b,n),this}convertGammaToLinear(t){return this.copyGammaToLinear(this,t),this}convertLinearToGamma(t){return this.copyLinearToGamma(this,t),this}copySRGBToLinear(t){return this.r=kt(t.r),this.g=kt(t.g),this.b=kt(t.b),this}copyLinearToSRGB(t){return this.r=Bt(t.r),this.g=Bt(t.g),this.b=Bt(t.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(){return 255*this.r<<16^255*this.g<<8^255*this.b<<0}getHexString(){return("000000"+this.getHex().toString(16)).slice(-6)}getHSL(t){void 0===t&&(console.warn("THREE.Color: .getHSL() target is now required"),t={h:0,s:0,l:0});const e=this.r,n=this.g,i=this.b,r=Math.max(e,n,i),o=Math.min(e,n,i);let s,a;const l=(o+r)/2;if(o===r)s=0,a=0;else{const t=r-o;switch(a=l<=.5?t/(r+o):t/(2-r-o),r){case e:s=(n-i)/t+(n<i?6:0);break;case n:s=(i-e)/t+2;break;case i:s=(e-n)/t+4}s/=6}return t.h=s,t.s=a,t.l=l,t}getStyle(){return"rgb("+(255*this.r|0)+","+(255*this.g|0)+","+(255*this.b|0)+")"}offsetHSL(t,e,n){return this.getHSL(Nt),Nt.h+=t,Nt.s+=e,Nt.l+=n,this.setHSL(Nt.h,Nt.s,Nt.l),this}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}lerpHSL(t,e){this.getHSL(Nt),t.getHSL(Dt);const n=a.lerp(Nt.h,Dt.h,e),i=a.lerp(Nt.s,Dt.s,e),r=a.lerp(Nt.l,Dt.l,e);return this.setHSL(n,i,r),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),!0===t.normalized&&(this.r/=255,this.g/=255,this.b/=255),this}toJSON(){return this.getHex()}}Ft.NAMES=It,Ft.prototype.r=1,Ft.prototype.g=1,Ft.prototype.b=1;class Ut{constructor(t,e,n,i,r,o){this.a=t,this.b=e,this.c=n,this.normal=i&&i.isVector3?i:new y,this.vertexNormals=Array.isArray(i)?i:[],this.color=r&&r.isColor?r:new Ft,this.vertexColors=Array.isArray(r)?r:[],this.materialIndex=void 0!==o?o:0}clone(){return(new this.constructor).copy(this)}copy(t){this.a=t.a,this.b=t.b,this.c=t.c,this.normal.copy(t.normal),this.color.copy(t.color),this.materialIndex=t.materialIndex;for(let e=0,n=t.vertexNormals.length;e<n;e++)this.vertexNormals[e]=t.vertexNormals[e].clone();for(let e=0,n=t.vertexColors.length;e<n;e++)this.vertexColors[e]=t.vertexColors[e].clone();return this}}let jt=0;function Ht(){Object.defineProperty(this,"id",{value:jt++}),this.uuid=a.generateUUID(),this.name="",this.type="Material",this.fog=!0,this.blending=1,this.side=0,this.flatShading=!1,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.blendSrc=204,this.blendDst=205,this.blendEquation=100,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=3,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=519,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=7680,this.stencilZFail=7680,this.stencilZPass=7680,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.alphaTest=0,this.premultipliedAlpha=!1,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0}function Gt(t){Ht.call(this),this.type="MeshBasicMaterial",this.color=new Ft(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.combine=0,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.setValues(t)}Ht.prototype=Object.assign(Object.create(r.prototype),{constructor:Ht,isMaterial:!0,onBeforeCompile:function(){},customProgramCacheKey:function(){return this.onBeforeCompile.toString()},setValues:function(t){if(void 0!==t)for(const e in t){const n=t[e];if(void 0===n){console.warn("THREE.Material: '"+e+"' parameter is undefined.");continue}if("shading"===e){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=1===n;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:console.warn("THREE."+this.type+": '"+e+"' is not a property of this material.")}},toJSON:function(t){const e=void 0===t||"string"==typeof t;e&&(t={textures:{},images:{}});const n={metadata:{version:4.5,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}if(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),this.sheen&&this.sheen.isColor&&(n.sheen=this.sheen.getHex()),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity&&1!==this.emissiveIntensity&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.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.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),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(t).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(t).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(t).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(t).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(t).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(t).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(t).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(t).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(t).uuid,n.reflectivity=this.reflectivity,n.refractionRatio=this.refractionRatio,void 0!==this.combine&&(n.combine=this.combine),void 0!==this.envMapIntensity&&(n.envMapIntensity=this.envMapIntensity)),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(t).uuid),void 0!==this.size&&(n.size=this.size),void 0!==this.sizeAttenuation&&(n.sizeAttenuation=this.sizeAttenuation),1!==this.blending&&(n.blending=this.blending),!0===this.flatShading&&(n.flatShading=this.flatShading),0!==this.side&&(n.side=this.side),this.vertexColors&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),!0===this.transparent&&(n.transparent=this.transparent),n.depthFunc=this.depthFunc,n.depthTest=this.depthTest,n.depthWrite=this.depthWrite,n.stencilWrite=this.stencilWrite,n.stencilWriteMask=this.stencilWriteMask,n.stencilFunc=this.stencilFunc,n.stencilRef=this.stencilRef,n.stencilFuncMask=this.stencilFuncMask,n.stencilFail=this.stencilFail,n.stencilZFail=this.stencilZFail,n.stencilZPass=this.stencilZPass,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),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.premultipliedAlpha&&(n.premultipliedAlpha=this.premultipliedAlpha),!0===this.wireframe&&(n.wireframe=this.wireframe),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(n.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(n.wireframeLinejoin=this.wireframeLinejoin),!0===this.morphTargets&&(n.morphTargets=!0),!0===this.morphNormals&&(n.morphNormals=!0),!0===this.skinning&&(n.skinning=!0),!1===this.visible&&(n.visible=!1),!1===this.toneMapped&&(n.toneMapped=!1),"{}"!==JSON.stringify(this.userData)&&(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:function(){return(new this.constructor).copy(this)},copy:function(t){this.name=t.name,this.fog=t.fog,this.blending=t.blending,this.side=t.side,this.flatShading=t.flatShading,this.vertexColors=t.vertexColors,this.opacity=t.opacity,this.transparent=t.transparent,this.blendSrc=t.blendSrc,this.blendDst=t.blendDst,this.blendEquation=t.blendEquation,this.blendSrcAlpha=t.blendSrcAlpha,this.blendDstAlpha=t.blendDstAlpha,this.blendEquationAlpha=t.blendEquationAlpha,this.depthFunc=t.depthFunc,this.depthTest=t.depthTest,this.depthWrite=t.depthWrite,this.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.premultipliedAlpha=t.premultipliedAlpha,this.visible=t.visible,this.toneMapped=t.toneMapped,this.userData=JSON.parse(JSON.stringify(t.userData)),this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Object.defineProperty(Ht.prototype,"needsUpdate",{set:function(t){!0===t&&this.version++}}),Gt.prototype=Object.create(Ht.prototype),Gt.prototype.constructor=Gt,Gt.prototype.isMeshBasicMaterial=!0,Gt.prototype.copy=function(t){return Ht.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this};const Vt=new y,Wt=new l;function qt(t,e,n){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.name="",this.array=t,this.itemSize=e,this.count=void 0!==t?t.length/e:0,this.normalized=!0===n,this.usage=35044,this.updateRange={offset:0,count:-1},this.version=0}function Xt(t,e,n){qt.call(this,new Int8Array(t),e,n)}function Yt(t,e,n){qt.call(this,new Uint8Array(t),e,n)}function Zt(t,e,n){qt.call(this,new Uint8ClampedArray(t),e,n)}function Jt(t,e,n){qt.call(this,new Int16Array(t),e,n)}function Kt(t,e,n){qt.call(this,new Uint16Array(t),e,n)}function $t(t,e,n){qt.call(this,new Int32Array(t),e,n)}function Qt(t,e,n){qt.call(this,new Uint32Array(t),e,n)}function te(t,e,n){qt.call(this,new Float32Array(t),e,n)}function ee(t,e,n){qt.call(this,new Float64Array(t),e,n)}Object.defineProperty(qt.prototype,"needsUpdate",{set:function(t){!0===t&&this.version++}}),Object.assign(qt.prototype,{isBufferAttribute:!0,onUploadCallback:function(){},setUsage:function(t){return this.usage=t,this},copy:function(t){return this.name=t.name,this.array=new t.array.constructor(t.array),this.itemSize=t.itemSize,this.count=t.count,this.normalized=t.normalized,this.usage=t.usage,this},copyAt:function(t,e,n){t*=this.itemSize,n*=e.itemSize;for(let i=0,r=this.itemSize;i<r;i++)this.array[t+i]=e.array[n+i];return this},copyArray:function(t){return this.array.set(t),this},copyColorsArray:function(t){const e=this.array;let n=0;for(let i=0,r=t.length;i<r;i++){let r=t[i];void 0===r&&(console.warn("THREE.BufferAttribute.copyColorsArray(): color is undefined",i),r=new Ft),e[n++]=r.r,e[n++]=r.g,e[n++]=r.b}return this},copyVector2sArray:function(t){const e=this.array;let n=0;for(let i=0,r=t.length;i<r;i++){let r=t[i];void 0===r&&(console.warn("THREE.BufferAttribute.copyVector2sArray(): vector is undefined",i),r=new l),e[n++]=r.x,e[n++]=r.y}return this},copyVector3sArray:function(t){const e=this.array;let n=0;for(let i=0,r=t.length;i<r;i++){let r=t[i];void 0===r&&(console.warn("THREE.BufferAttribute.copyVector3sArray(): vector is undefined",i),r=new y),e[n++]=r.x,e[n++]=r.y,e[n++]=r.z}return this},copyVector4sArray:function(t){const e=this.array;let n=0;for(let i=0,r=t.length;i<r;i++){let r=t[i];void 0===r&&(console.warn("THREE.BufferAttribute.copyVector4sArray(): vector is undefined",i),r=new f),e[n++]=r.x,e[n++]=r.y,e[n++]=r.z,e[n++]=r.w}return this},applyMatrix3:function(t){if(2===this.itemSize)for(let e=0,n=this.count;e<n;e++)Wt.fromBufferAttribute(this,e),Wt.applyMatrix3(t),this.setXY(e,Wt.x,Wt.y);else if(3===this.itemSize)for(let e=0,n=this.count;e<n;e++)Vt.fromBufferAttribute(this,e),Vt.applyMatrix3(t),this.setXYZ(e,Vt.x,Vt.y,Vt.z);return this},applyMatrix4:function(t){for(let e=0,n=this.count;e<n;e++)Vt.x=this.getX(e),Vt.y=this.getY(e),Vt.z=this.getZ(e),Vt.applyMatrix4(t),this.setXYZ(e,Vt.x,Vt.y,Vt.z);return this},applyNormalMatrix:function(t){for(let e=0,n=this.count;e<n;e++)Vt.x=this.getX(e),Vt.y=this.getY(e),Vt.z=this.getZ(e),Vt.applyNormalMatrix(t),this.setXYZ(e,Vt.x,Vt.y,Vt.z);return this},transformDirection:function(t){for(let e=0,n=this.count;e<n;e++)Vt.x=this.getX(e),Vt.y=this.getY(e),Vt.z=this.getZ(e),Vt.transformDirection(t),this.setXYZ(e,Vt.x,Vt.y,Vt.z);return this},set:function(t,e){return void 0===e&&(e=0),this.array.set(t,e),this},getX:function(t){return this.array[t*this.itemSize]},setX:function(t,e){return this.array[t*this.itemSize]=e,this},getY:function(t){return this.array[t*this.itemSize+1]},setY:function(t,e){return this.array[t*this.itemSize+1]=e,this},getZ:function(t){return this.array[t*this.itemSize+2]},setZ:function(t,e){return this.array[t*this.itemSize+2]=e,this},getW:function(t){return this.array[t*this.itemSize+3]},setW:function(t,e){return this.array[t*this.itemSize+3]=e,this},setXY:function(t,e,n){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=n,this},setXYZ:function(t,e,n,i){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=n,this.array[t+2]=i,this},setXYZW:function(t,e,n,i,r){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=n,this.array[t+2]=i,this.array[t+3]=r,this},onUpload:function(t){return this.onUploadCallback=t,this},clone:function(){return new this.constructor(this.array,this.itemSize).copy(this)},toJSON:function(){return{itemSize:this.itemSize,type:this.array.constructor.name,array:Array.prototype.slice.call(this.array),normalized:this.normalized}}}),Xt.prototype=Object.create(qt.prototype),Xt.prototype.constructor=Xt,Yt.prototype=Object.create(qt.prototype),Yt.prototype.constructor=Yt,Zt.prototype=Object.create(qt.prototype),Zt.prototype.constructor=Zt,Jt.prototype=Object.create(qt.prototype),Jt.prototype.constructor=Jt,Kt.prototype=Object.create(qt.prototype),Kt.prototype.constructor=Kt,$t.prototype=Object.create(qt.prototype),$t.prototype.constructor=$t,Qt.prototype=Object.create(qt.prototype),Qt.prototype.constructor=Qt,te.prototype=Object.create(qt.prototype),te.prototype.constructor=te,ee.prototype=Object.create(qt.prototype),ee.prototype.constructor=ee;class ne{constructor(){this.vertices=[],this.normals=[],this.colors=[],this.uvs=[],this.uvs2=[],this.groups=[],this.morphTargets={},this.skinWeights=[],this.skinIndices=[],this.boundingBox=null,this.boundingSphere=null,this.verticesNeedUpdate=!1,this.normalsNeedUpdate=!1,this.colorsNeedUpdate=!1,this.uvsNeedUpdate=!1,this.groupsNeedUpdate=!1}computeGroups(t){const e=[];let n,i,r=void 0;const o=t.faces;for(i=0;i<o.length;i++){const t=o[i];t.materialIndex!==r&&(r=t.materialIndex,void 0!==n&&(n.count=3*i-n.start,e.push(n)),n={start:3*i,materialIndex:r})}void 0!==n&&(n.count=3*i-n.start,e.push(n)),this.groups=e}fromGeometry(t){const e=t.faces,n=t.vertices,i=t.faceVertexUvs,r=i[0]&&i[0].length>0,o=i[1]&&i[1].length>0,s=t.morphTargets,a=s.length;let c;if(a>0){c=[];for(let t=0;t<a;t++)c[t]={name:s[t].name,data:[]};this.morphTargets.position=c}const u=t.morphNormals,h=u.length;let d;if(h>0){d=[];for(let t=0;t<h;t++)d[t]={name:u[t].name,data:[]};this.morphTargets.normal=d}const p=t.skinIndices,f=t.skinWeights,m=p.length===n.length,g=f.length===n.length;n.length>0&&0===e.length&&console.error("THREE.DirectGeometry: Faceless geometries are not supported.");for(let t=0;t<e.length;t++){const v=e[t];this.vertices.push(n[v.a],n[v.b],n[v.c]);const y=v.vertexNormals;if(3===y.length)this.normals.push(y[0],y[1],y[2]);else{const t=v.normal;this.normals.push(t,t,t)}const b=v.vertexColors;if(3===b.length)this.colors.push(b[0],b[1],b[2]);else{const t=v.color;this.colors.push(t,t,t)}if(!0===r){const e=i[0][t];void 0!==e?this.uvs.push(e[0],e[1],e[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv ",t),this.uvs.push(new l,new l,new l))}if(!0===o){const e=i[1][t];void 0!==e?this.uvs2.push(e[0],e[1],e[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv2 ",t),this.uvs2.push(new l,new l,new l))}for(let t=0;t<a;t++){const e=s[t].vertices;c[t].data.push(e[v.a],e[v.b],e[v.c])}for(let e=0;e<h;e++){const n=u[e].vertexNormals[t];d[e].data.push(n.a,n.b,n.c)}m&&this.skinIndices.push(p[v.a],p[v.b],p[v.c]),g&&this.skinWeights.push(f[v.a],f[v.b],f[v.c])}return this.computeGroups(t),this.verticesNeedUpdate=t.verticesNeedUpdate,this.normalsNeedUpdate=t.normalsNeedUpdate,this.colorsNeedUpdate=t.colorsNeedUpdate,this.uvsNeedUpdate=t.uvsNeedUpdate,this.groupsNeedUpdate=t.groupsNeedUpdate,null!==t.boundingSphere&&(this.boundingSphere=t.boundingSphere.clone()),null!==t.boundingBox&&(this.boundingBox=t.boundingBox.clone()),this}}function ie(t){if(0===t.length)return-1/0;let e=t[0];for(let n=1,i=t.length;n<i;++n)t[n]>e&&(e=t[n]);return e}let re=1;const oe=new q,se=new vt,ae=new y,le=new w,ce=new w,ue=new y;function he(){Object.defineProperty(this,"id",{value:re+=2}),this.uuid=a.generateUUID(),this.name="",this.type="BufferGeometry",this.index=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={}}he.prototype=Object.assign(Object.create(r.prototype),{constructor:he,isBufferGeometry:!0,getIndex:function(){return this.index},setIndex:function(t){return Array.isArray(t)?this.index=new(ie(t)>65535?Qt:Kt)(t,1):this.index=t,this},getAttribute:function(t){return this.attributes[t]},setAttribute:function(t,e){return this.attributes[t]=e,this},deleteAttribute:function(t){return delete this.attributes[t],this},addGroup:function(t,e,n){this.groups.push({start:t,count:e,materialIndex:void 0!==n?n:0})},clearGroups:function(){this.groups=[]},setDrawRange:function(t,e){this.drawRange.start=t,this.drawRange.count=e},applyMatrix4:function(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 c).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},rotateX:function(t){return oe.makeRotationX(t),this.applyMatrix4(oe),this},rotateY:function(t){return oe.makeRotationY(t),this.applyMatrix4(oe),this},rotateZ:function(t){return oe.makeRotationZ(t),this.applyMatrix4(oe),this},translate:function(t,e,n){return oe.makeTranslation(t,e,n),this.applyMatrix4(oe),this},scale:function(t,e,n){return oe.makeScale(t,e,n),this.applyMatrix4(oe),this},lookAt:function(t){return se.lookAt(t),se.updateMatrix(),this.applyMatrix4(se.matrix),this},center:function(){return this.computeBoundingBox(),this.boundingBox.getCenter(ae).negate(),this.translate(ae.x,ae.y,ae.z),this},setFromObject:function(t){const e=t.geometry;if(t.isPoints||t.isLine){const t=new te(3*e.vertices.length,3),n=new te(3*e.colors.length,3);if(this.setAttribute("position",t.copyVector3sArray(e.vertices)),this.setAttribute("color",n.copyColorsArray(e.colors)),e.lineDistances&&e.lineDistances.length===e.vertices.length){const t=new te(e.lineDistances.length,1);this.setAttribute("lineDistance",t.copyArray(e.lineDistances))}null!==e.boundingSphere&&(this.boundingSphere=e.boundingSphere.clone()),null!==e.boundingBox&&(this.boundingBox=e.boundingBox.clone())}else t.isMesh&&e&&e.isGeometry&&this.fromGeometry(e);return this},setFromPoints:function(t){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)}return this.setAttribute("position",new te(e,3)),this},updateFromObject:function(t){let e=t.geometry;if(t.isMesh){let t=e.__directGeometry;if(!0===e.elementsNeedUpdate&&(t=void 0,e.elementsNeedUpdate=!1),void 0===t)return this.fromGeometry(e);t.verticesNeedUpdate=e.verticesNeedUpdate,t.normalsNeedUpdate=e.normalsNeedUpdate,t.colorsNeedUpdate=e.colorsNeedUpdate,t.uvsNeedUpdate=e.uvsNeedUpdate,t.groupsNeedUpdate=e.groupsNeedUpdate,e.verticesNeedUpdate=!1,e.normalsNeedUpdate=!1,e.colorsNeedUpdate=!1,e.uvsNeedUpdate=!1,e.groupsNeedUpdate=!1,e=t}if(!0===e.verticesNeedUpdate){const t=this.attributes.position;void 0!==t&&(t.copyVector3sArray(e.vertices),t.needsUpdate=!0),e.verticesNeedUpdate=!1}if(!0===e.normalsNeedUpdate){const t=this.attributes.normal;void 0!==t&&(t.copyVector3sArray(e.normals),t.needsUpdate=!0),e.normalsNeedUpdate=!1}if(!0===e.colorsNeedUpdate){const t=this.attributes.color;void 0!==t&&(t.copyColorsArray(e.colors),t.needsUpdate=!0),e.colorsNeedUpdate=!1}if(e.uvsNeedUpdate){const t=this.attributes.uv;void 0!==t&&(t.copyVector2sArray(e.uvs),t.needsUpdate=!0),e.uvsNeedUpdate=!1}if(e.lineDistancesNeedUpdate){const t=this.attributes.lineDistance;void 0!==t&&(t.copyArray(e.lineDistances),t.needsUpdate=!0),e.lineDistancesNeedUpdate=!1}return e.groupsNeedUpdate&&(e.computeGroups(t.geometry),this.groups=e.groups,e.groupsNeedUpdate=!1),this},fromGeometry:function(t){return t.__directGeometry=(new ne).fromGeometry(t),this.fromDirectGeometry(t.__directGeometry)},fromDirectGeometry:function(t){const e=new Float32Array(3*t.vertices.length);if(this.setAttribute("position",new qt(e,3).copyVector3sArray(t.vertices)),t.normals.length>0){const e=new Float32Array(3*t.normals.length);this.setAttribute("normal",new qt(e,3).copyVector3sArray(t.normals))}if(t.colors.length>0){const e=new Float32Array(3*t.colors.length);this.setAttribute("color",new qt(e,3).copyColorsArray(t.colors))}if(t.uvs.length>0){const e=new Float32Array(2*t.uvs.length);this.setAttribute("uv",new qt(e,2).copyVector2sArray(t.uvs))}if(t.uvs2.length>0){const e=new Float32Array(2*t.uvs2.length);this.setAttribute("uv2",new qt(e,2).copyVector2sArray(t.uvs2))}this.groups=t.groups;for(const e in t.morphTargets){const n=[],i=t.morphTargets[e];for(let t=0,e=i.length;t<e;t++){const e=i[t],r=new te(3*e.data.length,3);r.name=e.name,n.push(r.copyVector3sArray(e.data))}this.morphAttributes[e]=n}if(t.skinIndices.length>0){const e=new te(4*t.skinIndices.length,4);this.setAttribute("skinIndex",e.copyVector4sArray(t.skinIndices))}if(t.skinWeights.length>0){const e=new te(4*t.skinWeights.length,4);this.setAttribute("skinWeight",e.copyVector4sArray(t.skinWeights))}return null!==t.boundingSphere&&(this.boundingSphere=t.boundingSphere.clone()),null!==t.boundingBox&&(this.boundingBox=t.boundingBox.clone()),this},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new w);const t=this.attributes.position,e=this.morphAttributes.position;if(t&&t.isGLBufferAttribute)return console.error('THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box. Alternatively set "mesh.frustumCulled" to "false".',this),void this.boundingBox.set(new y(-1/0,-1/0,-1/0),new y(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];le.setFromBufferAttribute(n),this.morphTargetsRelative?(ue.addVectors(this.boundingBox.min,le.min),this.boundingBox.expandByPoint(ue),ue.addVectors(this.boundingBox.max,le.max),this.boundingBox.expandByPoint(ue)):(this.boundingBox.expandByPoint(le.min),this.boundingBox.expandByPoint(le.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&console.error('THREE.BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)},computeBoundingSphere:function(){null===this.boundingSphere&&(this.boundingSphere=new k);const t=this.attributes.position,e=this.morphAttributes.position;if(t&&t.isGLBufferAttribute)return console.error('THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere. Alternatively set "mesh.frustumCulled" to "false".',this),void this.boundingSphere.set(new y,1/0);if(t){const n=this.boundingSphere.center;if(le.setFromBufferAttribute(t),e)for(let t=0,n=e.length;t<n;t++){const n=e[t];ce.setFromBufferAttribute(n),this.morphTargetsRelative?(ue.addVectors(le.min,ce.min),le.expandByPoint(ue),ue.addVectors(le.max,ce.max),le.expandByPoint(ue)):(le.expandByPoint(ce.min),le.expandByPoint(ce.max))}le.getCenter(n);let i=0;for(let e=0,r=t.count;e<r;e++)ue.fromBufferAttribute(t,e),i=Math.max(i,n.distanceToSquared(ue));if(e)for(let r=0,o=e.length;r<o;r++){const o=e[r],s=this.morphTargetsRelative;for(let e=0,r=o.count;e<r;e++)ue.fromBufferAttribute(o,e),s&&(ae.fromBufferAttribute(t,e),ue.add(ae)),i=Math.max(i,n.distanceToSquared(ue))}this.boundingSphere.radius=Math.sqrt(i),isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}},computeFaceNormals:function(){},computeVertexNormals:function(){const t=this.index,e=this.getAttribute("position");if(void 0!==e){let n=this.getAttribute("normal");if(void 0===n)n=new qt(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 y,r=new y,o=new y,s=new y,a=new y,l=new y,c=new y,u=new y;if(t)for(let h=0,d=t.count;h<d;h+=3){const d=t.getX(h+0),p=t.getX(h+1),f=t.getX(h+2);i.fromBufferAttribute(e,d),r.fromBufferAttribute(e,p),o.fromBufferAttribute(e,f),c.subVectors(o,r),u.subVectors(i,r),c.cross(u),s.fromBufferAttribute(n,d),a.fromBufferAttribute(n,p),l.fromBufferAttribute(n,f),s.add(c),a.add(c),l.add(c),n.setXYZ(d,s.x,s.y,s.z),n.setXYZ(p,a.x,a.y,a.z),n.setXYZ(f,l.x,l.y,l.z)}else for(let t=0,s=e.count;t<s;t+=3)i.fromBufferAttribute(e,t+0),r.fromBufferAttribute(e,t+1),o.fromBufferAttribute(e,t+2),c.subVectors(o,r),u.subVectors(i,r),c.cross(u),n.setXYZ(t+0,c.x,c.y,c.z),n.setXYZ(t+1,c.x,c.y,c.z),n.setXYZ(t+2,c.x,c.y,c.z);this.normalizeNormals(),n.needsUpdate=!0}},merge:function(t,e){if(!t||!t.isBufferGeometry)return void console.error("THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.",t);void 0===e&&(e=0,console.warn("THREE.BufferGeometry.merge(): Overwriting original geometry, starting at offset=0. Use BufferGeometryUtils.mergeBufferGeometries() for lossless merge."));const n=this.attributes;for(const i in n){if(void 0===t.attributes[i])continue;const r=n[i].array,o=t.attributes[i],s=o.array,a=o.itemSize*e,l=Math.min(s.length,r.length-a);for(let t=0,e=a;t<l;t++,e++)r[e]=s[t]}return this},normalizeNormals:function(){const t=this.attributes.normal;for(let e=0,n=t.count;e<n;e++)ue.fromBufferAttribute(t,e),ue.normalize(),t.setXYZ(e,ue.x,ue.y,ue.z)},toNonIndexed:function(){function t(t,e){const n=t.array,i=t.itemSize,r=t.normalized,o=new n.constructor(e.length*i);let s=0,a=0;for(let t=0,r=e.length;t<r;t++){s=e[t]*i;for(let t=0;t<i;t++)o[a++]=n[s++]}return new qt(o,i,r)}if(null===this.index)return console.warn("THREE.BufferGeometry.toNonIndexed(): Geometry is already non-indexed."),this;const e=new he,n=this.index.array,i=this.attributes;for(const r in i){const o=t(i[r],n);e.setAttribute(r,o)}const r=this.morphAttributes;for(const i in r){const o=[],s=r[i];for(let e=0,i=s.length;e<i;e++){const i=t(s[e],n);o.push(i)}e.morphAttributes[i]=o}e.morphTargetsRelative=this.morphTargetsRelative;const o=this.groups;for(let t=0,n=o.length;t<n;t++){const n=o[t];e.addGroup(n.start,n.count,n.materialIndex)}return e},toJSON:function(){const t={metadata:{version:4.5,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(t.uuid=this.uuid,t.type=this.type,""!==this.name&&(t.name=this.name),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],r=i.toJSON(t.data);""!==i.name&&(r.name=i.name),t.data.attributes[e]=r}const i={};let r=!1;for(const e in this.morphAttributes){const n=this.morphAttributes[e],o=[];for(let e=0,i=n.length;e<i;e++){const i=n[e],r=i.toJSON(t.data);""!==i.name&&(r.name=i.name),o.push(r)}o.length>0&&(i[e]=o,r=!0)}r&&(t.data.morphAttributes=i,t.data.morphTargetsRelative=this.morphTargetsRelative);const o=this.groups;o.length>0&&(t.data.groups=JSON.parse(JSON.stringify(o)));const s=this.boundingSphere;return null!==s&&(t.data.boundingSphere={center:s.center.toArray(),radius:s.radius}),t},clone:function(){return(new he).copy(this)},copy:function(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(e));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 o=t.groups;for(let t=0,e=o.length;t<e;t++){const e=o[t];this.addGroup(e.start,e.count,e.materialIndex)}const s=t.boundingBox;null!==s&&(this.boundingBox=s.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:function(){this.dispatchEvent({type:"dispose"})}});const de=new q,pe=new W,fe=new k,me=new y,ge=new y,ve=new y,ye=new y,be=new y,xe=new y,we=new y,_e=new y,Se=new y,Me=new l,Ee=new l,Te=new l,Ae=new y,Le=new y;function Pe(t,e){vt.call(this),this.type="Mesh",this.geometry=void 0!==t?t:new he,this.material=void 0!==e?e:new Gt,this.updateMorphTargets()}function Ce(t,e,n,r,o,s,a,l){let c;if(c=1===e.side?r.intersectTriangle(a,s,o,!0,l):r.intersectTriangle(o,s,a,e.side!==i,l),null===c)return null;Le.copy(l),Le.applyMatrix4(t.matrixWorld);const u=n.ray.origin.distanceTo(Le);return u<n.near||u>n.far?null:{distance:u,point:Le.clone(),object:t}}function Re(t,e,n,i,r,o,s,a,c,u,h,d){me.fromBufferAttribute(r,u),ge.fromBufferAttribute(r,h),ve.fromBufferAttribute(r,d);const p=t.morphTargetInfluences;if(e.morphTargets&&o&&p){we.set(0,0,0),_e.set(0,0,0),Se.set(0,0,0);for(let t=0,e=o.length;t<e;t++){const e=p[t],n=o[t];0!==e&&(ye.fromBufferAttribute(n,u),be.fromBufferAttribute(n,h),xe.fromBufferAttribute(n,d),s?(we.addScaledVector(ye,e),_e.addScaledVector(be,e),Se.addScaledVector(xe,e)):(we.addScaledVector(ye.sub(me),e),_e.addScaledVector(be.sub(ge),e),Se.addScaledVector(xe.sub(ve),e)))}me.add(we),ge.add(_e),ve.add(Se)}t.isSkinnedMesh&&(t.boneTransform(u,me),t.boneTransform(h,ge),t.boneTransform(d,ve));const f=Ce(t,e,n,i,me,ge,ve,Ae);if(f){a&&(Me.fromBufferAttribute(a,u),Ee.fromBufferAttribute(a,h),Te.fromBufferAttribute(a,d),f.uv=Ot.getUV(Ae,me,ge,ve,Me,Ee,Te,new l)),c&&(Me.fromBufferAttribute(c,u),Ee.fromBufferAttribute(c,h),Te.fromBufferAttribute(c,d),f.uv2=Ot.getUV(Ae,me,ge,ve,Me,Ee,Te,new l));const t=new Ut(u,h,d);Ot.getNormal(me,ge,ve,t.normal),f.face=t}return f}Pe.prototype=Object.assign(Object.create(vt.prototype),{constructor:Pe,isMesh:!0,copy:function(t){return vt.prototype.copy.call(this,t),void 0!==t.morphTargetInfluences&&(this.morphTargetInfluences=t.morphTargetInfluences.slice()),void 0!==t.morphTargetDictionary&&(this.morphTargetDictionary=Object.assign({},t.morphTargetDictionary)),this.material=t.material,this.geometry=t.geometry,this},updateMorphTargets:function(){const t=this.geometry;if(t.isBufferGeometry){const e=t.morphAttributes,n=Object.keys(e);if(n.length>0){const t=e[n[0]];if(void 0!==t){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let e=0,n=t.length;e<n;e++){const n=t[e].name||String(e);this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=e}}}}else{const e=t.morphTargets;void 0!==e&&e.length>0&&console.error("THREE.Mesh.updateMorphTargets() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}},raycast:function(t,e){const n=this.geometry,i=this.material,r=this.matrixWorld;if(void 0===i)return;if(null===n.boundingSphere&&n.computeBoundingSphere(),fe.copy(n.boundingSphere),fe.applyMatrix4(r),!1===t.ray.intersectsSphere(fe))return;if(de.getInverse(r),pe.copy(t.ray).applyMatrix4(de),null!==n.boundingBox&&!1===pe.intersectsBox(n.boundingBox))return;let o;if(n.isBufferGeometry){const r=n.index,s=n.attributes.position,a=n.morphAttributes.position,l=n.morphTargetsRelative,c=n.attributes.uv,u=n.attributes.uv2,h=n.groups,d=n.drawRange;if(null!==r)if(Array.isArray(i))for(let n=0,p=h.length;n<p;n++){const p=h[n],f=i[p.materialIndex];for(let n=Math.max(p.start,d.start),i=Math.min(p.start+p.count,d.start+d.count);n<i;n+=3){const i=r.getX(n),h=r.getX(n+1),d=r.getX(n+2);o=Re(this,f,t,pe,s,a,l,c,u,i,h,d),o&&(o.faceIndex=Math.floor(n/3),o.face.materialIndex=p.materialIndex,e.push(o))}}else{for(let n=Math.max(0,d.start),h=Math.min(r.count,d.start+d.count);n<h;n+=3){const h=r.getX(n),d=r.getX(n+1),p=r.getX(n+2);o=Re(this,i,t,pe,s,a,l,c,u,h,d,p),o&&(o.faceIndex=Math.floor(n/3),e.push(o))}}else if(void 0!==s)if(Array.isArray(i))for(let n=0,r=h.length;n<r;n++){const r=h[n],p=i[r.materialIndex];for(let n=Math.max(r.start,d.start),i=Math.min(r.start+r.count,d.start+d.count);n<i;n+=3){o=Re(this,p,t,pe,s,a,l,c,u,n,n+1,n+2),o&&(o.faceIndex=Math.floor(n/3),o.face.materialIndex=r.materialIndex,e.push(o))}}else{for(let n=Math.max(0,d.start),r=Math.min(s.count,d.start+d.count);n<r;n+=3){o=Re(this,i,t,pe,s,a,l,c,u,n,n+1,n+2),o&&(o.faceIndex=Math.floor(n/3),e.push(o))}}}else if(n.isGeometry){const r=Array.isArray(i),s=n.vertices,a=n.faces;let c;const u=n.faceVertexUvs[0];u.length>0&&(c=u);for(let n=0,u=a.length;n<u;n++){const u=a[n],h=r?i[u.materialIndex]:i;if(void 0===h)continue;const d=s[u.a],p=s[u.b],f=s[u.c];if(o=Ce(this,h,t,pe,d,p,f,Ae),o){if(c&&c[n]){const t=c[n];Me.copy(t[0]),Ee.copy(t[1]),Te.copy(t[2]),o.uv=Ot.getUV(Ae,d,p,f,Me,Ee,Te,new l)}o.face=u,o.faceIndex=n,e.push(o)}}}}});class Oe extends he{constructor(t=1,e=1,n=1,i=1,r=1,o=1){super(),this.type="BoxBufferGeometry",this.parameters={width:t,height:e,depth:n,widthSegments:i,heightSegments:r,depthSegments:o};const s=this;i=Math.floor(i),r=Math.floor(r),o=Math.floor(o);const a=[],l=[],c=[],u=[];let h=0,d=0;function p(t,e,n,i,r,o,p,f,m,g,v){const b=o/m,x=p/g,w=o/2,_=p/2,S=f/2,M=m+1,E=g+1;let T=0,A=0;const L=new y;for(let o=0;o<E;o++){const s=o*x-_;for(let a=0;a<M;a++){const h=a*b-w;L[t]=h*i,L[e]=s*r,L[n]=S,l.push(L.x,L.y,L.z),L[t]=0,L[e]=0,L[n]=f>0?1:-1,c.push(L.x,L.y,L.z),u.push(a/m),u.push(1-o/g),T+=1}}for(let t=0;t<g;t++)for(let e=0;e<m;e++){const n=h+e+M*t,i=h+e+M*(t+1),r=h+(e+1)+M*(t+1),o=h+(e+1)+M*t;a.push(n,i,o),a.push(i,r,o),A+=6}s.addGroup(d,A,v),d+=A,h+=T}p("z","y","x",-1,-1,n,e,t,o,r,0),p("z","y","x",1,-1,n,e,-t,o,r,1),p("x","z","y",1,1,t,n,e,i,o,2),p("x","z","y",1,-1,t,n,-e,i,o,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 te(l,3)),this.setAttribute("normal",new te(c,3)),this.setAttribute("uv",new te(u,2))}}function Ie(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)?e[n][i]=r.clone():Array.isArray(r)?e[n][i]=r.slice():e[n][i]=r}}return e}function Ne(t){const e={};for(let n=0;n<t.length;n++){const i=Ie(t[n]);for(const t in i)e[t]=i[t]}return e}const De={clone:Ie,merge:Ne};function ze(t){Ht.call(this),this.type="ShaderMaterial",this.defines={},this.uniforms={},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.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv2:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,this.glslVersion=null,void 0!==t&&(void 0!==t.attributes&&console.error("THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead."),this.setValues(t))}function ke(){vt.call(this),this.type="Camera",this.matrixWorldInverse=new q,this.projectionMatrix=new q,this.projectionMatrixInverse=new q}function Be(t,e,n,i){ke.call(this),this.type="PerspectiveCamera",this.fov=void 0!==t?t:50,this.zoom=1,this.near=void 0!==n?n:.1,this.far=void 0!==i?i:2e3,this.focus=10,this.aspect=void 0!==e?e:1,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}ze.prototype=Object.create(Ht.prototype),ze.prototype.constructor=ze,ze.prototype.isShaderMaterial=!0,ze.prototype.copy=function(t){return Ht.prototype.copy.call(this,t),this.fragmentShader=t.fragmentShader,this.vertexShader=t.vertexShader,this.uniforms=Ie(t.uniforms),this.defines=Object.assign({},t.defines),this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.lights=t.lights,this.clipping=t.clipping,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this.extensions=Object.assign({},t.extensions),this.glslVersion=t.glslVersion,this},ze.prototype.toJSON=function(t){const e=Ht.prototype.toJSON.call(this,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;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},ke.prototype=Object.assign(Object.create(vt.prototype),{constructor:ke,isCamera:!0,copy:function(t,e){return vt.prototype.copy.call(this,t,e),this.matrixWorldInverse.copy(t.matrixWorldInverse),this.projectionMatrix.copy(t.projectionMatrix),this.projectionMatrixInverse.copy(t.projectionMatrixInverse),this},getWorldDirection:function(t){void 0===t&&(console.warn("THREE.Camera: .getWorldDirection() target is now required"),t=new y),this.updateWorldMatrix(!0,!1);const e=this.matrixWorld.elements;return t.set(-e[8],-e[9],-e[10]).normalize()},updateMatrixWorld:function(t){vt.prototype.updateMatrixWorld.call(this,t),this.matrixWorldInverse.getInverse(this.matrixWorld)},updateWorldMatrix:function(t,e){vt.prototype.updateWorldMatrix.call(this,t,e),this.matrixWorldInverse.getInverse(this.matrixWorld)},clone:function(){return(new this.constructor).copy(this)}}),Be.prototype=Object.assign(Object.create(ke.prototype),{constructor:Be,isPerspectiveCamera:!0,copy:function(t,e){return ke.prototype.copy.call(this,t,e),this.fov=t.fov,this.zoom=t.zoom,this.near=t.near,this.far=t.far,this.focus=t.focus,this.aspect=t.aspect,this.view=null===t.view?null:Object.assign({},t.view),this.filmGauge=t.filmGauge,this.filmOffset=t.filmOffset,this},setFocalLength:function(t){const e=.5*this.getFilmHeight()/t;this.fov=2*a.RAD2DEG*Math.atan(e),this.updateProjectionMatrix()},getFocalLength:function(){const t=Math.tan(.5*a.DEG2RAD*this.fov);return.5*this.getFilmHeight()/t},getEffectiveFOV:function(){return 2*a.RAD2DEG*Math.atan(Math.tan(.5*a.DEG2RAD*this.fov)/this.zoom)},getFilmWidth:function(){return this.filmGauge*Math.min(this.aspect,1)},getFilmHeight:function(){return this.filmGauge/Math.max(this.aspect,1)},setViewOffset:function(t,e,n,i,r,o){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=o,this.updateProjectionMatrix()},clearViewOffset:function(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()},updateProjectionMatrix:function(){const t=this.near;let e=t*Math.tan(.5*a.DEG2RAD*this.fov)/this.zoom,n=2*e,i=this.aspect*n,r=-.5*i;const o=this.view;if(null!==this.view&&this.view.enabled){const t=o.fullWidth,s=o.fullHeight;r+=o.offsetX*i/t,e-=o.offsetY*n/s,i*=o.width/t,n*=o.height/s}const s=this.filmOffset;0!==s&&(r+=t*s/this.getFilmWidth()),this.projectionMatrix.makePerspective(r,r+i,e,e-n,t,this.far),this.projectionMatrixInverse.getInverse(this.projectionMatrix)},toJSON:function(t){const e=vt.prototype.toJSON.call(this,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}});function Fe(t,e,n){if(vt.call(this),this.type="CubeCamera",!0!==n.isWebGLCubeRenderTarget)return void console.error("THREE.CubeCamera: The constructor now expects an instance of WebGLCubeRenderTarget as third parameter.");this.renderTarget=n;const i=new Be(90,1,t,e);i.layers=this.layers,i.up.set(0,-1,0),i.lookAt(new y(1,0,0)),this.add(i);const r=new Be(90,1,t,e);r.layers=this.layers,r.up.set(0,-1,0),r.lookAt(new y(-1,0,0)),this.add(r);const o=new Be(90,1,t,e);o.layers=this.layers,o.up.set(0,0,1),o.lookAt(new y(0,1,0)),this.add(o);const s=new Be(90,1,t,e);s.layers=this.layers,s.up.set(0,0,-1),s.lookAt(new y(0,-1,0)),this.add(s);const a=new Be(90,1,t,e);a.layers=this.layers,a.up.set(0,-1,0),a.lookAt(new y(0,0,1)),this.add(a);const l=new Be(90,1,t,e);l.layers=this.layers,l.up.set(0,-1,0),l.lookAt(new y(0,0,-1)),this.add(l),this.update=function(t,e){null===this.parent&&this.updateMatrixWorld();const c=t.xr.enabled,u=t.getRenderTarget();t.xr.enabled=!1;const h=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,t.setRenderTarget(n,0),t.render(e,i),t.setRenderTarget(n,1),t.render(e,r),t.setRenderTarget(n,2),t.render(e,o),t.setRenderTarget(n,3),t.render(e,s),t.setRenderTarget(n,4),t.render(e,a),n.texture.generateMipmaps=h,t.setRenderTarget(n,5),t.render(e,l),t.setRenderTarget(u),t.xr.enabled=c}}function Ue(t,e,n,i,r,o,s,a,l,c){t=void 0!==t?t:[],e=void 0!==e?e:301,s=void 0!==s?s:1022,p.call(this,t,e,n,i,r,o,s,a,l,c),this.flipY=!1,this._needsFlipEnvMap=!0}function je(t,e,n){Number.isInteger(e)&&(console.warn("THREE.WebGLCubeRenderTarget: constructor signature is now WebGLCubeRenderTarget( size, options )"),e=n),m.call(this,t,t,e),e=e||{},this.texture=new Ue(void 0,e.mapping,e.wrapS,e.wrapT,e.magFilter,e.minFilter,e.format,e.type,e.anisotropy,e.encoding),this.texture._needsFlipEnvMap=!1}function He(t,e,n,i,r,o,s,a,l,c,u,h){p.call(this,null,o,s,a,l,c,i,r,u,h),this.image={data:t||null,width:e||1,height:n||1},this.magFilter=void 0!==l?l:1003,this.minFilter=void 0!==c?c:1003,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.needsUpdate=!0}Fe.prototype=Object.create(vt.prototype),Fe.prototype.constructor=Fe,Ue.prototype=Object.create(p.prototype),Ue.prototype.constructor=Ue,Ue.prototype.isCubeTexture=!0,Object.defineProperty(Ue.prototype,"images",{get:function(){return this.image},set:function(t){this.image=t}}),je.prototype=Object.create(m.prototype),je.prototype.constructor=je,je.prototype.isWebGLCubeRenderTarget=!0,je.prototype.fromEquirectangularTexture=function(t,e){this.texture.type=e.type,this.texture.format=1023,this.texture.encoding=e.encoding,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\tvarying vec3 vWorldDirection;\n\n\t\t\tvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\n\t\t\t\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n\n\t\t\t}\n\n\t\t\tvoid main() {\n\n\t\t\t\tvWorldDirection = transformDirection( position, modelMatrix );\n\n\t\t\t\t#include <begin_vertex>\n\t\t\t\t#include <project_vertex>\n\n\t\t\t}\n\t\t",fragmentShader:"\n\n\t\t\tuniform sampler2D tEquirect;\n\n\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t#include <common>\n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 direction = normalize( vWorldDirection );\n\n\t\t\t\tvec2 sampleUV = equirectUv( direction );\n\n\t\t\t\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\n\t\t\t}\n\t\t"},i=new Oe(5,5,5),r=new ze({name:"CubemapFromEquirect",uniforms:Ie(n.uniforms),vertexShader:n.vertexShader,fragmentShader:n.fragmentShader,side:1,blending:0});r.uniforms.tEquirect.value=e;const o=new Pe(i,r),s=e.minFilter;1008===e.minFilter&&(e.minFilter=1006);return new Fe(1,10,this).update(t,o),e.minFilter=s,o.geometry.dispose(),o.material.dispose(),this},je.prototype.clear=function(t,e,n,i){const r=t.getRenderTarget();for(let r=0;r<6;r++)t.setRenderTarget(this,r),t.clear(e,n,i);t.setRenderTarget(r)},He.prototype=Object.create(p.prototype),He.prototype.constructor=He,He.prototype.isDataTexture=!0;const Ge=new k,Ve=new y;class We{constructor(t,e,n,i,r,o){this.planes=[void 0!==t?t:new wt,void 0!==e?e:new wt,void 0!==n?n:new wt,void 0!==i?i:new wt,void 0!==r?r:new wt,void 0!==o?o:new wt]}set(t,e,n,i,r,o){const s=this.planes;return s[0].copy(t),s[1].copy(e),s[2].copy(n),s[3].copy(i),s[4].copy(r),s[5].copy(o),this}clone(){return(new this.constructor).copy(this)}copy(t){const e=this.planes;for(let n=0;n<6;n++)e[n].copy(t.planes[n]);return this}setFromProjectionMatrix(t){const e=this.planes,n=t.elements,i=n[0],r=n[1],o=n[2],s=n[3],a=n[4],l=n[5],c=n[6],u=n[7],h=n[8],d=n[9],p=n[10],f=n[11],m=n[12],g=n[13],v=n[14],y=n[15];return e[0].setComponents(s-i,u-a,f-h,y-m).normalize(),e[1].setComponents(s+i,u+a,f+h,y+m).normalize(),e[2].setComponents(s+r,u+l,f+d,y+g).normalize(),e[3].setComponents(s-r,u-l,f-d,y-g).normalize(),e[4].setComponents(s-o,u-c,f-p,y-v).normalize(),e[5].setComponents(s+o,u+c,f+p,y+v).normalize(),this}intersectsObject(t){const e=t.geometry;return null===e.boundingSphere&&e.computeBoundingSphere(),Ge.copy(e.boundingSphere).applyMatrix4(t.matrixWorld),this.intersectsSphere(Ge)}intersectsSprite(t){return Ge.center.set(0,0,0),Ge.radius=.7071067811865476,Ge.applyMatrix4(t.matrixWorld),this.intersectsSphere(Ge)}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(Ve.x=i.normal.x>0?t.max.x:t.min.x,Ve.y=i.normal.y>0?t.max.y:t.min.y,Ve.z=i.normal.z>0?t.max.z:t.min.z,i.distanceToPoint(Ve)<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}}function qe(){let t=null,e=!1,n=null,i=null;function r(e,o){n(e,o),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 Xe(t,e){const n=e.isWebGL2,i=new WeakMap;return{get:function(t){return t.isInterleavedBufferAttribute&&(t=t.data),i.get(t)},remove:function(e){e.isInterleavedBufferAttribute&&(e=e.data);const n=i.get(e);n&&(t.deleteBuffer(n.buffer),i.delete(e))},update:function(e,r){if(e.isGLBufferAttribute){var o=i.get(e);return void((!o||o.version<e.version)&&i.set(e,{buffer:e.buffer,type:e.type,bytesPerElement:e.elementSize,version:e.version}))}e.isInterleavedBufferAttribute&&(e=e.data);const s=i.get(e);void 0===s?i.set(e,function(e,n){const i=e.array,r=e.usage,o=t.createBuffer();t.bindBuffer(n,o),t.bufferData(n,i,r),e.onUploadCallback();let s=5126;return i instanceof Float32Array?s=5126:i instanceof Float64Array?console.warn("THREE.WebGLAttributes: Unsupported data buffer format: Float64Array."):i instanceof Uint16Array?s=5123:i instanceof Int16Array?s=5122:i instanceof Uint32Array?s=5125:i instanceof Int32Array?s=5124:i instanceof Int8Array?s=5120:i instanceof Uint8Array&&(s=5121),{buffer:o,type:s,bytesPerElement:i.BYTES_PER_ELEMENT,version:e.version}}(e,r)):s.version<e.version&&(!function(e,i,r){const o=i.array,s=i.updateRange;t.bindBuffer(r,e),-1===s.count?t.bufferSubData(r,0,o):(n?t.bufferSubData(r,s.offset*o.BYTES_PER_ELEMENT,o,s.offset,s.count):t.bufferSubData(r,s.offset*o.BYTES_PER_ELEMENT,o.subarray(s.offset,s.offset+s.count)),s.count=-1)}(s.buffer,e,r),s.version=e.version)}}}class Ye extends he{constructor(t,e,n,i){super(),this.type="PlaneBufferGeometry",this.parameters={width:t,height:e,widthSegments:n,heightSegments:i};const r=(t=t||1)/2,o=(e=e||1)/2,s=Math.floor(n)||1,a=Math.floor(i)||1,l=s+1,c=a+1,u=t/s,h=e/a,d=[],p=[],f=[],m=[];for(let t=0;t<c;t++){const e=t*h-o;for(let n=0;n<l;n++){const i=n*u-r;p.push(i,-e,0),f.push(0,0,1),m.push(n/s),m.push(1-t/a)}}for(let t=0;t<a;t++)for(let e=0;e<s;e++){const n=e+l*t,i=e+l*(t+1),r=e+1+l*(t+1),o=e+1+l*t;d.push(n,i,o),d.push(i,r,o)}this.setIndex(d),this.setAttribute("position",new te(p,3)),this.setAttribute("normal",new te(f,3)),this.setAttribute("uv",new te(m,2))}}const Ze={alphamap_fragment:"#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, vUv ).g;\n#endif",alphamap_pars_fragment:"#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",alphatest_fragment:"#ifdef ALPHATEST\n\tif ( diffuseColor.a < ALPHATEST ) discard;\n#endif",aomap_fragment:"#ifdef USE_AOMAP\n\tfloat ambientOcclusion = ( texture2D( aoMap, vUv2 ).r - 1.0 ) * aoMapIntensity + 1.0;\n\treflectedLight.indirectDiffuse *= ambientOcclusion;\n\t#if defined( USE_ENVMAP ) && defined( STANDARD )\n\t\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\t\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.specularRoughness );\n\t#endif\n#endif",aomap_pars_fragment:"#ifdef USE_AOMAP\n\tuniform sampler2D aoMap;\n\tuniform float aoMapIntensity;\n#endif",begin_vertex:"vec3 transformed = vec3( position );",beginnormal_vertex:"vec3 objectNormal = vec3( normal );\n#ifdef USE_TANGENT\n\tvec3 objectTangent = vec3( tangent.xyz );\n#endif",bsdfs:"vec2 integrateSpecularBRDF( const in float dotNV, const in float roughness ) {\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n\tvec4 r = roughness * c0 + c1;\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n\treturn vec2( -1.04, 1.04 ) * a004 + r.zw;\n}\nfloat punctualLightIntensityToIrradianceFactor( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n#if defined ( PHYSICALLY_CORRECT_LIGHTS )\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#else\n\tif( cutoffDistance > 0.0 && decayExponent > 0.0 ) {\n\t\treturn pow( saturate( -lightDistance / cutoffDistance + 1.0 ), decayExponent );\n\t}\n\treturn 1.0;\n#endif\n}\nvec3 BRDF_Diffuse_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 specularColor, const in float dotLH ) {\n\tfloat fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );\n\treturn ( 1.0 - specularColor ) * fresnel + specularColor;\n}\nvec3 F_Schlick_RoughnessDependent( const in vec3 F0, const in float dotNV, const in float roughness ) {\n\tfloat fresnel = exp2( ( -5.55473 * dotNV - 6.98316 ) * dotNV );\n\tvec3 Fr = max( vec3( 1.0 - roughness ), F0 ) - F0;\n\treturn Fr * fresnel + F0;\n}\nfloat G_GGX_Smith( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\tfloat gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\treturn 1.0 / ( gl * gv );\n}\nfloat G_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}\nvec3 BRDF_Specular_GGX( const in IncidentLight incidentLight, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float roughness ) {\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( incidentLight.direction + viewDir );\n\tfloat dotNL = saturate( dot( normal, incidentLight.direction ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\tfloat G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\tfloat D = D_GGX( alpha, dotNH );\n\treturn F * ( G * 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 > 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 * transposeMat3( 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}\nvec3 BRDF_Specular_GGX_Environment( const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tvec2 brdf = integrateSpecularBRDF( dotNV, roughness );\n\treturn specularColor * brdf.x + brdf.y;\n}\nvoid BRDF_Specular_Multiscattering_Environment( const in GeometricContext geometry, const in vec3 specularColor, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\tvec3 F = F_Schlick_RoughnessDependent( specularColor, dotNV, roughness );\n\tvec2 brdf = integrateSpecularBRDF( dotNV, roughness );\n\tvec3 FssEss = F * brdf.x + brdf.y;\n\tfloat Ess = brdf.x + brdf.y;\n\tfloat Ems = 1.0 - Ess;\n\tvec3 Favg = specularColor + ( 1.0 - specularColor ) * 0.047619;\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n\tsingleScatter += FssEss;\n\tmultiScatter += Fms * Ems;\n}\nfloat 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_Specular_BlinnPhong( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float shininess ) {\n\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\n\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\tfloat G = G_BlinnPhong_Implicit( );\n\tfloat D = D_BlinnPhong( shininess, dotNH );\n\treturn F * ( G * D );\n}\nfloat GGXRoughnessToBlinnExponent( const in float ggxRoughness ) {\n\treturn ( 2.0 / pow2( ggxRoughness + 0.0001 ) - 2.0 );\n}\nfloat BlinnExponentToGGXRoughness( const in float blinnExponent ) {\n\treturn sqrt( 2.0 / ( blinnExponent + 2.0 ) );\n}\n#if defined( USE_SHEEN )\nfloat D_Charlie(float roughness, float NoH) {\n\tfloat invAlpha = 1.0 / roughness;\n\tfloat cos2h = NoH * NoH;\n\tfloat sin2h = max(1.0 - cos2h, 0.0078125);\treturn (2.0 + invAlpha) * pow(sin2h, invAlpha * 0.5) / (2.0 * PI);\n}\nfloat V_Neubelt(float NoV, float NoL) {\n\treturn saturate(1.0 / (4.0 * (NoL + NoV - NoL * NoV)));\n}\nvec3 BRDF_Specular_Sheen( const in float roughness, const in vec3 L, const in GeometricContext geometry, vec3 specularColor ) {\n\tvec3 N = geometry.normal;\n\tvec3 V = geometry.viewDir;\n\tvec3 H = normalize( V + L );\n\tfloat dotNH = saturate( dot( N, H ) );\n\treturn specularColor * D_Charlie( roughness, dotNH ) * V_Neubelt( dot(N, V), dot(N, L) );\n}\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( vUv );\n\t\tvec2 dSTdy = dFdy( vUv );\n\t\tfloat Hll = bumpScale * texture2D( bumpMap, vUv ).x;\n\t\tfloat dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;\n\t\tfloat dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;\n\t\treturn vec2( dBx, dBy );\n\t}\n\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy ) {\n\t\tvec3 vSigmaX = vec3( dFdx( surf_pos.x ), dFdx( surf_pos.y ), dFdx( surf_pos.z ) );\n\t\tvec3 vSigmaY = vec3( dFdy( surf_pos.x ), dFdy( surf_pos.y ), dFdy( surf_pos.z ) );\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 );\n\t\tfDet *= ( float( gl_FrontFacing ) * 2.0 - 1.0 );\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#pragma unroll_loop_start\n\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\tplane = clippingPlanes[ i ];\n\t\tif ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;\n\t}\n\t#pragma unroll_loop_end\n\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\tbool clipped = true;\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tclipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t\tif ( clipped ) discard;\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:"#ifdef USE_COLOR\n\tdiffuseColor.rgb *= vColor;\n#endif",color_pars_fragment:"#ifdef USE_COLOR\n\tvarying vec3 vColor;\n#endif",color_pars_vertex:"#if defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvarying vec3 vColor;\n#endif",color_vertex:"#if defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvColor = vec3( 1.0 );\n#endif\n#ifdef USE_COLOR\n\tvColor.xyz *= color.xyz;\n#endif\n#ifdef USE_INSTANCING_COLOR\n\tvColor.xyz *= instanceColor.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; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); }\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 max3( vec3 v ) { return max( max( v.x, v.y ), v.z ); }\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};\nstruct GeometricContext {\n\tvec3 position;\n\tvec3 normal;\n\tvec3 viewDir;\n#ifdef CLEARCOAT\n\tvec3 clearcoatNormal;\n#endif\n};\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}\nvec3 projectOnPlane(in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\tfloat distance = dot( planeNormal, point - pointOnPlane );\n\treturn - distance * planeNormal + point;\n}\nfloat sideOfPlane( in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\treturn sign( dot( point - pointOnPlane, planeNormal ) );\n}\nvec3 linePlaneIntersect( in vec3 pointOnLine, in vec3 lineDirection, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\treturn lineDirection * ( dot( planeNormal, pointOnPlane - pointOnLine ) / dot( planeNormal, lineDirection ) ) + pointOnLine;\n}\nmat3 transposeMat3( const in mat3 m ) {\n\tmat3 tmp;\n\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n\treturn tmp;\n}\nfloat linearToRelativeLuminance( const in vec3 color ) {\n\tvec3 weights = vec3( 0.2126, 0.7152, 0.0722 );\n\treturn dot( weights, color.rgb );\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}",cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\n\t#define cubeUV_maxMipLevel 8.0\n\t#define cubeUV_minMipLevel 4.0\n\t#define cubeUV_maxTileSize 256.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\tfloat texelSize = 1.0 / ( 3.0 * cubeUV_maxTileSize );\n\t\tvec2 uv = getUV( direction, face ) * ( faceSize - 1.0 );\n\t\tvec2 f = fract( uv );\n\t\tuv += 0.5 - f;\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\tif ( mipInt < cubeUV_maxMipLevel ) {\n\t\t\tuv.y += 2.0 * cubeUV_maxTileSize;\n\t\t}\n\t\tuv.y += filterInt * 2.0 * cubeUV_minTileSize;\n\t\tuv.x += 3.0 * max( 0.0, cubeUV_maxTileSize - 2.0 * faceSize );\n\t\tuv *= texelSize;\n\t\tvec3 tl = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\n\t\tuv.x += texelSize;\n\t\tvec3 tr = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\n\t\tuv.y += texelSize;\n\t\tvec3 br = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\n\t\tuv.x -= texelSize;\n\t\tvec3 bl = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\n\t\tvec3 tm = mix( tl, tr, f.x );\n\t\tvec3 bm = mix( bl, br, f.x );\n\t\treturn mix( tm, bm, f.y );\n\t}\n\t#define r0 1.0\n\t#define v0 0.339\n\t#define m0 - 2.0\n\t#define r1 0.8\n\t#define v1 0.276\n\t#define m1 - 1.0\n\t#define r4 0.4\n\t#define v4 0.046\n\t#define m4 2.0\n\t#define r5 0.305\n\t#define v5 0.016\n\t#define m5 3.0\n\t#define r6 0.21\n\t#define v6 0.0038\n\t#define m6 4.0\n\tfloat roughnessToMip( float roughness ) {\n\t\tfloat mip = 0.0;\n\t\tif ( roughness >= r1 ) {\n\t\t\tmip = ( r0 - roughness ) * ( m1 - m0 ) / ( r0 - r1 ) + m0;\n\t\t} else if ( roughness >= r4 ) {\n\t\t\tmip = ( r1 - roughness ) * ( m4 - m1 ) / ( r1 - r4 ) + m1;\n\t\t} else if ( roughness >= r5 ) {\n\t\t\tmip = ( r4 - roughness ) * ( m5 - m4 ) / ( r4 - r5 ) + m4;\n\t\t} else if ( roughness >= r6 ) {\n\t\t\tmip = ( r5 - roughness ) * ( m6 - m5 ) / ( r5 - r6 ) + 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 ), m0, cubeUV_maxMipLevel );\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_INSTANCING\n\tmat3 m = mat3( instanceMatrix );\n\ttransformedNormal /= vec3( dot( m[ 0 ], m[ 0 ] ), dot( m[ 1 ], m[ 1 ] ), dot( m[ 2 ], m[ 2 ] ) );\n\ttransformedNormal = m * transformedNormal;\n#endif\ntransformedNormal = normalMatrix * transformedNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n#ifdef USE_TANGENT\n\tvec3 transformedTangent = ( modelViewMatrix * vec4( objectTangent, 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, vUv ).x * displacementScale + displacementBias );\n#endif",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vUv );\n\temissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb;\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif",encodings_fragment:"gl_FragColor = linearToOutputTexel( gl_FragColor );",encodings_pars_fragment:"\nvec4 LinearToLinear( in vec4 value ) {\n\treturn value;\n}\nvec4 GammaToLinear( in vec4 value, in float gammaFactor ) {\n\treturn vec4( pow( value.rgb, vec3( gammaFactor ) ), value.a );\n}\nvec4 LinearToGamma( in vec4 value, in float gammaFactor ) {\n\treturn vec4( pow( value.rgb, vec3( 1.0 / gammaFactor ) ), value.a );\n}\nvec4 sRGBToLinear( 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 LinearTosRGB( 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}\nvec4 RGBEToLinear( in vec4 value ) {\n\treturn vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 );\n}\nvec4 LinearToRGBE( in vec4 value ) {\n\tfloat maxComponent = max( max( value.r, value.g ), value.b );\n\tfloat fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 );\n\treturn vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 );\n}\nvec4 RGBMToLinear( in vec4 value, in float maxRange ) {\n\treturn vec4( value.rgb * value.a * maxRange, 1.0 );\n}\nvec4 LinearToRGBM( in vec4 value, in float maxRange ) {\n\tfloat maxRGB = max( value.r, max( value.g, value.b ) );\n\tfloat M = clamp( maxRGB / maxRange, 0.0, 1.0 );\n\tM = ceil( M * 255.0 ) / 255.0;\n\treturn vec4( value.rgb / ( M * maxRange ), M );\n}\nvec4 RGBDToLinear( in vec4 value, in float maxRange ) {\n\treturn vec4( value.rgb * ( ( maxRange / 255.0 ) / value.a ), 1.0 );\n}\nvec4 LinearToRGBD( in vec4 value, in float maxRange ) {\n\tfloat maxRGB = max( value.r, max( value.g, value.b ) );\n\tfloat D = max( maxRange / maxRGB, 1.0 );\n\tD = clamp( floor( D ) / 255.0, 0.0, 1.0 );\n\treturn vec4( value.rgb * ( D * ( 255.0 / maxRange ) ), D );\n}\nconst mat3 cLogLuvM = mat3( 0.2209, 0.3390, 0.4184, 0.1138, 0.6780, 0.7319, 0.0102, 0.1130, 0.2969 );\nvec4 LinearToLogLuv( in vec4 value ) {\n\tvec3 Xp_Y_XYZp = cLogLuvM * value.rgb;\n\tXp_Y_XYZp = max( Xp_Y_XYZp, vec3( 1e-6, 1e-6, 1e-6 ) );\n\tvec4 vResult;\n\tvResult.xy = Xp_Y_XYZp.xy / Xp_Y_XYZp.z;\n\tfloat Le = 2.0 * log2(Xp_Y_XYZp.y) + 127.0;\n\tvResult.w = fract( Le );\n\tvResult.z = ( Le - ( floor( vResult.w * 255.0 ) ) / 255.0 ) / 255.0;\n\treturn vResult;\n}\nconst mat3 cLogLuvInverseM = mat3( 6.0014, -2.7008, -1.7996, -1.3320, 3.1029, -5.7721, 0.3008, -1.0882, 5.6268 );\nvec4 LogLuvToLinear( in vec4 value ) {\n\tfloat Le = value.z * 255.0 + value.w;\n\tvec3 Xp_Y_XYZp;\n\tXp_Y_XYZp.y = exp2( ( Le - 127.0 ) / 2.0 );\n\tXp_Y_XYZp.z = Xp_Y_XYZp.y / value.y;\n\tXp_Y_XYZp.x = value.x * Xp_Y_XYZp.z;\n\tvec3 vRGB = cLogLuvInverseM * Xp_Y_XYZp.rgb;\n\treturn vec4( max( vRGB, 0.0 ), 1.0 );\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, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\tvec4 envColor = textureCubeUV( envMap, reflectVec, 0.0 );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\t#ifndef ENVMAP_TYPE_CUBE_UV\n\t\tenvColor = envMapTexelToLinear( envColor );\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 int maxMipLevel;\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\t\n#endif",envmap_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float reflectivity;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\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 )\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:"#if defined( USE_ENVMAP )\n\t#ifdef ENVMAP_MODE_REFRACTION\n\t\tuniform float refractionRatio;\n\t#endif\n\tvec3 getLightProbeIndirectIrradiance( const in GeometricContext geometry, const in int maxMIPLevel ) {\n\t\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\n\t\t#ifdef ENVMAP_TYPE_CUBE\n\t\t\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryVec, float( maxMIPLevel ) );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = textureCube( envMap, queryVec, float( maxMIPLevel ) );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, worldNormal, 1.0 );\n\t\t#else\n\t\t\tvec4 envMapColor = vec4( 0.0 );\n\t\t#endif\n\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t}\n\tfloat getSpecularMIPLevel( const in float roughness, const in int maxMIPLevel ) {\n\t\tfloat maxMIPLevelScalar = float( maxMIPLevel );\n\t\tfloat sigma = PI * roughness * roughness / ( 1.0 + roughness );\n\t\tfloat desiredMIPLevel = maxMIPLevelScalar + log2( sigma );\n\t\treturn clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );\n\t}\n\tvec3 getLightProbeIndirectRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in int maxMIPLevel ) {\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( -viewDir, normal );\n\t\t\treflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( -viewDir, normal, refractionRatio );\n\t\t#endif\n\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\tfloat specularMIPLevel = getSpecularMIPLevel( roughness, maxMIPLevel );\n\t\t#ifdef ENVMAP_TYPE_CUBE\n\t\t\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryReflectVec, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = textureCube( envMap, queryReflectVec, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness );\n\t\t#endif\n\t\treturn envMapColor.rgb * envMapIntensity;\n\t}\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\tfogDepth = - mvPosition.z;\n#endif",fog_pars_vertex:"#ifdef USE_FOG\n\tvarying float fogDepth;\n#endif",fog_fragment:"#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = 1.0 - exp( - fogDensity * fogDensity * fogDepth * fogDepth );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, fogDepth );\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 fogDepth;\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 texture2D( gradientMap, coord ).rgb;\n\t#else\n\t\treturn ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 );\n\t#endif\n}",lightmap_fragment:"#ifdef USE_LIGHTMAP\n\tvec4 lightMapTexel= texture2D( lightMap, vUv2 );\n\treflectedLight.indirectDiffuse += PI * lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;\n#endif",lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif",lights_lambert_vertex:"vec3 diffuse = vec3( 1.0 );\nGeometricContext geometry;\ngeometry.position = mvPosition.xyz;\ngeometry.normal = normalize( transformedNormal );\ngeometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( -mvPosition.xyz );\nGeometricContext backGeometry;\nbackGeometry.position = geometry.position;\nbackGeometry.normal = -geometry.normal;\nbackGeometry.viewDir = geometry.viewDir;\nvLightFront = vec3( 0.0 );\nvIndirectFront = vec3( 0.0 );\n#ifdef DOUBLE_SIDED\n\tvLightBack = vec3( 0.0 );\n\tvIndirectBack = vec3( 0.0 );\n#endif\nIncidentLight directLight;\nfloat dotNL;\nvec3 directLightColor_Diffuse;\nvIndirectFront += getAmbientLightIrradiance( ambientLightColor );\nvIndirectFront += getLightProbeIrradiance( lightProbe, geometry );\n#ifdef DOUBLE_SIDED\n\tvIndirectBack += getAmbientLightIrradiance( ambientLightColor );\n\tvIndirectBack += getLightProbeIrradiance( lightProbe, backGeometry );\n#endif\n#if NUM_POINT_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tgetPointDirectLightIrradiance( pointLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tgetSpotDirectLightIrradiance( spotLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if NUM_DIR_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tgetDirectionalDirectLightIrradiance( directionalLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\tvIndirectFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvIndirectBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry );\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif",lights_pars_begin:"uniform bool receiveShadow;\nuniform vec3 ambientLightColor;\nuniform vec3 lightProbe[ 9 ];\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 GeometricContext geometry ) {\n\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\n\tvec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n\treturn irradiance;\n}\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treturn irradiance;\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 getDirectionalDirectLightIrradiance( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tdirectLight.color = directionalLight.color;\n\t\tdirectLight.direction = directionalLight.direction;\n\t\tdirectLight.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 getPointDirectLightIrradiance( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tvec3 lVector = pointLight.position - geometry.position;\n\t\tdirectLight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tdirectLight.color = pointLight.color;\n\t\tdirectLight.color *= punctualLightIntensityToIrradianceFactor( lightDistance, pointLight.distance, pointLight.decay );\n\t\tdirectLight.visible = ( directLight.color != vec3( 0.0 ) );\n\t}\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 getSpotDirectLightIrradiance( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tvec3 lVector = spotLight.position - geometry.position;\n\t\tdirectLight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tfloat angleCos = dot( directLight.direction, spotLight.direction );\n\t\tif ( angleCos > spotLight.coneCos ) {\n\t\t\tfloat spotEffect = smoothstep( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\t\tdirectLight.color = spotLight.color;\n\t\t\tdirectLight.color *= spotEffect * punctualLightIntensityToIrradianceFactor( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tdirectLight.visible = true;\n\t\t} else {\n\t\t\tdirectLight.color = vec3( 0.0 );\n\t\t\tdirectLight.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 GeometricContext geometry ) {\n\t\tfloat dotNL = dot( geometry.normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tirradiance *= PI;\n\t\t#endif\n\t\treturn irradiance;\n\t}\n#endif",lights_toon_fragment:"ToonMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;",lights_toon_pars_fragment:"varying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\nstruct ToonMaterial {\n\tvec3 diffuseColor;\n};\nvoid RE_Direct_Toon( const in IncidentLight directLight, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Toon\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Toon\n#define Material_LightProbeLOD( material )\t(0)",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;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\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 GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_Specular_BlinnPhong( directLight, geometry, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong\n#define Material_LightProbeLOD( material )\t(0)",lights_physical_fragment:"PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nvec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) );\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\nmaterial.specularRoughness = max( roughnessFactor, 0.0525 );material.specularRoughness += geometryRoughness;\nmaterial.specularRoughness = min( material.specularRoughness, 1.0 );\n#ifdef REFLECTIVITY\n\tmaterial.specularColor = mix( vec3( MAXIMUM_SPECULAR_COEFFICIENT * pow2( reflectivity ) ), diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( DEFAULT_SPECULAR_COEFFICIENT ), diffuseColor.rgb, metalnessFactor );\n#endif\n#ifdef CLEARCOAT\n\tmaterial.clearcoat = clearcoat;\n\tmaterial.clearcoatRoughness = clearcoatRoughness;\n\t#ifdef USE_CLEARCOATMAP\n\t\tmaterial.clearcoat *= texture2D( clearcoatMap, vUv ).x;\n\t#endif\n\t#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\t\tmaterial.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vUv ).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_SHEEN\n\tmaterial.sheenColor = sheen;\n#endif",lights_physical_pars_fragment:"struct PhysicalMaterial {\n\tvec3 diffuseColor;\n\tfloat specularRoughness;\n\tvec3 specularColor;\n#ifdef CLEARCOAT\n\tfloat clearcoat;\n\tfloat clearcoatRoughness;\n#endif\n#ifdef USE_SHEEN\n\tvec3 sheenColor;\n#endif\n};\n#define MAXIMUM_SPECULAR_COEFFICIENT 0.16\n#define DEFAULT_SPECULAR_COEFFICIENT 0.04\nfloat clearcoatDHRApprox( const in float roughness, const in float dotNL ) {\n\treturn DEFAULT_SPECULAR_COEFFICIENT + ( 1.0 - DEFAULT_SPECULAR_COEFFICIENT ) * ( pow( 1.0 - dotNL, 5.0 ) * pow( 1.0 - roughness, 2.0 ) );\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t\tvec3 normal = geometry.normal;\n\t\tvec3 viewDir = geometry.viewDir;\n\t\tvec3 position = geometry.position;\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.specularRoughness;\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 GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\t#ifdef CLEARCOAT\n\t\tfloat ccDotNL = saturate( dot( geometry.clearcoatNormal, directLight.direction ) );\n\t\tvec3 ccIrradiance = ccDotNL * directLight.color;\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tccIrradiance *= PI;\n\t\t#endif\n\t\tfloat clearcoatDHR = material.clearcoat * clearcoatDHRApprox( material.clearcoatRoughness, ccDotNL );\n\t\treflectedLight.directSpecular += ccIrradiance * material.clearcoat * BRDF_Specular_GGX( directLight, geometry.viewDir, geometry.clearcoatNormal, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearcoatRoughness );\n\t#else\n\t\tfloat clearcoatDHR = 0.0;\n\t#endif\n\t#ifdef USE_SHEEN\n\t\treflectedLight.directSpecular += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Specular_Sheen(\n\t\t\tmaterial.specularRoughness,\n\t\t\tdirectLight.direction,\n\t\t\tgeometry,\n\t\t\tmaterial.sheenColor\n\t\t);\n\t#else\n\t\treflectedLight.directSpecular += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Specular_GGX( directLight, geometry.viewDir, geometry.normal, material.specularColor, material.specularRoughness);\n\t#endif\n\treflectedLight.directDiffuse += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\n\t#ifdef CLEARCOAT\n\t\tfloat ccDotNV = saturate( dot( geometry.clearcoatNormal, geometry.viewDir ) );\n\t\treflectedLight.indirectSpecular += clearcoatRadiance * material.clearcoat * BRDF_Specular_GGX_Environment( geometry.viewDir, geometry.clearcoatNormal, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearcoatRoughness );\n\t\tfloat ccDotNL = ccDotNV;\n\t\tfloat clearcoatDHR = material.clearcoat * clearcoatDHRApprox( material.clearcoatRoughness, ccDotNL );\n\t#else\n\t\tfloat clearcoatDHR = 0.0;\n\t#endif\n\tfloat clearcoatInv = 1.0 - clearcoatDHR;\n\tvec3 singleScattering = vec3( 0.0 );\n\tvec3 multiScattering = vec3( 0.0 );\n\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n\tBRDF_Specular_Multiscattering_Environment( geometry, material.specularColor, material.specularRoughness, singleScattering, multiScattering );\n\tvec3 diffuse = material.diffuseColor * ( 1.0 - ( singleScattering + multiScattering ) );\n\treflectedLight.indirectSpecular += clearcoatInv * 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:"\nGeometricContext geometry;\ngeometry.position = - vViewPosition;\ngeometry.normal = normal;\ngeometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\n#ifdef CLEARCOAT\n\tgeometry.clearcoatNormal = clearcoatNormal;\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\tgetPointDirectLightIrradiance( pointLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\n\t\tpointLightShadow = pointLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, 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\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\tgetSpotDirectLightIrradiance( spotLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\tspotLightShadow = spotLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, 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\tgetDirectionalDirectLightIrradiance( directionalLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n\t\tdirectionalLightShadow = directionalLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, 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, geometry, 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\tirradiance += getLightProbeIrradiance( lightProbe, geometry );\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 ], geometry );\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, vUv2 );\n\t\tvec3 lightMapIrradiance = lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tlightMapIrradiance *= PI;\n\t\t#endif\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tiblIrradiance += getLightProbeIndirectIrradiance( geometry, maxMipLevel );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\tradiance += getLightProbeIndirectRadiance( geometry.viewDir, geometry.normal, material.specularRoughness, maxMipLevel );\n\t#ifdef CLEARCOAT\n\t\tclearcoatRadiance += getLightProbeIndirectRadiance( geometry.viewDir, geometry.clearcoatNormal, material.clearcoatRoughness, maxMipLevel );\n\t#endif\n#endif",lights_fragment_end:"#if defined( RE_IndirectDiffuse )\n\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n\tRE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometry, material, reflectedLight );\n#endif",logdepthbuf_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tgl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif",logdepthbuf_pars_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tuniform float logDepthBufFC;\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif",logdepthbuf_pars_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t\tvarying float vIsPerspective;\n\t#else\n\t\tuniform float logDepthBufFC;\n\t#endif\n#endif",logdepthbuf_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvFragDepth = 1.0 + gl_Position.w;\n\t\tvIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\n\t#else\n\t\tif ( isPerspectiveMatrix( projectionMatrix ) ) {\n\t\t\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\n\t\t\tgl_Position.z *= gl_Position.w;\n\t\t}\n\t#endif\n#endif",map_fragment:"#ifdef USE_MAP\n\tvec4 texelColor = texture2D( map, vUv );\n\ttexelColor = mapTexelToLinear( texelColor );\n\tdiffuseColor *= texelColor;\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\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n#endif\n#ifdef USE_MAP\n\tvec4 mapTexel = texture2D( map, uv );\n\tdiffuseColor *= mapTexelToLinear( mapTexel );\n#endif\n#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, uv ).g;\n#endif",map_particle_pars_fragment:"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\tuniform mat3 uvTransform;\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, vUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif",metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\n\tobjectNormal *= morphTargetBaseInfluence;\n\tobjectNormal += morphNormal0 * morphTargetInfluences[ 0 ];\n\tobjectNormal += morphNormal1 * morphTargetInfluences[ 1 ];\n\tobjectNormal += morphNormal2 * morphTargetInfluences[ 2 ];\n\tobjectNormal += morphNormal3 * morphTargetInfluences[ 3 ];\n#endif",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n\tuniform float morphTargetBaseInfluence;\n\t#ifndef USE_MORPHNORMALS\n\t\tuniform float morphTargetInfluences[ 8 ];\n\t#else\n\t\tuniform float morphTargetInfluences[ 4 ];\n\t#endif\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\ttransformed += morphTarget0 * morphTargetInfluences[ 0 ];\n\ttransformed += morphTarget1 * morphTargetInfluences[ 1 ];\n\ttransformed += morphTarget2 * morphTargetInfluences[ 2 ];\n\ttransformed += morphTarget3 * morphTargetInfluences[ 3 ];\n\t#ifndef USE_MORPHNORMALS\n\t\ttransformed += morphTarget4 * morphTargetInfluences[ 4 ];\n\t\ttransformed += morphTarget5 * morphTargetInfluences[ 5 ];\n\t\ttransformed += morphTarget6 * morphTargetInfluences[ 6 ];\n\t\ttransformed += morphTarget7 * morphTargetInfluences[ 7 ];\n\t#endif\n#endif",normal_fragment_begin:"#ifdef FLAT_SHADED\n\tvec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) );\n\tvec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t#endif\n\t#ifdef USE_TANGENT\n\t\tvec3 tangent = normalize( vTangent );\n\t\tvec3 bitangent = normalize( vBitangent );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\ttangent = tangent * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\t\tbitangent = bitangent * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\t#endif\n\t\t#if defined( TANGENTSPACE_NORMALMAP ) || defined( USE_CLEARCOAT_NORMALMAP )\n\t\t\tmat3 vTBN = mat3( tangent, bitangent, normal );\n\t\t#endif\n\t#endif\n#endif\nvec3 geometryNormal = normal;",normal_fragment_maps:"#ifdef OBJECTSPACE_NORMALMAP\n\tnormal = texture2D( normalMap, vUv ).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 * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t#endif\n\tnormal = normalize( normalMatrix * normal );\n#elif defined( TANGENTSPACE_NORMALMAP )\n\tvec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\tmapN.xy *= normalScale;\n\t#ifdef USE_TANGENT\n\t\tnormal = normalize( vTBN * mapN );\n\t#else\n\t\tnormal = perturbNormal2Arb( -vViewPosition, normal, mapN );\n\t#endif\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( -vViewPosition, normal, dHdxy_fwd() );\n#endif",normalmap_pars_fragment:"#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n#endif\n#ifdef OBJECTSPACE_NORMALMAP\n\tuniform mat3 normalMatrix;\n#endif\n#if ! defined ( USE_TANGENT ) && ( defined ( TANGENTSPACE_NORMALMAP ) || defined ( USE_CLEARCOAT_NORMALMAP ) )\n\tvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm, vec3 mapN ) {\n\t\tvec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );\n\t\tvec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );\n\t\tvec2 st0 = dFdx( vUv.st );\n\t\tvec2 st1 = dFdy( vUv.st );\n\t\tfloat scale = sign( st1.t * st0.s - st0.t * st1.s );\n\t\tvec3 S = normalize( ( q0 * st1.t - q1 * st0.t ) * scale );\n\t\tvec3 T = normalize( ( - q0 * st1.s + q1 * st0.s ) * scale );\n\t\tvec3 N = normalize( surf_norm );\n\t\tmat3 tsn = mat3( S, T, N );\n\t\tmapN.xy *= ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\treturn normalize( tsn * mapN );\n\t}\n#endif",clearcoat_normal_fragment_begin:"#ifdef CLEARCOAT\n\tvec3 clearcoatNormal = geometryNormal;\n#endif",clearcoat_normal_fragment_maps:"#ifdef USE_CLEARCOAT_NORMALMAP\n\tvec3 clearcoatMapN = texture2D( clearcoatNormalMap, vUv ).xyz * 2.0 - 1.0;\n\tclearcoatMapN.xy *= clearcoatNormalScale;\n\t#ifdef USE_TANGENT\n\t\tclearcoatNormal = normalize( vTBN * clearcoatMapN );\n\t#else\n\t\tclearcoatNormal = perturbNormal2Arb( - vViewPosition, clearcoatNormal, clearcoatMapN );\n\t#endif\n#endif",clearcoat_pars_fragment:"#ifdef USE_CLEARCOATMAP\n\tuniform sampler2D clearcoatMap;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform sampler2D clearcoatRoughnessMap;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform sampler2D clearcoatNormalMap;\n\tuniform vec2 clearcoatNormalScale;\n#endif",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.;\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\nconst float ShiftRight8 = 1. / 256.;\nvec4 packDepthToRGBA( const in float v ) {\n\tvec4 r = vec4( fract( v * PackFactors ), v );\n\tr.yzw -= r.xyz * ShiftRight8;\treturn r * PackUpscale;\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors );\n}\nvec4 pack2HalfToRGBA( vec2 v ) {\n\tvec4 r = vec4( v.x, fract( v.x * 255.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( 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 linearClipZ, const in float near, const in float far ) {\n\treturn linearClipZ * ( 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 invClipZ, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * invClipZ - 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_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, vUv );\n\troughnessFactor *= texelRoughness.g;\n#endif",roughnessmap_pars_fragment:"#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif",shadowmap_pars_fragment:"#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 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\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tstruct SpotLightShadow {\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 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\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\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\tfloat hard_shadow = step( compare , distribution.x );\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 shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tfloat shadow = 1.0;\n\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\tshadowCoord.z += shadowBias;\n\t\tbvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 );\n\t\tbool inFrustum = all( inFrustumVec );\n\t\tbvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 );\n\t\tbool frustumTest = all( frustumTestVec );\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;\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 shadow;\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 shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\t\tdp += shadowBias;\n\t\tvec3 bd3D = normalize( lightToPosition );\n\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )\n\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n\t\t\treturn (\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n\t\t#endif\n\t}\n#endif",shadowmap_pars_vertex:"#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 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 mat4 spotShadowMatrix[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tstruct SpotLightShadow {\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 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:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0 || NUM_SPOT_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0\n\t\tvec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\tvec4 shadowWorldPosition;\n\t#endif\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );\n\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias, 0 );\n\t\tvSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );\n\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\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.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.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ 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.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\t#ifdef BONE_TEXTURE\n\t\tuniform highp sampler2D boneTexture;\n\t\tuniform int boneTextureSize;\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tfloat j = i * 4.0;\n\t\t\tfloat x = mod( j, float( boneTextureSize ) );\n\t\t\tfloat y = floor( j / float( boneTextureSize ) );\n\t\t\tfloat dx = 1.0 / float( boneTextureSize );\n\t\t\tfloat dy = 1.0 / float( boneTextureSize );\n\t\t\ty = dy * ( y + 0.5 );\n\t\t\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\n\t\t\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\n\t\t\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\n\t\t\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\n\t\t\tmat4 bone = mat4( v1, v2, v3, v4 );\n\t\t\treturn bone;\n\t\t}\n\t#else\n\t\tuniform mat4 boneMatrices[ MAX_BONES ];\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tmat4 bone = boneMatrices[ int(i) ];\n\t\t\treturn bone;\n\t\t}\n\t#endif\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, vUv );\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;\nvec3 LinearToneMapping( vec3 color ) {\n\treturn toneMappingExposure * color;\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\n}\nvec3 OptimizedCineonToneMapping( 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}\nvec3 CustomToneMapping( vec3 color ) { return color; }",transmissionmap_fragment:"#ifdef USE_TRANSMISSIONMAP\n\ttotalTransmission *= texture2D( transmissionMap, vUv ).r;\n#endif",transmissionmap_pars_fragment:"#ifdef USE_TRANSMISSIONMAP\n\tuniform sampler2D transmissionMap;\n#endif",uv_pars_fragment:"#if ( defined( USE_UV ) && ! defined( UVS_VERTEX_ONLY ) )\n\tvarying vec2 vUv;\n#endif",uv_pars_vertex:"#ifdef USE_UV\n\t#ifdef UVS_VERTEX_ONLY\n\t\tvec2 vUv;\n\t#else\n\t\tvarying vec2 vUv;\n\t#endif\n\tuniform mat3 uvTransform;\n#endif",uv_vertex:"#ifdef USE_UV\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n#endif",uv2_pars_fragment:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvarying vec2 vUv2;\n#endif",uv2_pars_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tattribute vec2 uv2;\n\tvarying vec2 vUv2;\n\tuniform mat3 uv2Transform;\n#endif",uv2_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvUv2 = ( uv2Transform * vec3( uv2, 1 ) ).xy;\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP )\n\tvec4 worldPosition = vec4( transformed, 1.0 );\n\t#ifdef USE_INSTANCING\n\t\tworldPosition = instanceMatrix * worldPosition;\n\t#endif\n\tworldPosition = modelMatrix * worldPosition;\n#endif",background_frag:"uniform sampler2D t2D;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 texColor = texture2D( t2D, vUv );\n\tgl_FragColor = mapTexelToLinear( texColor );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}",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}",cube_frag:"#include <envmap_common_pars_fragment>\nuniform float opacity;\nvarying vec3 vWorldDirection;\n#include <cube_uv_reflection_fragment>\nvoid main() {\n\tvec3 vReflect = vWorldDirection;\n\t#include <envmap_fragment>\n\tgl_FragColor = envColor;\n\tgl_FragColor.a *= opacity;\n\t#include <tonemapping_fragment>\n\t#include <encodings_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}",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 <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( 1.0 );\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 <logdepthbuf_fragment>\n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\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#endif\n}",depth_vert:"#include <common>\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 <skinbase_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}",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 <clipping_planes_pars_fragment>\nvoid main () {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist );\n\tgl_FragColor = packDepthToRGBA( dist );\n}",distanceRGBA_vert:"#define DISTANCE\nvarying vec3 vWorldPosition;\n#include <common>\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 <skinbase_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}",equirect_frag:"uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvec3 direction = normalize( vWorldDirection );\n\tvec2 sampleUV = equirectUv( direction );\n\tvec4 texColor = texture2D( tEquirect, sampleUV );\n\tgl_FragColor = mapTexelToLinear( texColor );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\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}",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 <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <color_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n}",linedashed_vert:"uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\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>\nvoid main() {\n\tvLineDistance = scale * lineDistance;\n\t#include <color_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}",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 <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_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 <cube_uv_reflection_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\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\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 <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\n\t\tvec4 lightMapTexel= texture2D( lightMap, vUv2 );\n\t\treflectedLight.indirectDiffuse += lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;\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\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshbasic_vert:"#include <common>\n#include <uv_pars_vertex>\n#include <uv2_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 <uv2_vertex>\n\t#include <color_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_ENVMAP\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinnormal_vertex>\n\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 <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <envmap_vertex>\n\t#include <fog_vertex>\n}",meshlambert_frag:"uniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\nvarying vec3 vLightFront;\nvarying vec3 vIndirectFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n\tvarying vec3 vIndirectBack;\n#endif\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_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 <cube_uv_reflection_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <fog_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\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 <specularmap_fragment>\n\t#include <emissivemap_fragment>\n\t#ifdef DOUBLE_SIDED\n\t\treflectedLight.indirectDiffuse += ( gl_FrontFacing ) ? vIndirectFront : vIndirectBack;\n\t#else\n\t\treflectedLight.indirectDiffuse += vIndirectFront;\n\t#endif\n\t#include <lightmap_fragment>\n\treflectedLight.indirectDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb );\n\t#ifdef DOUBLE_SIDED\n\t\treflectedLight.directDiffuse = ( gl_FrontFacing ) ? vLightFront : vLightBack;\n\t#else\n\t\treflectedLight.directDiffuse = vLightFront;\n\t#endif\n\treflectedLight.directDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb ) * getShadowMask();\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshlambert_vert:"#define LAMBERT\nvarying vec3 vLightFront;\nvarying vec3 vIndirectFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n\tvarying vec3 vIndirectBack;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <envmap_pars_vertex>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <color_pars_vertex>\n#include <fog_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 <uv2_vertex>\n\t#include <color_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 <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 <lights_lambert_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshmatcap_frag:"#define MATCAP\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2D matcap;\nvarying vec3 vViewPosition;\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 <fog_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\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\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 <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\tmatcapColor = matcapTexelToLinear( matcapColor );\n\t#else\n\t\tvec4 matcapColor = vec4( 1.0 );\n\t#endif\n\tvec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_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#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <color_pars_vertex>\n#include <displacementmap_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 <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#ifndef FLAT_SHADED\n\t\tvNormal = normalize( transformedNormal );\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\t#include <fog_vertex>\n\tvViewPosition = - mvPosition.xyz;\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 <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_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 <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\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\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 <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\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_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#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_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 <uv2_vertex>\n\t#include <color_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#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#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\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_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 <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_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 <cube_uv_reflection_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\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\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\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 <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\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshphong_vert:"#define PHONG\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_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 <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_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#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#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\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshphysical_frag:"#define STANDARD\n#ifdef PHYSICAL\n\t#define REFLECTIVITY\n\t#define CLEARCOAT\n\t#define TRANSMISSION\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef TRANSMISSION\n\tuniform float transmission;\n#endif\n#ifdef REFLECTIVITY\n\tuniform float reflectivity;\n#endif\n#ifdef CLEARCOAT\n\tuniform float clearcoat;\n\tuniform float clearcoatRoughness;\n#endif\n#ifdef USE_SHEEN\n\tuniform vec3 sheen;\n#endif\nvarying vec3 vViewPosition;\n#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\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <transmissionmap_pars_fragment>\n#include <bsdfs>\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 <lights_physical_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <clearcoat_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\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#ifdef TRANSMISSION\n\t\tfloat totalTransmission = transmission;\n\t#endif\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 <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 <transmissionmap_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 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#ifdef TRANSMISSION\n\t\tdiffuseColor.a *= mix( saturate( 1. - totalTransmission + linearToRelativeLuminance( reflectedLight.directSpecular + reflectedLight.indirectSpecular ) ), 1.0, metalness );\n\t#endif\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_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#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\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_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 <uv2_vertex>\n\t#include <color_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#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\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}",normal_frag:"#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#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\n#include <packing>\n#include <uv_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\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 ), opacity );\n}",normal_vert:"#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#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\n#include <common>\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>\nvoid main() {\n\t#include <uv_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#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\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( TANGENTSPACE_NORMALMAP )\n\tvViewPosition = - mvPosition.xyz;\n#endif\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 <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_particle_fragment>\n\t#include <color_fragment>\n\t#include <alphatest_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_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>\nvoid main() {\n\t#include <color_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}",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 <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\nvoid main() {\n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}",shadow_vert:"#include <common>\n#include <fog_pars_vertex>\n#include <shadowmap_pars_vertex>\nvoid main() {\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_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 <shadowmap_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 <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_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 * vec4( 0.0, 0.0, 0.0, 1.0 );\n\tvec2 scale;\n\tscale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );\n\tscale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );\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}"},Je={common:{diffuse:{value:new Ft(15658734)},opacity:{value:1},map:{value:null},uvTransform:{value:new c},uv2Transform:{value:new c},alphaMap:{value:null}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},refractionRatio:{value:.98},maxMipLevel:{value:0}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalScale:{value:new l(1,1)}},displacementmap:{displacementMap:{value:null},displacementScale:{value:1},displacementBias:{value:0}},roughnessmap:{roughnessMap:{value:null}},metalnessmap:{metalnessMap:{value:null}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Ft(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotShadowMap:{value:[]},spotShadowMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{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 Ft(15658734)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},uvTransform:{value:new c}},sprite:{diffuse:{value:new Ft(15658734)},opacity:{value:1},center:{value:new l(.5,.5)},rotation:{value:0},map:{value:null},alphaMap:{value:null},uvTransform:{value:new c}}},Ke={basic:{uniforms:Ne([Je.common,Je.specularmap,Je.envmap,Je.aomap,Je.lightmap,Je.fog]),vertexShader:Ze.meshbasic_vert,fragmentShader:Ze.meshbasic_frag},lambert:{uniforms:Ne([Je.common,Je.specularmap,Je.envmap,Je.aomap,Je.lightmap,Je.emissivemap,Je.fog,Je.lights,{emissive:{value:new Ft(0)}}]),vertexShader:Ze.meshlambert_vert,fragmentShader:Ze.meshlambert_frag},phong:{uniforms:Ne([Je.common,Je.specularmap,Je.envmap,Je.aomap,Je.lightmap,Je.emissivemap,Je.bumpmap,Je.normalmap,Je.displacementmap,Je.fog,Je.lights,{emissive:{value:new Ft(0)},specular:{value:new Ft(1118481)},shininess:{value:30}}]),vertexShader:Ze.meshphong_vert,fragmentShader:Ze.meshphong_frag},standard:{uniforms:Ne([Je.common,Je.envmap,Je.aomap,Je.lightmap,Je.emissivemap,Je.bumpmap,Je.normalmap,Je.displacementmap,Je.roughnessmap,Je.metalnessmap,Je.fog,Je.lights,{emissive:{value:new Ft(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:Ze.meshphysical_vert,fragmentShader:Ze.meshphysical_frag},toon:{uniforms:Ne([Je.common,Je.aomap,Je.lightmap,Je.emissivemap,Je.bumpmap,Je.normalmap,Je.displacementmap,Je.gradientmap,Je.fog,Je.lights,{emissive:{value:new Ft(0)}}]),vertexShader:Ze.meshtoon_vert,fragmentShader:Ze.meshtoon_frag},matcap:{uniforms:Ne([Je.common,Je.bumpmap,Je.normalmap,Je.displacementmap,Je.fog,{matcap:{value:null}}]),vertexShader:Ze.meshmatcap_vert,fragmentShader:Ze.meshmatcap_frag},points:{uniforms:Ne([Je.points,Je.fog]),vertexShader:Ze.points_vert,fragmentShader:Ze.points_frag},dashed:{uniforms:Ne([Je.common,Je.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Ze.linedashed_vert,fragmentShader:Ze.linedashed_frag},depth:{uniforms:Ne([Je.common,Je.displacementmap]),vertexShader:Ze.depth_vert,fragmentShader:Ze.depth_frag},normal:{uniforms:Ne([Je.common,Je.bumpmap,Je.normalmap,Je.displacementmap,{opacity:{value:1}}]),vertexShader:Ze.normal_vert,fragmentShader:Ze.normal_frag},sprite:{uniforms:Ne([Je.sprite,Je.fog]),vertexShader:Ze.sprite_vert,fragmentShader:Ze.sprite_frag},background:{uniforms:{uvTransform:{value:new c},t2D:{value:null}},vertexShader:Ze.background_vert,fragmentShader:Ze.background_frag},cube:{uniforms:Ne([Je.envmap,{opacity:{value:1}}]),vertexShader:Ze.cube_vert,fragmentShader:Ze.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Ze.equirect_vert,fragmentShader:Ze.equirect_frag},distanceRGBA:{uniforms:Ne([Je.common,Je.displacementmap,{referencePosition:{value:new y},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Ze.distanceRGBA_vert,fragmentShader:Ze.distanceRGBA_frag},shadow:{uniforms:Ne([Je.lights,Je.fog,{color:{value:new Ft(0)},opacity:{value:1}}]),vertexShader:Ze.shadow_vert,fragmentShader:Ze.shadow_frag}};function $e(t,e,n,i,r){const o=new Ft(0);let s,a,l=0,c=null,u=0,h=null;function d(t,e){n.buffers.color.setClear(t.r,t.g,t.b,e,r)}return{getClearColor:function(){return o},setClearColor:function(t,e){o.set(t),l=void 0!==e?e:1,d(o,l)},getClearAlpha:function(){return l},setClearAlpha:function(t){l=t,d(o,l)},render:function(n,r,p,f){let m=!0===r.isScene?r.background:null;m&&m.isTexture&&(m=e.get(m));const g=t.xr,v=g.getSession&&g.getSession();v&&"additive"===v.environmentBlendMode&&(m=null),null===m?d(o,l):m&&m.isColor&&(d(m,1),f=!0),(t.autoClear||f)&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil),m&&(m.isCubeTexture||m.isWebGLCubeRenderTarget||306===m.mapping)?(void 0===a&&(a=new Pe(new Oe(1,1,1),new ze({name:"BackgroundCubeMaterial",uniforms:Ie(Ke.cube.uniforms),vertexShader:Ke.cube.vertexShader,fragmentShader:Ke.cube.fragmentShader,side:1,depthTest:!1,depthWrite:!1,fog:!1})),a.geometry.deleteAttribute("normal"),a.geometry.deleteAttribute("uv"),a.onBeforeRender=function(t,e,n){this.matrixWorld.copyPosition(n.matrixWorld)},Object.defineProperty(a.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),i.update(a)),m.isWebGLCubeRenderTarget&&(m=m.texture),a.material.uniforms.envMap.value=m,a.material.uniforms.flipEnvMap.value=m.isCubeTexture&&m._needsFlipEnvMap?-1:1,c===m&&u===m.version&&h===t.toneMapping||(a.material.needsUpdate=!0,c=m,u=m.version,h=t.toneMapping),n.unshift(a,a.geometry,a.material,0,0,null)):m&&m.isTexture&&(void 0===s&&(s=new Pe(new Ye(2,2),new ze({name:"BackgroundMaterial",uniforms:Ie(Ke.background.uniforms),vertexShader:Ke.background.vertexShader,fragmentShader:Ke.background.fragmentShader,side:0,depthTest:!1,depthWrite:!1,fog:!1})),s.geometry.deleteAttribute("normal"),Object.defineProperty(s.material,"map",{get:function(){return this.uniforms.t2D.value}}),i.update(s)),s.material.uniforms.t2D.value=m,!0===m.matrixAutoUpdate&&m.updateMatrix(),s.material.uniforms.uvTransform.value.copy(m.matrix),c===m&&u===m.version&&h===t.toneMapping||(s.material.needsUpdate=!0,c=m,u=m.version,h=t.toneMapping),n.unshift(s,s.geometry,s.material,0,0,null))}}}function Qe(t,e,n,i){const r=t.getParameter(34921),o=i.isWebGL2?null:e.get("OES_vertex_array_object"),s=i.isWebGL2||null!==o,a={},l=d(null);let c=l;function u(e){return i.isWebGL2?t.bindVertexArray(e):o.bindVertexArrayOES(e)}function h(e){return i.isWebGL2?t.deleteVertexArray(e):o.deleteVertexArrayOES(e)}function d(t){const e=[],n=[],i=[];for(let t=0;t<r;t++)e[t]=0,n[t]=0,i[t]=0;return{geometry:null,program:null,wireframe:!1,newAttributes:e,enabledAttributes:n,attributeDivisors:i,object:t,attributes:{},index:null}}function p(){const t=c.newAttributes;for(let e=0,n=t.length;e<n;e++)t[e]=0}function f(t){m(t,0)}function m(n,r){const o=c.newAttributes,s=c.enabledAttributes,a=c.attributeDivisors;if(o[n]=1,0===s[n]&&(t.enableVertexAttribArray(n),s[n]=1),a[n]!==r){(i.isWebGL2?t:e.get("ANGLE_instanced_arrays"))[i.isWebGL2?"vertexAttribDivisor":"vertexAttribDivisorANGLE"](n,r),a[n]=r}}function g(){const e=c.newAttributes,n=c.enabledAttributes;for(let i=0,r=n.length;i<r;i++)n[i]!==e[i]&&(t.disableVertexAttribArray(i),n[i]=0)}function v(e,n,r,o,s,a){!0!==i.isWebGL2||5124!==r&&5125!==r?t.vertexAttribPointer(e,n,r,o,s,a):t.vertexAttribIPointer(e,n,r,s,a)}function y(){b(),c!==l&&(c=l,u(c.object))}function b(){l.geometry=null,l.program=null,l.wireframe=!1}return{setup:function(r,l,h,y,b){let x=!1;if(s){const e=function(e,n,r){const s=!0===r.wireframe;let l=a[e.id];void 0===l&&(l={},a[e.id]=l);let c=l[n.id];void 0===c&&(c={},l[n.id]=c);let u=c[s];void 0===u&&(u=d(i.isWebGL2?t.createVertexArray():o.createVertexArrayOES()),c[s]=u);return u}(y,h,l);c!==e&&(c=e,u(c.object)),x=function(t,e){const n=c.attributes,i=t.attributes;if(Object.keys(n).length!==Object.keys(i).length)return!0;for(const t in i){const e=n[t],r=i[t];if(void 0===e)return!0;if(e.attribute!==r)return!0;if(e.data!==r.data)return!0}return c.index!==e}(y,b),x&&function(t,e){const n={},i=t.attributes;for(const t in i){const e=i[t],r={};r.attribute=e,e.data&&(r.data=e.data),n[t]=r}c.attributes=n,c.index=e}(y,b)}else{const t=!0===l.wireframe;c.geometry===y.id&&c.program===h.id&&c.wireframe===t||(c.geometry=y.id,c.program=h.id,c.wireframe=t,x=!0)}!0===r.isInstancedMesh&&(x=!0),null!==b&&n.update(b,34963),x&&(!function(r,o,s,a){if(!1===i.isWebGL2&&(r.isInstancedMesh||a.isInstancedBufferGeometry)&&null===e.get("ANGLE_instanced_arrays"))return;p();const l=a.attributes,c=s.getAttributes(),u=o.defaultAttributeValues;for(const e in c){const i=c[e];if(i>=0){const o=l[e];if(void 0!==o){const e=o.normalized,r=o.itemSize,s=n.get(o);if(void 0===s)continue;const l=s.buffer,c=s.type,u=s.bytesPerElement;if(o.isInterleavedBufferAttribute){const n=o.data,s=n.stride,h=o.offset;n&&n.isInstancedInterleavedBuffer?(m(i,n.meshPerAttribute),void 0===a._maxInstanceCount&&(a._maxInstanceCount=n.meshPerAttribute*n.count)):f(i),t.bindBuffer(34962,l),v(i,r,c,e,s*u,h*u)}else o.isInstancedBufferAttribute?(m(i,o.meshPerAttribute),void 0===a._maxInstanceCount&&(a._maxInstanceCount=o.meshPerAttribute*o.count)):f(i),t.bindBuffer(34962,l),v(i,r,c,e,0,0)}else if("instanceMatrix"===e){const e=n.get(r.instanceMatrix);if(void 0===e)continue;const o=e.buffer,s=e.type;m(i+0,1),m(i+1,1),m(i+2,1),m(i+3,1),t.bindBuffer(34962,o),t.vertexAttribPointer(i+0,4,s,!1,64,0),t.vertexAttribPointer(i+1,4,s,!1,64,16),t.vertexAttribPointer(i+2,4,s,!1,64,32),t.vertexAttribPointer(i+3,4,s,!1,64,48)}else if("instanceColor"===e){const e=n.get(r.instanceColor);if(void 0===e)continue;const o=e.buffer,s=e.type;m(i,1),t.bindBuffer(34962,o),t.vertexAttribPointer(i,3,s,!1,12,0)}else if(void 0!==u){const n=u[e];if(void 0!==n)switch(n.length){case 2:t.vertexAttrib2fv(i,n);break;case 3:t.vertexAttrib3fv(i,n);break;case 4:t.vertexAttrib4fv(i,n);break;default:t.vertexAttrib1fv(i,n)}}}}g()}(r,l,h,y),null!==b&&t.bindBuffer(34963,n.get(b).buffer))},reset:y,resetDefaultState:b,dispose:function(){y();for(const t in a){const e=a[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 a[t]}},releaseStatesOfGeometry:function(t){if(void 0===a[t.id])return;const e=a[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 a[t.id]},releaseStatesOfProgram:function(t){for(const e in a){const n=a[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:p,enableAttribute:f,disableUnusedAttributes:g}}function tn(t,e,n,i){const r=i.isWebGL2;let o;this.setMode=function(t){o=t},this.render=function(e,i){t.drawArrays(o,e,i),n.update(i,o,1)},this.renderInstances=function(i,s,a){if(0===a)return;let l,c;if(r)l=t,c="drawArraysInstanced";else if(l=e.get("ANGLE_instanced_arrays"),c="drawArraysInstancedANGLE",null===l)return void console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");l[c](o,i,s,a),n.update(s,o,a)}}function en(t,e,n){let i;function r(e){if("highp"===e){if(t.getShaderPrecisionFormat(35633,36338).precision>0&&t.getShaderPrecisionFormat(35632,36338).precision>0)return"highp";e="mediump"}return"mediump"===e&&t.getShaderPrecisionFormat(35633,36337).precision>0&&t.getShaderPrecisionFormat(35632,36337).precision>0?"mediump":"lowp"}const o="undefined"!=typeof WebGL2RenderingContext&&t instanceof WebGL2RenderingContext||"undefined"!=typeof WebGL2ComputeRenderingContext&&t instanceof WebGL2ComputeRenderingContext;let s=void 0!==n.precision?n.precision:"highp";const a=r(s);a!==s&&(console.warn("THREE.WebGLRenderer:",s,"not supported, using",a,"instead."),s=a);const l=!0===n.logarithmicDepthBuffer,c=t.getParameter(34930),u=t.getParameter(35660),h=t.getParameter(3379),d=t.getParameter(34076),p=t.getParameter(34921),f=t.getParameter(36347),m=t.getParameter(36348),g=t.getParameter(36349),v=u>0,y=o||!!e.get("OES_texture_float");return{isWebGL2:o,getMaxAnisotropy:function(){if(void 0!==i)return i;const n=e.get("EXT_texture_filter_anisotropic");return i=null!==n?t.getParameter(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT):0,i},getMaxPrecision:r,precision:s,logarithmicDepthBuffer:l,maxTextures:c,maxVertexTextures:u,maxTextureSize:h,maxCubemapSize:d,maxAttributes:p,maxVertexUniforms:f,maxVaryings:m,maxFragmentUniforms:g,vertexTextures:v,floatFragmentTextures:y,floatVertexTextures:v&&y,maxSamples:o?t.getParameter(36183):0}}function nn(t){const e=this;let n=null,i=0,r=!1,o=!1;const s=new wt,a=new c,l={value:null,needsUpdate:!1};function u(){l.value!==n&&(l.value=n,l.needsUpdate=i>0),e.numPlanes=i,e.numIntersection=0}function h(t,n,i,r){const o=null!==t?t.length:0;let c=null;if(0!==o){if(c=l.value,!0!==r||null===c){const e=i+4*o,r=n.matrixWorldInverse;a.getNormalMatrix(r),(null===c||c.length<e)&&(c=new Float32Array(e));for(let e=0,n=i;e!==o;++e,n+=4)s.copy(t[e]).applyMatrix4(r,a),s.normal.toArray(c,n),c[n+3]=s.constant}l.value=c,l.needsUpdate=!0}return e.numPlanes=o,e.numIntersection=0,c}this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(t,e,o){const s=0!==t.length||e||0!==i||r;return r=e,n=h(t,o,0),i=t.length,s},this.beginShadows=function(){o=!0,h(null)},this.endShadows=function(){o=!1,u()},this.setState=function(e,s,a){const c=e.clippingPlanes,d=e.clipIntersection,p=e.clipShadows,f=t.get(e);if(!r||null===c||0===c.length||o&&!p)o?h(null):u();else{const t=o?0:i,e=4*t;let r=f.clippingState||null;l.value=r,r=h(c,s,e,a);for(let t=0;t!==e;++t)r[t]=n[t];f.clippingState=r,this.numIntersection=d?this.numPlanes:0,this.numPlanes+=t}}}function rn(t){let e=new WeakMap;function n(t,e){return 303===e?t.mapping=301:304===e&&(t.mapping=302),t}function i(t){const n=t.target;n.removeEventListener("dispose",i);const r=e.get(n);void 0!==r&&(e.delete(n),r.dispose())}return{get:function(r){if(r&&r.isTexture){const o=r.mapping;if(303===o||304===o){if(e.has(r)){return n(e.get(r).texture,r.mapping)}{const o=r.image;if(o&&o.height>0){const s=t.getRenderList(),a=t.getRenderTarget(),l=t.getRenderState(),c=new je(o.height/2);return c.fromEquirectangularTexture(t,r),e.set(r,c),t.setRenderTarget(a),t.setRenderList(s),t.setRenderState(l),r.addEventListener("dispose",i),n(c.texture,r.mapping)}return null}}}return r},dispose:function(){e=new WeakMap}}}function on(t){const e={};return{has:function(n){if(void 0!==e[n])return null!==e[n];let i;switch(n){case"WEBGL_depth_texture":i=t.getExtension("WEBGL_depth_texture")||t.getExtension("MOZ_WEBGL_depth_texture")||t.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":i=t.getExtension("EXT_texture_filter_anisotropic")||t.getExtension("MOZ_EXT_texture_filter_anisotropic")||t.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":i=t.getExtension("WEBGL_compressed_texture_s3tc")||t.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":i=t.getExtension("WEBGL_compressed_texture_pvrtc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:i=t.getExtension(n)}return e[n]=i,null!==i},get:function(t){return this.has(t)||console.warn("THREE.WebGLRenderer: "+t+" extension not supported."),e[t]}}}function sn(t,e,n,i){const r=new WeakMap,o=new WeakMap;function s(t){const a=t.target,l=r.get(a);null!==l.index&&e.remove(l.index);for(const t in l.attributes)e.remove(l.attributes[t]);a.removeEventListener("dispose",s),r.delete(a);const c=o.get(l);c&&(e.remove(c),o.delete(l)),i.releaseStatesOfGeometry(l),!0===a.isInstancedBufferGeometry&&delete a._maxInstanceCount,n.memory.geometries--}function a(t){const n=[],i=t.index,r=t.attributes.position;let s=0;if(null!==i){const t=i.array;s=i.version;for(let e=0,i=t.length;e<i;e+=3){const i=t[e+0],r=t[e+1],o=t[e+2];n.push(i,r,r,o,o,i)}}else{const t=r.array;s=r.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 a=new(ie(n)>65535?Qt:Kt)(n,1);a.version=s;const l=o.get(t);l&&e.remove(l),o.set(t,a)}return{get:function(t,e){let i=r.get(e);return i||(e.addEventListener("dispose",s),e.isBufferGeometry?i=e:e.isGeometry&&(void 0===e._bufferGeometry&&(e._bufferGeometry=(new he).setFromObject(t)),i=e._bufferGeometry),r.set(e,i),n.memory.geometries++,i)},update:function(t){const n=t.attributes;for(const t in n)e.update(n[t],34962);const i=t.morphAttributes;for(const t in i){const n=i[t];for(let t=0,i=n.length;t<i;t++)e.update(n[t],34962)}},getWireframeAttribute:function(t){const e=o.get(t);if(e){const n=t.index;null!==n&&e.version<n.version&&a(t)}else a(t);return o.get(t)}}}function an(t,e,n,i){const r=i.isWebGL2;let o,s,a;this.setMode=function(t){o=t},this.setIndex=function(t){s=t.type,a=t.bytesPerElement},this.render=function(e,i){t.drawElements(o,i,s,e*a),n.update(i,o,1)},this.renderInstances=function(i,l,c){if(0===c)return;let u,h;if(r)u=t,h="drawElementsInstanced";else if(u=e.get("ANGLE_instanced_arrays"),h="drawElementsInstancedANGLE",null===u)return void console.error("THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");u[h](o,l,s,i*a,c),n.update(l,o,c)}}function ln(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.frame++,e.calls=0,e.triangles=0,e.points=0,e.lines=0},update:function(t,n,i){switch(e.calls++,n){case 4:e.triangles+=i*(t/3);break;case 1:e.lines+=i*(t/2);break;case 3:e.lines+=i*(t-1);break;case 2:e.lines+=i*t;break;case 0:e.points+=i*t;break;default:console.error("THREE.WebGLInfo: Unknown draw mode:",n)}}}}function cn(t,e){return t[0]-e[0]}function un(t,e){return Math.abs(e[1])-Math.abs(t[1])}function hn(t){const e={},n=new Float32Array(8),i=[];for(let t=0;t<8;t++)i[t]=[t,0];return{update:function(r,o,s,a){const l=r.morphTargetInfluences,c=void 0===l?0:l.length;let u=e[o.id];if(void 0===u){u=[];for(let t=0;t<c;t++)u[t]=[t,0];e[o.id]=u}for(let t=0;t<c;t++){const e=u[t];e[0]=t,e[1]=l[t]}u.sort(un);for(let t=0;t<8;t++)t<c&&u[t][1]?(i[t][0]=u[t][0],i[t][1]=u[t][1]):(i[t][0]=Number.MAX_SAFE_INTEGER,i[t][1]=0);i.sort(cn);const h=s.morphTargets&&o.morphAttributes.position,d=s.morphNormals&&o.morphAttributes.normal;let p=0;for(let t=0;t<8;t++){const e=i[t],r=e[0],s=e[1];r!==Number.MAX_SAFE_INTEGER&&s?(h&&o.getAttribute("morphTarget"+t)!==h[r]&&o.setAttribute("morphTarget"+t,h[r]),d&&o.getAttribute("morphNormal"+t)!==d[r]&&o.setAttribute("morphNormal"+t,d[r]),n[t]=s,p+=s):(h&&void 0!==o.getAttribute("morphTarget"+t)&&o.deleteAttribute("morphTarget"+t),d&&void 0!==o.getAttribute("morphNormal"+t)&&o.deleteAttribute("morphNormal"+t),n[t]=0)}const f=o.morphTargetsRelative?1:1-p;a.getUniforms().setValue(t,"morphTargetBaseInfluence",f),a.getUniforms().setValue(t,"morphTargetInfluences",n)}}}function dn(t,e,n,i){let r=new WeakMap;return{update:function(t){const o=i.render.frame,s=t.geometry,a=e.get(t,s);return r.get(a)!==o&&(s.isGeometry&&a.updateFromObject(t),e.update(a),r.set(a,o)),t.isInstancedMesh&&(n.update(t.instanceMatrix,34962),null!==t.instanceColor&&n.update(t.instanceColor,34962)),a},dispose:function(){r=new WeakMap}}}function pn(t,e,n,i){p.call(this,null),this.image={data:t||null,width:e||1,height:n||1,depth:i||1},this.magFilter=1003,this.minFilter=1003,this.wrapR=1001,this.generateMipmaps=!1,this.flipY=!1,this.needsUpdate=!0}function fn(t,e,n,i){p.call(this,null),this.image={data:t||null,width:e||1,height:n||1,depth:i||1},this.magFilter=1003,this.minFilter=1003,this.wrapR=1001,this.generateMipmaps=!1,this.flipY=!1,this.needsUpdate=!0}Ke.physical={uniforms:Ne([Ke.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatNormalScale:{value:new l(1,1)},clearcoatNormalMap:{value:null},sheen:{value:new Ft(0)},transmission:{value:0},transmissionMap:{value:null}}]),vertexShader:Ze.meshphysical_vert,fragmentShader:Ze.meshphysical_frag},pn.prototype=Object.create(p.prototype),pn.prototype.constructor=pn,pn.prototype.isDataTexture2DArray=!0,fn.prototype=Object.create(p.prototype),fn.prototype.constructor=fn,fn.prototype.isDataTexture3D=!0;const mn=new p,gn=new pn,vn=new fn,yn=new Ue,bn=[],xn=[],wn=new Float32Array(16),_n=new Float32Array(9),Sn=new Float32Array(4);function Mn(t,e,n){const i=t[0];if(i<=0||i>0)return t;const r=e*n;let o=bn[r];if(void 0===o&&(o=new Float32Array(r),bn[r]=o),0!==e){i.toArray(o,0);for(let i=1,r=0;i!==e;++i)r+=n,t[i].toArray(o,r)}return o}function En(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 Tn(t,e){for(let n=0,i=e.length;n<i;n++)t[n]=e[n]}function An(t,e){let n=xn[e];void 0===n&&(n=new Int32Array(e),xn[e]=n);for(let i=0;i!==e;++i)n[i]=t.allocateTextureUnit();return n}function Ln(t,e){const n=this.cache;n[0]!==e&&(t.uniform1f(this.addr,e),n[0]=e)}function Pn(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(En(n,e))return;t.uniform2fv(this.addr,e),Tn(n,e)}}function Cn(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(En(n,e))return;t.uniform3fv(this.addr,e),Tn(n,e)}}function Rn(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(En(n,e))return;t.uniform4fv(this.addr,e),Tn(n,e)}}function On(t,e){const n=this.cache,i=e.elements;if(void 0===i){if(En(n,e))return;t.uniformMatrix2fv(this.addr,!1,e),Tn(n,e)}else{if(En(n,i))return;Sn.set(i),t.uniformMatrix2fv(this.addr,!1,Sn),Tn(n,i)}}function In(t,e){const n=this.cache,i=e.elements;if(void 0===i){if(En(n,e))return;t.uniformMatrix3fv(this.addr,!1,e),Tn(n,e)}else{if(En(n,i))return;_n.set(i),t.uniformMatrix3fv(this.addr,!1,_n),Tn(n,i)}}function Nn(t,e){const n=this.cache,i=e.elements;if(void 0===i){if(En(n,e))return;t.uniformMatrix4fv(this.addr,!1,e),Tn(n,e)}else{if(En(n,i))return;wn.set(i),t.uniformMatrix4fv(this.addr,!1,wn),Tn(n,i)}}function Dn(t,e,n){const i=this.cache,r=n.allocateTextureUnit();i[0]!==r&&(t.uniform1i(this.addr,r),i[0]=r),n.safeSetTexture2D(e||mn,r)}function zn(t,e,n){const i=this.cache,r=n.allocateTextureUnit();i[0]!==r&&(t.uniform1i(this.addr,r),i[0]=r),n.setTexture2DArray(e||gn,r)}function kn(t,e,n){const i=this.cache,r=n.allocateTextureUnit();i[0]!==r&&(t.uniform1i(this.addr,r),i[0]=r),n.setTexture3D(e||vn,r)}function Bn(t,e,n){const i=this.cache,r=n.allocateTextureUnit();i[0]!==r&&(t.uniform1i(this.addr,r),i[0]=r),n.safeSetTextureCube(e||yn,r)}function Fn(t,e){const n=this.cache;n[0]!==e&&(t.uniform1i(this.addr,e),n[0]=e)}function Un(t,e){const n=this.cache;En(n,e)||(t.uniform2iv(this.addr,e),Tn(n,e))}function jn(t,e){const n=this.cache;En(n,e)||(t.uniform3iv(this.addr,e),Tn(n,e))}function Hn(t,e){const n=this.cache;En(n,e)||(t.uniform4iv(this.addr,e),Tn(n,e))}function Gn(t,e){const n=this.cache;n[0]!==e&&(t.uniform1ui(this.addr,e),n[0]=e)}function Vn(t,e){t.uniform1fv(this.addr,e)}function Wn(t,e){t.uniform1iv(this.addr,e)}function qn(t,e){t.uniform2iv(this.addr,e)}function Xn(t,e){t.uniform3iv(this.addr,e)}function Yn(t,e){t.uniform4iv(this.addr,e)}function Zn(t,e){const n=Mn(e,this.size,2);t.uniform2fv(this.addr,n)}function Jn(t,e){const n=Mn(e,this.size,3);t.uniform3fv(this.addr,n)}function Kn(t,e){const n=Mn(e,this.size,4);t.uniform4fv(this.addr,n)}function $n(t,e){const n=Mn(e,this.size,4);t.uniformMatrix2fv(this.addr,!1,n)}function Qn(t,e){const n=Mn(e,this.size,9);t.uniformMatrix3fv(this.addr,!1,n)}function ti(t,e){const n=Mn(e,this.size,16);t.uniformMatrix4fv(this.addr,!1,n)}function ei(t,e,n){const i=e.length,r=An(n,i);t.uniform1iv(this.addr,r);for(let t=0;t!==i;++t)n.safeSetTexture2D(e[t]||mn,r[t])}function ni(t,e,n){const i=e.length,r=An(n,i);t.uniform1iv(this.addr,r);for(let t=0;t!==i;++t)n.safeSetTextureCube(e[t]||yn,r[t])}function ii(t,e,n){this.id=t,this.addr=n,this.cache=[],this.setValue=function(t){switch(t){case 5126:return Ln;case 35664:return Pn;case 35665:return Cn;case 35666:return Rn;case 35674:return On;case 35675:return In;case 35676:return Nn;case 5124:case 35670:return Fn;case 35667:case 35671:return Un;case 35668:case 35672:return jn;case 35669:case 35673:return Hn;case 5125:return Gn;case 35678:case 36198:case 36298:case 36306:case 35682:return Dn;case 35679:case 36299:case 36307:return kn;case 35680:case 36300:case 36308:case 36293:return Bn;case 36289:case 36303:case 36311:case 36292:return zn}}(e.type)}function ri(t,e,n){this.id=t,this.addr=n,this.cache=[],this.size=e.size,this.setValue=function(t){switch(t){case 5126:return Vn;case 35664:return Zn;case 35665:return Jn;case 35666:return Kn;case 35674:return $n;case 35675:return Qn;case 35676:return ti;case 5124:case 35670:return Wn;case 35667:case 35671:return qn;case 35668:case 35672:return Xn;case 35669:case 35673:return Yn;case 35678:case 36198:case 36298:case 36306:case 35682:return ei;case 35680:case 36300:case 36308:case 36293:return ni}}(e.type)}function oi(t){this.id=t,this.seq=[],this.map={}}ri.prototype.updateCache=function(t){const e=this.cache;t instanceof Float32Array&&e.length!==t.length&&(this.cache=new Float32Array(t.length)),Tn(e,t)},oi.prototype.setValue=function(t,e,n){const i=this.seq;for(let r=0,o=i.length;r!==o;++r){const o=i[r];o.setValue(t,e[o.id],n)}};const si=/([\w\d_]+)(\])?(\[|\.)?/g;function ai(t,e){t.seq.push(e),t.map[e.id]=e}function li(t,e,n){const i=t.name,r=i.length;for(si.lastIndex=0;;){const o=si.exec(i),s=si.lastIndex;let a=o[1];const l="]"===o[2],c=o[3];if(l&&(a|=0),void 0===c||"["===c&&s+2===r){ai(n,void 0===c?new ii(a,t,e):new ri(a,t,e));break}{let t=n.map[a];void 0===t&&(t=new oi(a),ai(n,t)),n=t}}}function ci(t,e){this.seq=[],this.map={};const n=t.getProgramParameter(e,35718);for(let i=0;i<n;++i){const n=t.getActiveUniform(e,i);li(n,t.getUniformLocation(e,n.name),this)}}function ui(t,e,n){const i=t.createShader(e);return t.shaderSource(i,n),t.compileShader(i),i}ci.prototype.setValue=function(t,e,n,i){const r=this.map[e];void 0!==r&&r.setValue(t,n,i)},ci.prototype.setOptional=function(t,e,n){const i=e[n];void 0!==i&&this.setValue(t,n,i)},ci.upload=function(t,e,n,i){for(let r=0,o=e.length;r!==o;++r){const o=e[r],s=n[o.id];!1!==s.needsUpdate&&o.setValue(t,s.value,i)}},ci.seqWithValue=function(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};let hi=0;function di(t){switch(t){case 3e3:return["Linear","( value )"];case 3001:return["sRGB","( value )"];case 3002:return["RGBE","( value )"];case 3004:return["RGBM","( value, 7.0 )"];case 3005:return["RGBM","( value, 16.0 )"];case 3006:return["RGBD","( value, 256.0 )"];case 3007:return["Gamma","( value, float( GAMMA_FACTOR ) )"];case 3003:return["LogLuv","( value )"];default:return console.warn("THREE.WebGLProgram: Unsupported encoding:",t),["Linear","( value )"]}}function pi(t,e,n){const i=t.getShaderParameter(e,35713),r=t.getShaderInfoLog(e).trim();if(i&&""===r)return"";return"THREE.WebGLShader: gl.getShaderInfoLog() "+n+"\n"+r+function(t){const e=t.split("\n");for(let t=0;t<e.length;t++)e[t]=t+1+": "+e[t];return e.join("\n")}(t.getShaderSource(e))}function fi(t,e){const n=di(e);return"vec4 "+t+"( vec4 value ) { return "+n[0]+"ToLinear"+n[1]+"; }"}function mi(t,e){const n=di(e);return"vec4 "+t+"( vec4 value ) { return LinearTo"+n[0]+n[1]+"; }"}function gi(t,e){let n;switch(e){case 1:n="Linear";break;case 2:n="Reinhard";break;case 3:n="OptimizedCineon";break;case 4:n="ACESFilmic";break;case 5:n="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",e),n="Linear"}return"vec3 "+t+"( vec3 color ) { return "+n+"ToneMapping( color ); }"}function vi(t){return""!==t}function yi(t,e){return t.replace(/NUM_DIR_LIGHTS/g,e.numDirLights).replace(/NUM_SPOT_LIGHTS/g,e.numSpotLights).replace(/NUM_RECT_AREA_LIGHTS/g,e.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,e.numPointLights).replace(/NUM_HEMI_LIGHTS/g,e.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g,e.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS/g,e.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g,e.numPointLightShadows)}function bi(t,e){return t.replace(/NUM_CLIPPING_PLANES/g,e.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,e.numClippingPlanes-e.numClipIntersection)}const xi=/^[ \t]*#include +<([\w\d./]+)>/gm;function wi(t){return t.replace(xi,_i)}function _i(t,e){const n=Ze[e];if(void 0===n)throw new Error("Can not resolve #include <"+e+">");return wi(n)}const Si=/#pragma unroll_loop[\s]+?for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}/g,Mi=/#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 Ei(t){return t.replace(Mi,Ai).replace(Si,Ti)}function Ti(t,e,n,i){return console.warn("WebGLProgram: #pragma unroll_loop shader syntax is deprecated. Please use #pragma unroll_loop_start syntax instead."),Ai(t,e,n,i)}function Ai(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 Li(t){let e="precision "+t.precision+" float;\nprecision "+t.precision+" int;";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 Pi(t,e,n,i){const r=t.getContext(),o=n.defines;let s=n.vertexShader,a=n.fragmentShader;const l=function(t){let e="SHADOWMAP_TYPE_BASIC";return 1===t.shadowMapType?e="SHADOWMAP_TYPE_PCF":2===t.shadowMapType?e="SHADOWMAP_TYPE_PCF_SOFT":3===t.shadowMapType&&(e="SHADOWMAP_TYPE_VSM"),e}(n),c=function(t){let e="ENVMAP_TYPE_CUBE";if(t.envMap)switch(t.envMapMode){case 301:case 302:e="ENVMAP_TYPE_CUBE";break;case 306:case 307:e="ENVMAP_TYPE_CUBE_UV"}return e}(n),u=function(t){let e="ENVMAP_MODE_REFLECTION";if(t.envMap)switch(t.envMapMode){case 302:case 307:e="ENVMAP_MODE_REFRACTION"}return e}(n),h=function(t){let e="ENVMAP_BLENDING_NONE";if(t.envMap)switch(t.combine){case 0:e="ENVMAP_BLENDING_MULTIPLY";break;case 1:e="ENVMAP_BLENDING_MIX";break;case 2:e="ENVMAP_BLENDING_ADD"}return e}(n),d=t.gammaFactor>0?t.gammaFactor:1,p=n.isWebGL2?"":function(t){return[t.extensionDerivatives||t.envMapCubeUV||t.bumpMap||t.tangentSpaceNormalMap||t.clearcoatNormalMap||t.flatShading||"physical"===t.shaderID?"#extension GL_OES_standard_derivatives : enable":"",(t.extensionFragDepth||t.logarithmicDepthBuffer)&&t.rendererExtensionFragDepth?"#extension GL_EXT_frag_depth : enable":"",t.extensionDrawBuffers&&t.rendererExtensionDrawBuffers?"#extension GL_EXT_draw_buffers : require":"",(t.extensionShaderTextureLOD||t.envMap)&&t.rendererExtensionShaderTextureLod?"#extension GL_EXT_shader_texture_lod : enable":""].filter(vi).join("\n")}(n),f=function(t){const e=[];for(const n in t){const i=t[n];!1!==i&&e.push("#define "+n+" "+i)}return e.join("\n")}(o),m=r.createProgram();let g,v,y=n.glslVersion?"#version "+n.glslVersion+"\n":"";n.isRawShaderMaterial?(g=[f].filter(vi).join("\n"),g.length>0&&(g+="\n"),v=[p,f].filter(vi).join("\n"),v.length>0&&(v+="\n")):(g=[Li(n),"#define SHADER_NAME "+n.shaderName,f,n.instancing?"#define USE_INSTANCING":"",n.instancingColor?"#define USE_INSTANCING_COLOR":"",n.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define GAMMA_FACTOR "+d,"#define MAX_BONES "+n.maxBones,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 "+u:"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMap&&n.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",n.normalMap&&n.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.displacementMap&&n.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.vertexTangents?"#define USE_TANGENT":"",n.vertexColors?"#define USE_COLOR":"",n.vertexUvs?"#define USE_UV":"",n.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",n.flatShading?"#define FLAT_SHADED":"",n.skinning?"#define USE_SKINNING":"",n.useVertexTexture?"#define BONE_TEXTURE":"",n.morphTargets?"#define USE_MORPHTARGETS":"",n.morphNormals&&!1===n.flatShading?"#define USE_MORPHNORMALS":"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+l:"",n.sizeAttenuation?"#define USE_SIZEATTENUATION":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.logarithmicDepthBuffer&&n.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","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","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_TANGENT","\tattribute vec4 tangent;","#endif","#ifdef USE_COLOR","\tattribute vec3 color;","#endif","#ifdef USE_MORPHTARGETS","\tattribute vec3 morphTarget0;","\tattribute vec3 morphTarget1;","\tattribute vec3 morphTarget2;","\tattribute vec3 morphTarget3;","\t#ifdef USE_MORPHNORMALS","\t\tattribute vec3 morphNormal0;","\t\tattribute vec3 morphNormal1;","\t\tattribute vec3 morphNormal2;","\t\tattribute vec3 morphNormal3;","\t#else","\t\tattribute vec3 morphTarget4;","\t\tattribute vec3 morphTarget5;","\t\tattribute vec3 morphTarget6;","\t\tattribute vec3 morphTarget7;","\t#endif","#endif","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(vi).join("\n"),v=[p,Li(n),"#define SHADER_NAME "+n.shaderName,f,n.alphaTest?"#define ALPHATEST "+n.alphaTest+(n.alphaTest%1?"":".0"):"","#define GAMMA_FACTOR "+d,n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.matcap?"#define USE_MATCAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+c:"",n.envMap?"#define "+u:"",n.envMap?"#define "+h:"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMap&&n.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",n.normalMap&&n.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.sheen?"#define USE_SHEEN":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.vertexTangents?"#define USE_TANGENT":"",n.vertexColors||n.instancingColor?"#define USE_COLOR":"",n.vertexUvs?"#define USE_UV":"",n.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",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 "+l:"",n.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",n.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.logarithmicDepthBuffer&&n.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"",(n.extensionShaderTextureLOD||n.envMap)&&n.rendererExtensionShaderTextureLod?"#define TEXTURE_LOD_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",0!==n.toneMapping?"#define TONE_MAPPING":"",0!==n.toneMapping?Ze.tonemapping_pars_fragment:"",0!==n.toneMapping?gi("toneMapping",n.toneMapping):"",n.dithering?"#define DITHERING":"",Ze.encodings_pars_fragment,n.map?fi("mapTexelToLinear",n.mapEncoding):"",n.matcap?fi("matcapTexelToLinear",n.matcapEncoding):"",n.envMap?fi("envMapTexelToLinear",n.envMapEncoding):"",n.emissiveMap?fi("emissiveMapTexelToLinear",n.emissiveMapEncoding):"",n.lightMap?fi("lightMapTexelToLinear",n.lightMapEncoding):"",mi("linearToOutputTexel",n.outputEncoding),n.depthPacking?"#define DEPTH_PACKING "+n.depthPacking:"","\n"].filter(vi).join("\n")),s=wi(s),s=yi(s,n),s=bi(s,n),a=wi(a),a=yi(a,n),a=bi(a,n),s=Ei(s),a=Ei(a),n.isWebGL2&&!0!==n.isRawShaderMaterial&&(y="#version 300 es\n",g=["#define attribute in","#define varying out","#define texture2D texture"].join("\n")+"\n"+g,v=["#define varying in","300 es"===n.glslVersion?"":"out highp vec4 pc_fragColor;","300 es"===n.glslVersion?"":"#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 b=y+v+a,x=ui(r,35633,y+g+s),w=ui(r,35632,b);if(r.attachShader(m,x),r.attachShader(m,w),void 0!==n.index0AttributeName?r.bindAttribLocation(m,0,n.index0AttributeName):!0===n.morphTargets&&r.bindAttribLocation(m,0,"position"),r.linkProgram(m),t.debug.checkShaderErrors){const t=r.getProgramInfoLog(m).trim(),e=r.getShaderInfoLog(x).trim(),n=r.getShaderInfoLog(w).trim();let i=!0,o=!0;if(!1===r.getProgramParameter(m,35714)){i=!1;const e=pi(r,x,"vertex"),n=pi(r,w,"fragment");console.error("THREE.WebGLProgram: shader error: ",r.getError(),"35715",r.getProgramParameter(m,35715),"gl.getProgramInfoLog",t,e,n)}else""!==t?console.warn("THREE.WebGLProgram: gl.getProgramInfoLog()",t):""!==e&&""!==n||(o=!1);o&&(this.diagnostics={runnable:i,programLog:t,vertexShader:{log:e,prefix:g},fragmentShader:{log:n,prefix:v}})}let _,S;return r.deleteShader(x),r.deleteShader(w),this.getUniforms=function(){return void 0===_&&(_=new ci(r,m)),_},this.getAttributes=function(){return void 0===S&&(S=function(t,e){const n={},i=t.getProgramParameter(e,35721);for(let r=0;r<i;r++){const i=t.getActiveAttrib(e,r).name;n[i]=t.getAttribLocation(e,i)}return n}(r,m)),S},this.destroy=function(){i.releaseStatesOfProgram(this),r.deleteProgram(m),this.program=void 0},this.name=n.shaderName,this.id=hi++,this.cacheKey=e,this.usedTimes=1,this.program=m,this.vertexShader=x,this.fragmentShader=w,this}function Ci(t,e,n,r,o,s){const a=[],l=r.isWebGL2,c=r.logarithmicDepthBuffer,u=r.floatVertexTextures,h=r.maxVertexUniforms,d=r.vertexTextures;let p=r.precision;const f={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"},m=["precision","isWebGL2","supportsVertexTextures","outputEncoding","instancing","instancingColor","map","mapEncoding","matcap","matcapEncoding","envMap","envMapMode","envMapEncoding","envMapCubeUV","lightMap","lightMapEncoding","aoMap","emissiveMap","emissiveMapEncoding","bumpMap","normalMap","objectSpaceNormalMap","tangentSpaceNormalMap","clearcoatMap","clearcoatRoughnessMap","clearcoatNormalMap","displacementMap","specularMap","roughnessMap","metalnessMap","gradientMap","alphaMap","combine","vertexColors","vertexTangents","vertexUvs","uvsVertexOnly","fog","useFog","fogExp2","flatShading","sizeAttenuation","logarithmicDepthBuffer","skinning","maxBones","useVertexTexture","morphTargets","morphNormals","maxMorphTargets","maxMorphNormals","premultipliedAlpha","numDirLights","numPointLights","numSpotLights","numHemiLights","numRectAreaLights","numDirLightShadows","numPointLightShadows","numSpotLightShadows","shadowMapEnabled","shadowMapType","toneMapping","physicallyCorrectLights","alphaTest","doubleSided","flipSided","numClippingPlanes","numClipIntersection","depthPacking","dithering","sheen","transmissionMap"];function g(t){let e;return t?t.isTexture?e=t.encoding:t.isWebGLRenderTarget&&(console.warn("THREE.WebGLPrograms.getTextureEncodingFromMap: don't use render targets as textures. Use their .texture property instead."),e=t.texture.encoding):e=3e3,e}return{getParameters:function(o,a,m,v,y){const b=v.fog,x=o.isMeshStandardMaterial?v.environment:null,w=e.get(o.envMap||x),_=f[o.type],S=y.isSkinnedMesh?function(t){const e=t.skeleton.bones;if(u)return 1024;{const t=h,n=Math.floor((t-20)/4),i=Math.min(n,e.length);return i<e.length?(console.warn("THREE.WebGLRenderer: Skeleton has "+e.length+" bones. This GPU supports "+i+"."),0):i}}(y):0;let M,E;if(null!==o.precision&&(p=r.getMaxPrecision(o.precision),p!==o.precision&&console.warn("THREE.WebGLProgram.getParameters:",o.precision,"not supported, using",p,"instead.")),_){const t=Ke[_];M=t.vertexShader,E=t.fragmentShader}else M=o.vertexShader,E=o.fragmentShader;const T=t.getRenderTarget();return{isWebGL2:l,shaderID:_,shaderName:o.type,vertexShader:M,fragmentShader:E,defines:o.defines,isRawShaderMaterial:!0===o.isRawShaderMaterial,glslVersion:o.glslVersion,precision:p,instancing:!0===y.isInstancedMesh,instancingColor:!0===y.isInstancedMesh&&null!==y.instanceColor,supportsVertexTextures:d,outputEncoding:null!==T?g(T.texture):t.outputEncoding,map:!!o.map,mapEncoding:g(o.map),matcap:!!o.matcap,matcapEncoding:g(o.matcap),envMap:!!w,envMapMode:w&&w.mapping,envMapEncoding:g(w),envMapCubeUV:!!w&&(306===w.mapping||307===w.mapping),lightMap:!!o.lightMap,lightMapEncoding:g(o.lightMap),aoMap:!!o.aoMap,emissiveMap:!!o.emissiveMap,emissiveMapEncoding:g(o.emissiveMap),bumpMap:!!o.bumpMap,normalMap:!!o.normalMap,objectSpaceNormalMap:1===o.normalMapType,tangentSpaceNormalMap:0===o.normalMapType,clearcoatMap:!!o.clearcoatMap,clearcoatRoughnessMap:!!o.clearcoatRoughnessMap,clearcoatNormalMap:!!o.clearcoatNormalMap,displacementMap:!!o.displacementMap,roughnessMap:!!o.roughnessMap,metalnessMap:!!o.metalnessMap,specularMap:!!o.specularMap,alphaMap:!!o.alphaMap,gradientMap:!!o.gradientMap,sheen:!!o.sheen,transmissionMap:!!o.transmissionMap,combine:o.combine,vertexTangents:o.normalMap&&o.vertexTangents,vertexColors:o.vertexColors,vertexUvs:!!(o.map||o.bumpMap||o.normalMap||o.specularMap||o.alphaMap||o.emissiveMap||o.roughnessMap||o.metalnessMap||o.clearcoatMap||o.clearcoatRoughnessMap||o.clearcoatNormalMap||o.displacementMap||o.transmissionMap),uvsVertexOnly:!(o.map||o.bumpMap||o.normalMap||o.specularMap||o.alphaMap||o.emissiveMap||o.roughnessMap||o.metalnessMap||o.clearcoatNormalMap||o.transmissionMap||!o.displacementMap),fog:!!b,useFog:o.fog,fogExp2:b&&b.isFogExp2,flatShading:o.flatShading,sizeAttenuation:o.sizeAttenuation,logarithmicDepthBuffer:c,skinning:o.skinning&&S>0,maxBones:S,useVertexTexture:u,morphTargets:o.morphTargets,morphNormals:o.morphNormals,maxMorphTargets:t.maxMorphTargets,maxMorphNormals:t.maxMorphNormals,numDirLights:a.directional.length,numPointLights:a.point.length,numSpotLights:a.spot.length,numRectAreaLights:a.rectArea.length,numHemiLights:a.hemi.length,numDirLightShadows:a.directionalShadowMap.length,numPointLightShadows:a.pointShadowMap.length,numSpotLightShadows:a.spotShadowMap.length,numClippingPlanes:s.numPlanes,numClipIntersection:s.numIntersection,dithering:o.dithering,shadowMapEnabled:t.shadowMap.enabled&&m.length>0,shadowMapType:t.shadowMap.type,toneMapping:o.toneMapped?t.toneMapping:0,physicallyCorrectLights:t.physicallyCorrectLights,premultipliedAlpha:o.premultipliedAlpha,alphaTest:o.alphaTest,doubleSided:o.side===i,flipSided:1===o.side,depthPacking:void 0!==o.depthPacking&&o.depthPacking,index0AttributeName:o.index0AttributeName,extensionDerivatives:o.extensions&&o.extensions.derivatives,extensionFragDepth:o.extensions&&o.extensions.fragDepth,extensionDrawBuffers:o.extensions&&o.extensions.drawBuffers,extensionShaderTextureLOD:o.extensions&&o.extensions.shaderTextureLOD,rendererExtensionFragDepth:l||n.has("EXT_frag_depth"),rendererExtensionDrawBuffers:l||n.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:l||n.has("EXT_shader_texture_lod"),customProgramCacheKey:o.customProgramCacheKey()}},getProgramCacheKey:function(e){const n=[];if(e.shaderID?n.push(e.shaderID):(n.push(e.fragmentShader),n.push(e.vertexShader)),void 0!==e.defines)for(const t in e.defines)n.push(t),n.push(e.defines[t]);if(!1===e.isRawShaderMaterial){for(let t=0;t<m.length;t++)n.push(e[m[t]]);n.push(t.outputEncoding),n.push(t.gammaFactor)}return n.push(e.customProgramCacheKey),n.join()},getUniforms:function(t){const e=f[t.type];let n;if(e){const t=Ke[e];n=De.clone(t.uniforms)}else n=t.uniforms;return n},acquireProgram:function(e,n){let i;for(let t=0,e=a.length;t<e;t++){const e=a[t];if(e.cacheKey===n){i=e,++i.usedTimes;break}}return void 0===i&&(i=new Pi(t,n,e,o),a.push(i)),i},releaseProgram:function(t){if(0==--t.usedTimes){const e=a.indexOf(t);a[e]=a[a.length-1],a.pop(),t.destroy()}},programs:a}}function Ri(){let t=new WeakMap;return{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 Oi(t,e){return t.groupOrder!==e.groupOrder?t.groupOrder-e.groupOrder:t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.program!==e.program?t.program.id-e.program.id:t.material.id!==e.material.id?t.material.id-e.material.id:t.z!==e.z?t.z-e.z:t.id-e.id}function Ii(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 Ni(t){const e=[];let n=0;const i=[],r=[],o={id:-1};function s(i,r,s,a,l,c){let u=e[n];const h=t.get(s);return void 0===u?(u={id:i.id,object:i,geometry:r,material:s,program:h.program||o,groupOrder:a,renderOrder:i.renderOrder,z:l,group:c},e[n]=u):(u.id=i.id,u.object=i,u.geometry=r,u.material=s,u.program=h.program||o,u.groupOrder=a,u.renderOrder=i.renderOrder,u.z=l,u.group=c),n++,u}return{opaque:i,transparent:r,init:function(){n=0,i.length=0,r.length=0},push:function(t,e,n,o,a,l){const c=s(t,e,n,o,a,l);(!0===n.transparent?r:i).push(c)},unshift:function(t,e,n,o,a,l){const c=s(t,e,n,o,a,l);(!0===n.transparent?r:i).unshift(c)},finish:function(){for(let t=n,i=e.length;t<i;t++){const n=e[t];if(null===n.id)break;n.id=null,n.object=null,n.geometry=null,n.material=null,n.program=null,n.group=null}},sort:function(t,e){i.length>1&&i.sort(t||Oi),r.length>1&&r.sort(e||Ii)}}}function Di(t){let e=new WeakMap;return{get:function(n,i){const r=e.get(n);let o;return void 0===r?(o=new Ni(t),e.set(n,new WeakMap),e.get(n).set(i,o)):(o=r.get(i),void 0===o&&(o=new Ni(t),r.set(i,o))),o},dispose:function(){e=new WeakMap}}}function zi(){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 y,color:new Ft};break;case"SpotLight":n={position:new y,direction:new y,color:new Ft,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":n={position:new y,color:new Ft,distance:0,decay:0};break;case"HemisphereLight":n={direction:new y,skyColor:new Ft,groundColor:new Ft};break;case"RectAreaLight":n={color:new Ft,position:new y,halfWidth:new y,halfHeight:new y}}return t[e.id]=n,n}}}let ki=0;function Bi(t,e){return(e.castShadow?1:0)-(t.castShadow?1:0)}function Fi(t,e){const n=new zi,i=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={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new l};break;case"PointLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new l,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},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotShadow:[],spotShadowMap:[],spotShadowMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[]};for(let t=0;t<9;t++)r.probe.push(new y);const o=new y,s=new q,a=new q;return{setup:function(l,c,u){let h=0,d=0,p=0;for(let t=0;t<9;t++)r.probe[t].set(0,0,0);let f=0,m=0,g=0,v=0,y=0,b=0,x=0,w=0;const _=u.matrixWorldInverse;l.sort(Bi);for(let t=0,e=l.length;t<e;t++){const e=l[t],c=e.color,u=e.intensity,S=e.distance,M=e.shadow&&e.shadow.map?e.shadow.map.texture:null;if(e.isAmbientLight)h+=c.r*u,d+=c.g*u,p+=c.b*u;else if(e.isLightProbe)for(let t=0;t<9;t++)r.probe[t].addScaledVector(e.sh.coefficients[t],u);else if(e.isDirectionalLight){const t=n.get(e);if(t.color.copy(e.color).multiplyScalar(e.intensity),t.direction.setFromMatrixPosition(e.matrixWorld),o.setFromMatrixPosition(e.target.matrixWorld),t.direction.sub(o),t.direction.transformDirection(_),e.castShadow){const t=e.shadow,n=i.get(e);n.shadowBias=t.bias,n.shadowNormalBias=t.normalBias,n.shadowRadius=t.radius,n.shadowMapSize=t.mapSize,r.directionalShadow[f]=n,r.directionalShadowMap[f]=M,r.directionalShadowMatrix[f]=e.shadow.matrix,b++}r.directional[f]=t,f++}else if(e.isSpotLight){const t=n.get(e);if(t.position.setFromMatrixPosition(e.matrixWorld),t.position.applyMatrix4(_),t.color.copy(c).multiplyScalar(u),t.distance=S,t.direction.setFromMatrixPosition(e.matrixWorld),o.setFromMatrixPosition(e.target.matrixWorld),t.direction.sub(o),t.direction.transformDirection(_),t.coneCos=Math.cos(e.angle),t.penumbraCos=Math.cos(e.angle*(1-e.penumbra)),t.decay=e.decay,e.castShadow){const t=e.shadow,n=i.get(e);n.shadowBias=t.bias,n.shadowNormalBias=t.normalBias,n.shadowRadius=t.radius,n.shadowMapSize=t.mapSize,r.spotShadow[g]=n,r.spotShadowMap[g]=M,r.spotShadowMatrix[g]=e.shadow.matrix,w++}r.spot[g]=t,g++}else if(e.isRectAreaLight){const t=n.get(e);t.color.copy(c).multiplyScalar(u),t.position.setFromMatrixPosition(e.matrixWorld),t.position.applyMatrix4(_),a.identity(),s.copy(e.matrixWorld),s.premultiply(_),a.extractRotation(s),t.halfWidth.set(.5*e.width,0,0),t.halfHeight.set(0,.5*e.height,0),t.halfWidth.applyMatrix4(a),t.halfHeight.applyMatrix4(a),r.rectArea[v]=t,v++}else if(e.isPointLight){const t=n.get(e);if(t.position.setFromMatrixPosition(e.matrixWorld),t.position.applyMatrix4(_),t.color.copy(e.color).multiplyScalar(e.intensity),t.distance=e.distance,t.decay=e.decay,e.castShadow){const t=e.shadow,n=i.get(e);n.shadowBias=t.bias,n.shadowNormalBias=t.normalBias,n.shadowRadius=t.radius,n.shadowMapSize=t.mapSize,n.shadowCameraNear=t.camera.near,n.shadowCameraFar=t.camera.far,r.pointShadow[m]=n,r.pointShadowMap[m]=M,r.pointShadowMatrix[m]=e.shadow.matrix,x++}r.point[m]=t,m++}else if(e.isHemisphereLight){const t=n.get(e);t.direction.setFromMatrixPosition(e.matrixWorld),t.direction.transformDirection(_),t.direction.normalize(),t.skyColor.copy(e.color).multiplyScalar(u),t.groundColor.copy(e.groundColor).multiplyScalar(u),r.hemi[y]=t,y++}}v>0&&(e.isWebGL2||!0===t.has("OES_texture_float_linear")?(r.rectAreaLTC1=Je.LTC_FLOAT_1,r.rectAreaLTC2=Je.LTC_FLOAT_2):!0===t.has("OES_texture_half_float_linear")?(r.rectAreaLTC1=Je.LTC_HALF_1,r.rectAreaLTC2=Je.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),r.ambient[0]=h,r.ambient[1]=d,r.ambient[2]=p;const S=r.hash;S.directionalLength===f&&S.pointLength===m&&S.spotLength===g&&S.rectAreaLength===v&&S.hemiLength===y&&S.numDirectionalShadows===b&&S.numPointShadows===x&&S.numSpotShadows===w||(r.directional.length=f,r.spot.length=g,r.rectArea.length=v,r.point.length=m,r.hemi.length=y,r.directionalShadow.length=b,r.directionalShadowMap.length=b,r.pointShadow.length=x,r.pointShadowMap.length=x,r.spotShadow.length=w,r.spotShadowMap.length=w,r.directionalShadowMatrix.length=b,r.pointShadowMatrix.length=x,r.spotShadowMatrix.length=w,S.directionalLength=f,S.pointLength=m,S.spotLength=g,S.rectAreaLength=v,S.hemiLength=y,S.numDirectionalShadows=b,S.numPointShadows=x,S.numSpotShadows=w,r.version=ki++)},state:r}}function Ui(t,e){const n=new Fi(t,e),i=[],r=[];return{init:function(){i.length=0,r.length=0},state:{lightsArray:i,shadowsArray:r,lights:n},setupLights:function(t){n.setup(i,r,t)},pushLight:function(t){i.push(t)},pushShadow:function(t){r.push(t)}}}function ji(t,e){let n=new WeakMap;return{get:function(i,r){let o;return!1===n.has(i)?(o=new Ui(t,e),n.set(i,new WeakMap),n.get(i).set(r,o)):!1===n.get(i).has(r)?(o=new Ui(t,e),n.get(i).set(r,o)):o=n.get(i).get(r),o},dispose:function(){n=new WeakMap}}}function Hi(t){Ht.call(this),this.type="MeshDepthMaterial",this.depthPacking=3200,this.skinning=!1,this.morphTargets=!1,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.setValues(t)}function Gi(t){Ht.call(this),this.type="MeshDistanceMaterial",this.referencePosition=new y,this.nearDistance=1,this.farDistance=1e3,this.skinning=!1,this.morphTargets=!1,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.fog=!1,this.setValues(t)}Hi.prototype=Object.create(Ht.prototype),Hi.prototype.constructor=Hi,Hi.prototype.isMeshDepthMaterial=!0,Hi.prototype.copy=function(t){return Ht.prototype.copy.call(this,t),this.depthPacking=t.depthPacking,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this},Gi.prototype=Object.create(Ht.prototype),Gi.prototype.constructor=Gi,Gi.prototype.isMeshDistanceMaterial=!0,Gi.prototype.copy=function(t){return Ht.prototype.copy.call(this,t),this.referencePosition.copy(t.referencePosition),this.nearDistance=t.nearDistance,this.farDistance=t.farDistance,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this};function Vi(t,e,n){let r=new We;const o=new l,s=new l,a=new f,c=[],u=[],h={},d={0:1,1:0,2:i},p=new ze({defines:{SAMPLE_RATE:2/8,HALF_SAMPLE_RATE:1/8},uniforms:{shadow_pass:{value:null},resolution:{value:new l},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\tfloat mean = 0.0;\n\tfloat squared_mean = 0.0;\n\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy ) / resolution ) );\n\tfor ( float i = -1.0; i < 1.0 ; i += SAMPLE_RATE) {\n\t\t#ifdef HORIZONAL_PASS\n\t\t\tvec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( i, 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, i ) * radius ) / resolution ) );\n\t\t\tmean += depth;\n\t\t\tsquared_mean += depth * depth;\n\t\t#endif\n\t}\n\tmean = mean * HALF_SAMPLE_RATE;\n\tsquared_mean = squared_mean * HALF_SAMPLE_RATE;\n\tfloat std_dev = sqrt( squared_mean - mean * mean );\n\tgl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\n}"}),g=p.clone();g.defines.HORIZONAL_PASS=1;const v=new he;v.setAttribute("position",new qt(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const y=new Pe(v,p),b=this;function x(n,i){const r=e.update(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(i,null,r,p,y,null),g.uniforms.shadow_pass.value=n.mapPass.texture,g.uniforms.resolution.value=n.mapSize,g.uniforms.radius.value=n.radius,t.setRenderTarget(n.map),t.clear(),t.renderBufferDirect(i,null,r,g,y,null)}function w(t,e,n){const i=t<<0|e<<1|n<<2;let r=c[i];return void 0===r&&(r=new Hi({depthPacking:3201,morphTargets:t,skinning:e}),c[i]=r),r}function _(t,e,n){const i=t<<0|e<<1|n<<2;let r=u[i];return void 0===r&&(r=new Gi({morphTargets:t,skinning:e}),u[i]=r),r}function S(e,n,i,r,o,s,a){let l=null,c=w,u=e.customDepthMaterial;if(!0===r.isPointLight&&(c=_,u=e.customDistanceMaterial),void 0===u){let t=!1;!0===i.morphTargets&&(t=n.morphAttributes&&n.morphAttributes.position&&n.morphAttributes.position.length>0);let r=!1;!0===e.isSkinnedMesh&&(!0===i.skinning?r=!0:console.warn("THREE.WebGLShadowMap: THREE.SkinnedMesh with material.skinning set to false:",e));l=c(t,r,!0===e.isInstancedMesh)}else l=u;if(t.localClippingEnabled&&!0===i.clipShadows&&0!==i.clippingPlanes.length){const t=l.uuid,e=i.uuid;let n=h[t];void 0===n&&(n={},h[t]=n);let r=n[e];void 0===r&&(r=l.clone(),n[e]=r),l=r}return l.visible=i.visible,l.wireframe=i.wireframe,l.side=3===a?null!==i.shadowSide?i.shadowSide:i.side:null!==i.shadowSide?i.shadowSide:d[i.side],l.clipShadows=i.clipShadows,l.clippingPlanes=i.clippingPlanes,l.clipIntersection=i.clipIntersection,l.wireframeLinewidth=i.wireframeLinewidth,l.linewidth=i.linewidth,!0===r.isPointLight&&!0===l.isMeshDistanceMaterial&&(l.referencePosition.setFromMatrixPosition(r.matrixWorld),l.nearDistance=o,l.farDistance=s),l}function M(n,i,o,s,a){if(!1===n.visible)return;if(n.layers.test(i.layers)&&(n.isMesh||n.isLine||n.isPoints)&&(n.castShadow||n.receiveShadow&&3===a)&&(!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 l=0,c=e.length;l<c;l++){const c=e[l],u=r[c.materialIndex];if(u&&u.visible){const e=S(n,i,u,s,o.near,o.far,a);t.renderBufferDirect(o,null,i,e,n,c)}}}else if(r.visible){const e=S(n,i,r,s,o.near,o.far,a);t.renderBufferDirect(o,null,i,e,n,null)}}const l=n.children;for(let t=0,e=l.length;t<e;t++)M(l[t],i,o,s,a)}this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=1,this.render=function(e,i,l){if(!1===b.enabled)return;if(!1===b.autoUpdate&&!1===b.needsUpdate)return;if(0===e.length)return;const c=t.getRenderTarget(),u=t.getActiveCubeFace(),h=t.getActiveMipmapLevel(),d=t.state;d.setBlending(0),d.buffers.color.setClear(1,1,1,1),d.buffers.depth.setTest(!0),d.setScissorTest(!1);for(let c=0,u=e.length;c<u;c++){const u=e[c],h=u.shadow;if(void 0===h){console.warn("THREE.WebGLShadowMap:",u,"has no shadow.");continue}if(!1===h.autoUpdate&&!1===h.needsUpdate)continue;o.copy(h.mapSize);const p=h.getFrameExtents();if(o.multiply(p),s.copy(h.mapSize),(o.x>n||o.y>n)&&(o.x>n&&(s.x=Math.floor(n/p.x),o.x=s.x*p.x,h.mapSize.x=s.x),o.y>n&&(s.y=Math.floor(n/p.y),o.y=s.y*p.y,h.mapSize.y=s.y)),null===h.map&&!h.isPointLightShadow&&3===this.type){const t={minFilter:1006,magFilter:1006,format:1023};h.map=new m(o.x,o.y,t),h.map.texture.name=u.name+".shadowMap",h.mapPass=new m(o.x,o.y,t),h.camera.updateProjectionMatrix()}if(null===h.map){const t={minFilter:1003,magFilter:1003,format:1023};h.map=new m(o.x,o.y,t),h.map.texture.name=u.name+".shadowMap",h.camera.updateProjectionMatrix()}t.setRenderTarget(h.map),t.clear();const f=h.getViewportCount();for(let t=0;t<f;t++){const e=h.getViewport(t);a.set(s.x*e.x,s.y*e.y,s.x*e.z,s.y*e.w),d.viewport(a),h.updateMatrices(u,t),r=h.getFrustum(),M(i,l,h.camera,u,this.type)}h.isPointLightShadow||3!==this.type||x(h,l),h.needsUpdate=!1}b.needsUpdate=!1,t.setRenderTarget(c,u,h)}}function Wi(t,e,n){const r=n.isWebGL2;const o=new function(){let e=!1;const n=new f;let i=null;const r=new f(0,0,0,0);return{setMask:function(n){i===n||e||(t.colorMask(n,n,n,n),i=n)},setLocked:function(t){e=t},setClear:function(e,i,o,s,a){!0===a&&(e*=s,i*=s,o*=s),n.set(e,i,o,s),!1===r.equals(n)&&(t.clearColor(e,i,o,s),r.copy(n))},reset:function(){e=!1,i=null,r.set(-1,0,0,0)}}},s=new function(){let e=!1,n=null,i=null,r=null;return{setTest:function(t){t?D(2929):z(2929)},setMask:function(i){n===i||e||(t.depthMask(i),n=i)},setFunc:function(e){if(i!==e){if(e)switch(e){case 0:t.depthFunc(512);break;case 1:t.depthFunc(519);break;case 2:t.depthFunc(513);break;case 3:t.depthFunc(515);break;case 4:t.depthFunc(514);break;case 5:t.depthFunc(518);break;case 6:t.depthFunc(516);break;case 7:t.depthFunc(517);break;default:t.depthFunc(515)}else t.depthFunc(515);i=e}},setLocked:function(t){e=t},setClear:function(e){r!==e&&(t.clearDepth(e),r=e)},reset:function(){e=!1,n=null,i=null,r=null}}},a=new function(){let e=!1,n=null,i=null,r=null,o=null,s=null,a=null,l=null,c=null;return{setTest:function(t){e||(t?D(2960):z(2960))},setMask:function(i){n===i||e||(t.stencilMask(i),n=i)},setFunc:function(e,n,s){i===e&&r===n&&o===s||(t.stencilFunc(e,n,s),i=e,r=n,o=s)},setOp:function(e,n,i){s===e&&a===n&&l===i||(t.stencilOp(e,n,i),s=e,a=n,l=i)},setLocked:function(t){e=t},setClear:function(e){c!==e&&(t.clearStencil(e),c=e)},reset:function(){e=!1,n=null,i=null,r=null,o=null,s=null,a=null,l=null,c=null}}};let l={},c=null,u=null,h=null,d=null,p=null,m=null,g=null,v=null,y=null,b=!1,x=null,w=null,_=null,S=null,M=null;const E=t.getParameter(35661);let T=!1,A=0;const L=t.getParameter(7938);-1!==L.indexOf("WebGL")?(A=parseFloat(/^WebGL\ ([0-9])/.exec(L)[1]),T=A>=1):-1!==L.indexOf("OpenGL ES")&&(A=parseFloat(/^OpenGL\ ES\ ([0-9])/.exec(L)[1]),T=A>=2);let P=null,C={};const R=new f,O=new f;function I(e,n,i){const r=new Uint8Array(4),o=t.createTexture();t.bindTexture(e,o),t.texParameteri(e,10241,9728),t.texParameteri(e,10240,9728);for(let e=0;e<i;e++)t.texImage2D(n+e,0,6408,1,1,0,6408,5121,r);return o}const N={};function D(e){!0!==l[e]&&(t.enable(e),l[e]=!0)}function z(e){!1!==l[e]&&(t.disable(e),l[e]=!1)}N[3553]=I(3553,3553,1),N[34067]=I(34067,34069,6),o.setClear(0,0,0,1),s.setClear(1),a.setClear(0),D(2929),s.setFunc(3),U(!1),j(1),D(2884),F(0);const k={100:32774,101:32778,102:32779};if(r)k[103]=32775,k[104]=32776;else{const t=e.get("EXT_blend_minmax");null!==t&&(k[103]=t.MIN_EXT,k[104]=t.MAX_EXT)}const B={200:0,201:1,202:768,204:770,210:776,208:774,206:772,203:769,205:771,209:775,207:773};function F(e,n,i,r,o,s,a,l){if(0!==e){if(u||(D(3042),u=!0),5===e)o=o||n,s=s||i,a=a||r,n===d&&o===g||(t.blendEquationSeparate(k[n],k[o]),d=n,g=o),i===p&&r===m&&s===v&&a===y||(t.blendFuncSeparate(B[i],B[r],B[s],B[a]),p=i,m=r,v=s,y=a),h=e,b=null;else if(e!==h||l!==b){if(100===d&&100===g||(t.blendEquation(32774),d=100,g=100),l)switch(e){case 1:t.blendFuncSeparate(1,771,1,771);break;case 2:t.blendFunc(1,1);break;case 3:t.blendFuncSeparate(0,0,769,771);break;case 4:t.blendFuncSeparate(0,768,0,770);break;default:console.error("THREE.WebGLState: Invalid blending: ",e)}else switch(e){case 1:t.blendFuncSeparate(770,771,1,771);break;case 2:t.blendFunc(770,1);break;case 3:t.blendFunc(0,769);break;case 4:t.blendFunc(0,768);break;default:console.error("THREE.WebGLState: Invalid blending: ",e)}p=null,m=null,v=null,y=null,h=e,b=l}}else u&&(z(3042),u=!1)}function U(e){x!==e&&(e?t.frontFace(2304):t.frontFace(2305),x=e)}function j(e){0!==e?(D(2884),e!==w&&(1===e?t.cullFace(1029):2===e?t.cullFace(1028):t.cullFace(1032))):z(2884),w=e}function H(e,n,i){e?(D(32823),S===n&&M===i||(t.polygonOffset(n,i),S=n,M=i)):z(32823)}function G(e){void 0===e&&(e=33984+E-1),P!==e&&(t.activeTexture(e),P=e)}return{buffers:{color:o,depth:s,stencil:a},enable:D,disable:z,useProgram:function(e){return c!==e&&(t.useProgram(e),c=e,!0)},setBlending:F,setMaterial:function(t,e){t.side===i?z(2884):D(2884);let n=1===t.side;e&&(n=!n),U(n),1===t.blending&&!1===t.transparent?F(0):F(t.blending,t.blendEquation,t.blendSrc,t.blendDst,t.blendEquationAlpha,t.blendSrcAlpha,t.blendDstAlpha,t.premultipliedAlpha),s.setFunc(t.depthFunc),s.setTest(t.depthTest),s.setMask(t.depthWrite),o.setMask(t.colorWrite);const r=t.stencilWrite;a.setTest(r),r&&(a.setMask(t.stencilWriteMask),a.setFunc(t.stencilFunc,t.stencilRef,t.stencilFuncMask),a.setOp(t.stencilFail,t.stencilZFail,t.stencilZPass)),H(t.polygonOffset,t.polygonOffsetFactor,t.polygonOffsetUnits)},setFlipSided:U,setCullFace:j,setLineWidth:function(e){e!==_&&(T&&t.lineWidth(e),_=e)},setPolygonOffset:H,setScissorTest:function(t){t?D(3089):z(3089)},activeTexture:G,bindTexture:function(e,n){null===P&&G();let i=C[P];void 0===i&&(i={type:void 0,texture:void 0},C[P]=i),i.type===e&&i.texture===n||(t.bindTexture(e,n||N[e]),i.type=e,i.texture=n)},unbindTexture:function(){const e=C[P];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.apply(t,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},texImage2D:function(){try{t.texImage2D.apply(t,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},texImage3D:function(){try{t.texImage3D.apply(t,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},scissor:function(e){!1===R.equals(e)&&(t.scissor(e.x,e.y,e.z,e.w),R.copy(e))},viewport:function(e){!1===O.equals(e)&&(t.viewport(e.x,e.y,e.z,e.w),O.copy(e))},reset:function(){l={},P=null,C={},c=null,h=null,x=null,w=null,o.reset(),s.reset(),a.reset()}}}function qi(t,e,n,i,r,o,s){const l=r.isWebGL2,c=r.maxTextures,u=r.maxCubemapSize,h=r.maxTextureSize,d=r.maxSamples,p=new WeakMap;let f,m=!1;try{m="undefined"!=typeof OffscreenCanvas&&null!==new OffscreenCanvas(1,1).getContext("2d")}catch(t){}function g(t,e){return m?new OffscreenCanvas(t,e):document.createElementNS("http://www.w3.org/1999/xhtml","canvas")}function v(t,e,n,i){let r=1;if((t.width>i||t.height>i)&&(r=i/Math.max(t.width,t.height)),r<1||!0===e){if("undefined"!=typeof HTMLImageElement&&t instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap){const i=e?a.floorPowerOfTwo:Math.floor,o=i(r*t.width),s=i(r*t.height);void 0===f&&(f=g(o,s));const l=n?g(o,s):f;l.width=o,l.height=s;return l.getContext("2d").drawImage(t,0,0,o,s),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+t.width+"x"+t.height+") to ("+o+"x"+s+")."),l}return"data"in t&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+t.width+"x"+t.height+")."),t}return t}function y(t){return a.isPowerOfTwo(t.width)&&a.isPowerOfTwo(t.height)}function b(t,e){return t.generateMipmaps&&e&&1003!==t.minFilter&&1006!==t.minFilter}function x(e,n,r,o){t.generateMipmap(e);i.get(n).__maxMipLevel=Math.log(Math.max(r,o))*Math.LOG2E}function w(n,i,r){if(!1===l)return i;if(null!==n){if(void 0!==t[n])return t[n];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+n+"'")}let o=i;return 6403===i&&(5126===r&&(o=33326),5131===r&&(o=33325),5121===r&&(o=33321)),6407===i&&(5126===r&&(o=34837),5131===r&&(o=34843),5121===r&&(o=32849)),6408===i&&(5126===r&&(o=34836),5131===r&&(o=34842),5121===r&&(o=32856)),33325!==o&&33326!==o&&34842!==o&&34836!==o||e.get("EXT_color_buffer_float"),o}function _(t){return 1003===t||1004===t||1005===t?9728:9729}function S(e){const n=e.target;n.removeEventListener("dispose",S),function(e){const n=i.get(e);if(void 0===n.__webglInit)return;t.deleteTexture(n.__webglTexture),i.remove(e)}(n),n.isVideoTexture&&p.delete(n),s.memory.textures--}function M(e){const n=e.target;n.removeEventListener("dispose",M),function(e){const n=i.get(e),r=i.get(e.texture);if(!e)return;void 0!==r.__webglTexture&&t.deleteTexture(r.__webglTexture);e.depthTexture&&e.depthTexture.dispose();if(e.isWebGLCubeRenderTarget)for(let e=0;e<6;e++)t.deleteFramebuffer(n.__webglFramebuffer[e]),n.__webglDepthbuffer&&t.deleteRenderbuffer(n.__webglDepthbuffer[e]);else t.deleteFramebuffer(n.__webglFramebuffer),n.__webglDepthbuffer&&t.deleteRenderbuffer(n.__webglDepthbuffer),n.__webglMultisampledFramebuffer&&t.deleteFramebuffer(n.__webglMultisampledFramebuffer),n.__webglColorRenderbuffer&&t.deleteRenderbuffer(n.__webglColorRenderbuffer),n.__webglDepthRenderbuffer&&t.deleteRenderbuffer(n.__webglDepthRenderbuffer);i.remove(e.texture),i.remove(e)}(n),s.memory.textures--}let E=0;function T(t,e){const r=i.get(t);if(t.isVideoTexture&&function(t){const e=s.render.frame;p.get(t)!==e&&(p.set(t,e),t.update())}(t),t.version>0&&r.__version!==t.version){const n=t.image;if(void 0===n)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined");else{if(!1!==n.complete)return void O(r,t,e);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete")}}n.activeTexture(33984+e),n.bindTexture(3553,r.__webglTexture)}function A(e,r){const s=i.get(e);e.version>0&&s.__version!==e.version?function(e,i,r){if(6!==i.image.length)return;R(e,i),n.activeTexture(33984+r),n.bindTexture(34067,e.__webglTexture),t.pixelStorei(37440,i.flipY);const s=i&&(i.isCompressedTexture||i.image[0].isCompressedTexture),a=i.image[0]&&i.image[0].isDataTexture,c=[];for(let t=0;t<6;t++)c[t]=s||a?a?i.image[t].image:i.image[t]:v(i.image[t],!1,!0,u);const h=c[0],d=y(h)||l,p=o.convert(i.format),f=o.convert(i.type),m=w(i.internalFormat,p,f);let g;if(C(34067,i,d),s){for(let t=0;t<6;t++){g=c[t].mipmaps;for(let e=0;e<g.length;e++){const r=g[e];1023!==i.format&&1022!==i.format?null!==p?n.compressedTexImage2D(34069+t,e,m,r.width,r.height,0,r.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):n.texImage2D(34069+t,e,m,r.width,r.height,0,p,f,r.data)}}e.__maxMipLevel=g.length-1}else{g=i.mipmaps;for(let t=0;t<6;t++)if(a){n.texImage2D(34069+t,0,m,c[t].width,c[t].height,0,p,f,c[t].data);for(let e=0;e<g.length;e++){const i=g[e].image[t].image;n.texImage2D(34069+t,e+1,m,i.width,i.height,0,p,f,i.data)}}else{n.texImage2D(34069+t,0,m,p,f,c[t]);for(let e=0;e<g.length;e++){const i=g[e];n.texImage2D(34069+t,e+1,m,p,f,i.image[t])}}e.__maxMipLevel=g.length}b(i,d)&&x(34067,i,h.width,h.height);e.__version=i.version,i.onUpdate&&i.onUpdate(i)}(s,e,r):(n.activeTexture(33984+r),n.bindTexture(34067,s.__webglTexture))}const L={1e3:10497,1001:33071,1002:33648},P={1003:9728,1004:9984,1005:9986,1006:9729,1007:9985,1008:9987};function C(n,o,s){s?(t.texParameteri(n,10242,L[o.wrapS]),t.texParameteri(n,10243,L[o.wrapT]),32879!==n&&35866!==n||t.texParameteri(n,32882,L[o.wrapR]),t.texParameteri(n,10240,P[o.magFilter]),t.texParameteri(n,10241,P[o.minFilter])):(t.texParameteri(n,10242,33071),t.texParameteri(n,10243,33071),32879!==n&&35866!==n||t.texParameteri(n,32882,33071),1001===o.wrapS&&1001===o.wrapT||console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),t.texParameteri(n,10240,_(o.magFilter)),t.texParameteri(n,10241,_(o.minFilter)),1003!==o.minFilter&&1006!==o.minFilter&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter."));const a=e.get("EXT_texture_filter_anisotropic");if(a){if(1015===o.type&&null===e.get("OES_texture_float_linear"))return;if(1016===o.type&&null===(l||e.get("OES_texture_half_float_linear")))return;(o.anisotropy>1||i.get(o).__currentAnisotropy)&&(t.texParameterf(n,a.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(o.anisotropy,r.getMaxAnisotropy())),i.get(o).__currentAnisotropy=o.anisotropy)}}function R(e,n){void 0===e.__webglInit&&(e.__webglInit=!0,n.addEventListener("dispose",S),e.__webglTexture=t.createTexture(),s.memory.textures++)}function O(e,i,r){let s=3553;i.isDataTexture2DArray&&(s=35866),i.isDataTexture3D&&(s=32879),R(e,i),n.activeTexture(33984+r),n.bindTexture(s,e.__webglTexture),t.pixelStorei(37440,i.flipY),t.pixelStorei(37441,i.premultiplyAlpha),t.pixelStorei(3317,i.unpackAlignment);const a=function(t){return!l&&(1001!==t.wrapS||1001!==t.wrapT||1003!==t.minFilter&&1006!==t.minFilter)}(i)&&!1===y(i.image),c=v(i.image,a,!1,h),u=y(c)||l,d=o.convert(i.format);let p,f=o.convert(i.type),m=w(i.internalFormat,d,f);C(s,i,u);const g=i.mipmaps;if(i.isDepthTexture)m=6402,l?m=1015===i.type?36012:1014===i.type?33190:1020===i.type?35056:33189:1015===i.type&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),1026===i.format&&6402===m&&1012!==i.type&&1014!==i.type&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),i.type=1012,f=o.convert(i.type)),1027===i.format&&6402===m&&(m=34041,1020!==i.type&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),i.type=1020,f=o.convert(i.type))),n.texImage2D(3553,0,m,c.width,c.height,0,d,f,null);else if(i.isDataTexture)if(g.length>0&&u){for(let t=0,e=g.length;t<e;t++)p=g[t],n.texImage2D(3553,t,m,p.width,p.height,0,d,f,p.data);i.generateMipmaps=!1,e.__maxMipLevel=g.length-1}else n.texImage2D(3553,0,m,c.width,c.height,0,d,f,c.data),e.__maxMipLevel=0;else if(i.isCompressedTexture){for(let t=0,e=g.length;t<e;t++)p=g[t],1023!==i.format&&1022!==i.format?null!==d?n.compressedTexImage2D(3553,t,m,p.width,p.height,0,p.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):n.texImage2D(3553,t,m,p.width,p.height,0,d,f,p.data);e.__maxMipLevel=g.length-1}else if(i.isDataTexture2DArray)n.texImage3D(35866,0,m,c.width,c.height,c.depth,0,d,f,c.data),e.__maxMipLevel=0;else if(i.isDataTexture3D)n.texImage3D(32879,0,m,c.width,c.height,c.depth,0,d,f,c.data),e.__maxMipLevel=0;else if(g.length>0&&u){for(let t=0,e=g.length;t<e;t++)p=g[t],n.texImage2D(3553,t,m,d,f,p);i.generateMipmaps=!1,e.__maxMipLevel=g.length-1}else n.texImage2D(3553,0,m,d,f,c),e.__maxMipLevel=0;b(i,u)&&x(s,i,c.width,c.height),e.__version=i.version,i.onUpdate&&i.onUpdate(i)}function I(e,r,s,a){const l=o.convert(r.texture.format),c=o.convert(r.texture.type),u=w(r.texture.internalFormat,l,c);n.texImage2D(a,0,u,r.width,r.height,0,l,c,null),t.bindFramebuffer(36160,e),t.framebufferTexture2D(36160,s,a,i.get(r.texture).__webglTexture,0),t.bindFramebuffer(36160,null)}function N(e,n,i){if(t.bindRenderbuffer(36161,e),n.depthBuffer&&!n.stencilBuffer){let r=33189;if(i){const e=n.depthTexture;e&&e.isDepthTexture&&(1015===e.type?r=36012:1014===e.type&&(r=33190));const i=z(n);t.renderbufferStorageMultisample(36161,i,r,n.width,n.height)}else t.renderbufferStorage(36161,r,n.width,n.height);t.framebufferRenderbuffer(36160,36096,36161,e)}else if(n.depthBuffer&&n.stencilBuffer){if(i){const e=z(n);t.renderbufferStorageMultisample(36161,e,35056,n.width,n.height)}else t.renderbufferStorage(36161,34041,n.width,n.height);t.framebufferRenderbuffer(36160,33306,36161,e)}else{const e=o.convert(n.texture.format),r=o.convert(n.texture.type),s=w(n.texture.internalFormat,e,r);if(i){const e=z(n);t.renderbufferStorageMultisample(36161,e,s,n.width,n.height)}else t.renderbufferStorage(36161,s,n.width,n.height)}t.bindRenderbuffer(36161,null)}function D(e){const n=i.get(e),r=!0===e.isWebGLCubeRenderTarget;if(e.depthTexture){if(r)throw new Error("target.depthTexture not supported in Cube render targets");!function(e,n){if(n&&n.isWebGLCubeRenderTarget)throw new Error("Depth Texture with cube render targets is not supported");if(t.bindFramebuffer(36160,e),!n.depthTexture||!n.depthTexture.isDepthTexture)throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");i.get(n.depthTexture).__webglTexture&&n.depthTexture.image.width===n.width&&n.depthTexture.image.height===n.height||(n.depthTexture.image.width=n.width,n.depthTexture.image.height=n.height,n.depthTexture.needsUpdate=!0),T(n.depthTexture,0);const r=i.get(n.depthTexture).__webglTexture;if(1026===n.depthTexture.format)t.framebufferTexture2D(36160,36096,3553,r,0);else{if(1027!==n.depthTexture.format)throw new Error("Unknown depthTexture format");t.framebufferTexture2D(36160,33306,3553,r,0)}}(n.__webglFramebuffer,e)}else if(r){n.__webglDepthbuffer=[];for(let i=0;i<6;i++)t.bindFramebuffer(36160,n.__webglFramebuffer[i]),n.__webglDepthbuffer[i]=t.createRenderbuffer(),N(n.__webglDepthbuffer[i],e,!1)}else t.bindFramebuffer(36160,n.__webglFramebuffer),n.__webglDepthbuffer=t.createRenderbuffer(),N(n.__webglDepthbuffer,e,!1);t.bindFramebuffer(36160,null)}function z(t){return l&&t.isWebGLMultisampleRenderTarget?Math.min(d,t.samples):0}let k=!1,B=!1;this.allocateTextureUnit=function(){const t=E;return t>=c&&console.warn("THREE.WebGLTextures: Trying to use "+t+" texture units while this GPU supports only "+c),E+=1,t},this.resetTextureUnits=function(){E=0},this.setTexture2D=T,this.setTexture2DArray=function(t,e){const r=i.get(t);t.version>0&&r.__version!==t.version?O(r,t,e):(n.activeTexture(33984+e),n.bindTexture(35866,r.__webglTexture))},this.setTexture3D=function(t,e){const r=i.get(t);t.version>0&&r.__version!==t.version?O(r,t,e):(n.activeTexture(33984+e),n.bindTexture(32879,r.__webglTexture))},this.setTextureCube=A,this.setupRenderTarget=function(e){const r=i.get(e),a=i.get(e.texture);e.addEventListener("dispose",M),a.__webglTexture=t.createTexture(),s.memory.textures++;const c=!0===e.isWebGLCubeRenderTarget,u=!0===e.isWebGLMultisampleRenderTarget,h=y(e)||l;if(!l||1022!==e.texture.format||1015!==e.texture.type&&1016!==e.texture.type||(e.texture.format=1023,console.warn("THREE.WebGLRenderer: Rendering to textures with RGB format is not supported. Using RGBA format instead.")),c){r.__webglFramebuffer=[];for(let e=0;e<6;e++)r.__webglFramebuffer[e]=t.createFramebuffer()}else if(r.__webglFramebuffer=t.createFramebuffer(),u)if(l){r.__webglMultisampledFramebuffer=t.createFramebuffer(),r.__webglColorRenderbuffer=t.createRenderbuffer(),t.bindRenderbuffer(36161,r.__webglColorRenderbuffer);const n=o.convert(e.texture.format),i=o.convert(e.texture.type),s=w(e.texture.internalFormat,n,i),a=z(e);t.renderbufferStorageMultisample(36161,a,s,e.width,e.height),t.bindFramebuffer(36160,r.__webglMultisampledFramebuffer),t.framebufferRenderbuffer(36160,36064,36161,r.__webglColorRenderbuffer),t.bindRenderbuffer(36161,null),e.depthBuffer&&(r.__webglDepthRenderbuffer=t.createRenderbuffer(),N(r.__webglDepthRenderbuffer,e,!0)),t.bindFramebuffer(36160,null)}else console.warn("THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.");if(c){n.bindTexture(34067,a.__webglTexture),C(34067,e.texture,h);for(let t=0;t<6;t++)I(r.__webglFramebuffer[t],e,36064,34069+t);b(e.texture,h)&&x(34067,e.texture,e.width,e.height),n.bindTexture(34067,null)}else n.bindTexture(3553,a.__webglTexture),C(3553,e.texture,h),I(r.__webglFramebuffer,e,36064,3553),b(e.texture,h)&&x(3553,e.texture,e.width,e.height),n.bindTexture(3553,null);e.depthBuffer&&D(e)},this.updateRenderTargetMipmap=function(t){const e=t.texture;if(b(e,y(t)||l)){const r=t.isWebGLCubeRenderTarget?34067:3553,o=i.get(e).__webglTexture;n.bindTexture(r,o),x(r,e,t.width,t.height),n.bindTexture(r,null)}},this.updateMultisampleRenderTarget=function(e){if(e.isWebGLMultisampleRenderTarget)if(l){const n=i.get(e);t.bindFramebuffer(36008,n.__webglMultisampledFramebuffer),t.bindFramebuffer(36009,n.__webglFramebuffer);const r=e.width,o=e.height;let s=16384;e.depthBuffer&&(s|=256),e.stencilBuffer&&(s|=1024),t.blitFramebuffer(0,0,r,o,0,0,r,o,s,9728),t.bindFramebuffer(36160,n.__webglMultisampledFramebuffer)}else console.warn("THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.")},this.safeSetTexture2D=function(t,e){t&&t.isWebGLRenderTarget&&(!1===k&&(console.warn("THREE.WebGLTextures.safeSetTexture2D: don't use render targets as textures. Use their .texture property instead."),k=!0),t=t.texture),T(t,e)},this.safeSetTextureCube=function(t,e){t&&t.isWebGLCubeRenderTarget&&(!1===B&&(console.warn("THREE.WebGLTextures.safeSetTextureCube: don't use cube render targets as textures. Use their .texture property instead."),B=!0),t=t.texture),A(t,e)}}function Xi(t,e,n){const i=n.isWebGL2;return{convert:function(t){let n;if(1009===t)return 5121;if(1017===t)return 32819;if(1018===t)return 32820;if(1019===t)return 33635;if(1010===t)return 5120;if(1011===t)return 5122;if(1012===t)return 5123;if(1013===t)return 5124;if(1014===t)return 5125;if(1015===t)return 5126;if(1016===t)return i?5131:(n=e.get("OES_texture_half_float"),null!==n?n.HALF_FLOAT_OES:null);if(1021===t)return 6406;if(1022===t)return 6407;if(1023===t)return 6408;if(1024===t)return 6409;if(1025===t)return 6410;if(1026===t)return 6402;if(1027===t)return 34041;if(1028===t)return 6403;if(1029===t)return 36244;if(1030===t)return 33319;if(1031===t)return 33320;if(1032===t)return 36248;if(1033===t)return 36249;if(33776===t||33777===t||33778===t||33779===t){if(n=e.get("WEBGL_compressed_texture_s3tc"),null===n)return null;if(33776===t)return n.COMPRESSED_RGB_S3TC_DXT1_EXT;if(33777===t)return n.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(33778===t)return n.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(33779===t)return n.COMPRESSED_RGBA_S3TC_DXT5_EXT}if(35840===t||35841===t||35842===t||35843===t){if(n=e.get("WEBGL_compressed_texture_pvrtc"),null===n)return null;if(35840===t)return n.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(35841===t)return n.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(35842===t)return n.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(35843===t)return n.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(36196===t)return n=e.get("WEBGL_compressed_texture_etc1"),null!==n?n.COMPRESSED_RGB_ETC1_WEBGL:null;if((37492===t||37496===t)&&(n=e.get("WEBGL_compressed_texture_etc"),null!==n)){if(37492===t)return n.COMPRESSED_RGB8_ETC2;if(37496===t)return n.COMPRESSED_RGBA8_ETC2_EAC}return 37808===t||37809===t||37810===t||37811===t||37812===t||37813===t||37814===t||37815===t||37816===t||37817===t||37818===t||37819===t||37820===t||37821===t||37840===t||37841===t||37842===t||37843===t||37844===t||37845===t||37846===t||37847===t||37848===t||37849===t||37850===t||37851===t||37852===t||37853===t?(n=e.get("WEBGL_compressed_texture_astc"),null!==n?t:null):36492===t?(n=e.get("EXT_texture_compression_bptc"),null!==n?t:null):1020===t?i?34042:(n=e.get("WEBGL_depth_texture"),null!==n?n.UNSIGNED_INT_24_8_WEBGL:null):void 0}}}function Yi(t){Be.call(this),this.cameras=t||[]}function Zi(){vt.call(this),this.type="Group"}function Ji(){this._targetRay=null,this._grip=null,this._hand=null}function Ki(t,e){const n=this;let i=null,r=1,o=null,s="local-floor",a=null;const l=[],c=new Map,u=new Be;u.layers.enable(1),u.viewport=new f;const h=new Be;h.layers.enable(2),h.viewport=new f;const d=[u,h],p=new Yi;p.layers.enable(1),p.layers.enable(2);let m=null,g=null;function v(t){const e=c.get(t.inputSource);e&&e.dispatchEvent({type:t.type,data:t.inputSource})}function b(){c.forEach((function(t,e){t.disconnect(e)})),c.clear(),t.setFramebuffer(null),t.setRenderTarget(t.getRenderTarget()),T.stop(),n.isPresenting=!1,n.dispatchEvent({type:"sessionend"})}function x(t){o=t,T.setContext(i),T.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}function w(t){const e=i.inputSources;for(let t=0;t<l.length;t++)c.set(e[t],l[t]);for(let e=0;e<t.removed.length;e++){const n=t.removed[e],i=c.get(n);i&&(i.dispatchEvent({type:"disconnected",data:n}),c.delete(n))}for(let e=0;e<t.added.length;e++){const n=t.added[e],i=c.get(n);i&&i.dispatchEvent({type:"connected",data:n})}}this.enabled=!1,this.isPresenting=!1,this.getController=function(t){let e=l[t];return void 0===e&&(e=new Ji,l[t]=e),e.getTargetRaySpace()},this.getControllerGrip=function(t){let e=l[t];return void 0===e&&(e=new Ji,l[t]=e),e.getGripSpace()},this.getHand=function(t){let e=l[t];return void 0===e&&(e=new Ji,l[t]=e),e.getHandSpace()},this.setFramebufferScaleFactor=function(t){r=t,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(t){s=t,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return o},this.getSession=function(){return i},this.setSession=function(t){if(i=t,null!==i){i.addEventListener("select",v),i.addEventListener("selectstart",v),i.addEventListener("selectend",v),i.addEventListener("squeeze",v),i.addEventListener("squeezestart",v),i.addEventListener("squeezeend",v),i.addEventListener("end",b);const t=e.getContextAttributes();!0!==t.xrCompatible&&e.makeXRCompatible();const n={antialias:t.antialias,alpha:t.alpha,depth:t.depth,stencil:t.stencil,framebufferScaleFactor:r},o=new XRWebGLLayer(i,e,n);i.updateRenderState({baseLayer:o}),i.requestReferenceSpace(s).then(x),i.addEventListener("inputsourceschange",w)}};const _=new y,S=new y;function M(t,e){null===e?t.matrixWorld.copy(t.matrix):t.matrixWorld.multiplyMatrices(e.matrixWorld,t.matrix),t.matrixWorldInverse.getInverse(t.matrixWorld)}this.getCamera=function(t){p.near=h.near=u.near=t.near,p.far=h.far=u.far=t.far,m===p.near&&g===p.far||(i.updateRenderState({depthNear:p.near,depthFar:p.far}),m=p.near,g=p.far);const e=t.parent,n=p.cameras;M(p,e);for(let t=0;t<n.length;t++)M(n[t],e);t.matrixWorld.copy(p.matrixWorld);const r=t.children;for(let t=0,e=r.length;t<e;t++)r[t].updateMatrixWorld(!0);return 2===n.length?function(t,e,n){_.setFromMatrixPosition(e.matrixWorld),S.setFromMatrixPosition(n.matrixWorld);const i=_.distanceTo(S),r=e.projectionMatrix.elements,o=n.projectionMatrix.elements,s=r[14]/(r[10]-1),a=r[14]/(r[10]+1),l=(r[9]+1)/r[5],c=(r[9]-1)/r[5],u=(r[8]-1)/r[0],h=(o[8]+1)/o[0],d=s*u,p=s*h,f=i/(-u+h),m=f*-u;e.matrixWorld.decompose(t.position,t.quaternion,t.scale),t.translateX(m),t.translateZ(f),t.matrixWorld.compose(t.position,t.quaternion,t.scale),t.matrixWorldInverse.getInverse(t.matrixWorld);const g=s+f,v=a+f,y=d-m,b=p+(i-m),x=l*a/v*g,w=c*a/v*g;t.projectionMatrix.makePerspective(y,b,x,w,g,v)}(p,u,h):p.projectionMatrix.copy(u.projectionMatrix),p};let E=null;const T=new qe;T.setAnimationLoop((function(e,n){if(a=n.getViewerPose(o),null!==a){const e=a.views,n=i.renderState.baseLayer;t.setFramebuffer(n.framebuffer);let r=!1;e.length!==p.cameras.length&&(p.cameras.length=0,r=!0);for(let t=0;t<e.length;t++){const i=e[t],o=n.getViewport(i),s=d[t];s.matrix.fromArray(i.transform.matrix),s.projectionMatrix.fromArray(i.projectionMatrix),s.viewport.set(o.x,o.y,o.width,o.height),0===t&&p.matrix.copy(s.matrix),!0===r&&p.cameras.push(s)}}const r=i.inputSources;for(let t=0;t<l.length;t++){const e=l[t],i=r[t];e.update(i,n,o)}E&&E(e,n)})),this.setAnimationLoop=function(t){E=t},this.dispose=function(){}}function $i(t){function e(e,n){e.opacity.value=n.opacity,n.color&&e.diffuse.value.copy(n.color),n.emissive&&e.emissive.value.copy(n.emissive).multiplyScalar(n.emissiveIntensity),n.map&&(e.map.value=n.map),n.alphaMap&&(e.alphaMap.value=n.alphaMap),n.specularMap&&(e.specularMap.value=n.specularMap);const i=t.get(n).envMap;if(i){e.envMap.value=i,e.flipEnvMap.value=i.isCubeTexture&&i._needsFlipEnvMap?-1:1,e.reflectivity.value=n.reflectivity,e.refractionRatio.value=n.refractionRatio;const r=t.get(i).__maxMipLevel;void 0!==r&&(e.maxMipLevel.value=r)}let r,o;n.lightMap&&(e.lightMap.value=n.lightMap,e.lightMapIntensity.value=n.lightMapIntensity),n.aoMap&&(e.aoMap.value=n.aoMap,e.aoMapIntensity.value=n.aoMapIntensity),n.map?r=n.map:n.specularMap?r=n.specularMap:n.displacementMap?r=n.displacementMap:n.normalMap?r=n.normalMap:n.bumpMap?r=n.bumpMap:n.roughnessMap?r=n.roughnessMap:n.metalnessMap?r=n.metalnessMap:n.alphaMap?r=n.alphaMap:n.emissiveMap?r=n.emissiveMap:n.clearcoatMap?r=n.clearcoatMap:n.clearcoatNormalMap?r=n.clearcoatNormalMap:n.clearcoatRoughnessMap&&(r=n.clearcoatRoughnessMap),void 0!==r&&(r.isWebGLRenderTarget&&(r=r.texture),!0===r.matrixAutoUpdate&&r.updateMatrix(),e.uvTransform.value.copy(r.matrix)),n.aoMap?o=n.aoMap:n.lightMap&&(o=n.lightMap),void 0!==o&&(o.isWebGLRenderTarget&&(o=o.texture),!0===o.matrixAutoUpdate&&o.updateMatrix(),e.uv2Transform.value.copy(o.matrix))}function n(e,n){e.roughness.value=n.roughness,e.metalness.value=n.metalness,n.roughnessMap&&(e.roughnessMap.value=n.roughnessMap),n.metalnessMap&&(e.metalnessMap.value=n.metalnessMap),n.emissiveMap&&(e.emissiveMap.value=n.emissiveMap),n.bumpMap&&(e.bumpMap.value=n.bumpMap,e.bumpScale.value=n.bumpScale,1===n.side&&(e.bumpScale.value*=-1)),n.normalMap&&(e.normalMap.value=n.normalMap,e.normalScale.value.copy(n.normalScale),1===n.side&&e.normalScale.value.negate()),n.displacementMap&&(e.displacementMap.value=n.displacementMap,e.displacementScale.value=n.displacementScale,e.displacementBias.value=n.displacementBias);t.get(n).envMap&&(e.envMapIntensity.value=n.envMapIntensity)}return{refreshFogUniforms:function(t,e){t.fogColor.value.copy(e.color),e.isFog?(t.fogNear.value=e.near,t.fogFar.value=e.far):e.isFogExp2&&(t.fogDensity.value=e.density)},refreshMaterialUniforms:function(t,i,r,o){i.isMeshBasicMaterial?e(t,i):i.isMeshLambertMaterial?(e(t,i),function(t,e){e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap)}(t,i)):i.isMeshToonMaterial?(e(t,i),function(t,e){e.gradientMap&&(t.gradientMap.value=e.gradientMap);e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap);e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale,1===e.side&&(t.bumpScale.value*=-1));e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale),1===e.side&&t.normalScale.value.negate());e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}(t,i)):i.isMeshPhongMaterial?(e(t,i),function(t,e){t.specular.value.copy(e.specular),t.shininess.value=Math.max(e.shininess,1e-4),e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap);e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale,1===e.side&&(t.bumpScale.value*=-1));e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale),1===e.side&&t.normalScale.value.negate());e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}(t,i)):i.isMeshStandardMaterial?(e(t,i),i.isMeshPhysicalMaterial?function(t,e){n(t,e),t.reflectivity.value=e.reflectivity,t.clearcoat.value=e.clearcoat,t.clearcoatRoughness.value=e.clearcoatRoughness,e.sheen&&t.sheen.value.copy(e.sheen);e.clearcoatMap&&(t.clearcoatMap.value=e.clearcoatMap);e.clearcoatRoughnessMap&&(t.clearcoatRoughnessMap.value=e.clearcoatRoughnessMap);e.clearcoatNormalMap&&(t.clearcoatNormalScale.value.copy(e.clearcoatNormalScale),t.clearcoatNormalMap.value=e.clearcoatNormalMap,1===e.side&&t.clearcoatNormalScale.value.negate());t.transmission.value=e.transmission,e.transmissionMap&&(t.transmissionMap.value=e.transmissionMap)}(t,i):n(t,i)):i.isMeshMatcapMaterial?(e(t,i),function(t,e){e.matcap&&(t.matcap.value=e.matcap);e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale,1===e.side&&(t.bumpScale.value*=-1));e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale),1===e.side&&t.normalScale.value.negate());e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}(t,i)):i.isMeshDepthMaterial?(e(t,i),function(t,e){e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}(t,i)):i.isMeshDistanceMaterial?(e(t,i),function(t,e){e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias);t.referencePosition.value.copy(e.referencePosition),t.nearDistance.value=e.nearDistance,t.farDistance.value=e.farDistance}(t,i)):i.isMeshNormalMaterial?(e(t,i),function(t,e){e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale,1===e.side&&(t.bumpScale.value*=-1));e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale),1===e.side&&t.normalScale.value.negate());e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}(t,i)):i.isLineBasicMaterial?(function(t,e){t.diffuse.value.copy(e.color),t.opacity.value=e.opacity}(t,i),i.isLineDashedMaterial&&function(t,e){t.dashSize.value=e.dashSize,t.totalSize.value=e.dashSize+e.gapSize,t.scale.value=e.scale}(t,i)):i.isPointsMaterial?function(t,e,n,i){t.diffuse.value.copy(e.color),t.opacity.value=e.opacity,t.size.value=e.size*n,t.scale.value=.5*i,e.map&&(t.map.value=e.map);e.alphaMap&&(t.alphaMap.value=e.alphaMap);let r;e.map?r=e.map:e.alphaMap&&(r=e.alphaMap);void 0!==r&&(!0===r.matrixAutoUpdate&&r.updateMatrix(),t.uvTransform.value.copy(r.matrix))}(t,i,r,o):i.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);e.alphaMap&&(t.alphaMap.value=e.alphaMap);let n;e.map?n=e.map:e.alphaMap&&(n=e.alphaMap);void 0!==n&&(!0===n.matrixAutoUpdate&&n.updateMatrix(),t.uvTransform.value.copy(n.matrix))}(t,i):i.isShadowMaterial?(t.color.value.copy(i.color),t.opacity.value=i.opacity):i.isShaderMaterial&&(i.uniformsNeedUpdate=!1)}}}function Qi(t){const e=void 0!==(t=t||{}).canvas?t.canvas:document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),n=void 0!==t.context?t.context:null,i=void 0!==t.alpha&&t.alpha,r=void 0===t.depth||t.depth,o=void 0===t.stencil||t.stencil,s=void 0!==t.antialias&&t.antialias,c=void 0===t.premultipliedAlpha||t.premultipliedAlpha,u=void 0!==t.preserveDrawingBuffer&&t.preserveDrawingBuffer,h=void 0!==t.powerPreference?t.powerPreference:"default",d=void 0!==t.failIfMajorPerformanceCaveat&&t.failIfMajorPerformanceCaveat;let p=null,m=null;this.domElement=e,this.debug={checkShaderErrors:!0},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.gammaFactor=2,this.outputEncoding=3e3,this.physicallyCorrectLights=!1,this.toneMapping=0,this.toneMappingExposure=1,this.maxMorphTargets=8,this.maxMorphNormals=4;const g=this;let v=!1,b=null,x=0,w=0,_=null,S=null,M=-1,E=null,T=null;const A=new f,L=new f;let P=null,C=e.width,R=e.height,O=1,I=null,N=null;const D=new f(0,0,C,R),z=new f(0,0,C,R);let k=!1;const B=new We;let F=!1,U=!1;const j=new q,H=new y,G={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function V(){return null===_?O:1}let W,X,Y,Z,J,K,$,Q,tt,et,nt,it,rt,ot,st,at,lt,ct,ut,ht,dt,pt=n;function ft(t,n){for(let i=0;i<t.length;i++){const r=t[i],o=e.getContext(r,n);if(null!==o)return o}return null}try{const t={alpha:i,depth:r,stencil:o,antialias:s,premultipliedAlpha:c,preserveDrawingBuffer:u,powerPreference:h,failIfMajorPerformanceCaveat:d};if(e.addEventListener("webglcontextlost",yt,!1),e.addEventListener("webglcontextrestored",bt,!1),null===pt){const e=["webgl2","webgl","experimental-webgl"];if(!0===g.isWebGL1Renderer&&e.shift(),pt=ft(e,t),null===pt)throw ft(e)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}void 0===pt.getShaderPrecisionFormat&&(pt.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(t){throw console.error("THREE.WebGLRenderer: "+t.message),t}function mt(){W=new on(pt),X=new en(pt,W,t),!1===X.isWebGL2&&(W.get("WEBGL_depth_texture"),W.get("OES_texture_float"),W.get("OES_texture_half_float"),W.get("OES_texture_half_float_linear"),W.get("OES_standard_derivatives"),W.get("OES_element_index_uint"),W.get("OES_vertex_array_object"),W.get("ANGLE_instanced_arrays")),W.get("OES_texture_float_linear"),ht=new Xi(pt,W,X),Y=new Wi(pt,W,X),Y.scissor(L.copy(z).multiplyScalar(O).floor()),Y.viewport(A.copy(D).multiplyScalar(O).floor()),Z=new ln(pt),J=new Ri,K=new qi(pt,W,Y,J,X,ht,Z),$=new rn(g),Q=new Xe(pt,X),dt=new Qe(pt,W,Q,X),tt=new sn(pt,Q,Z,dt),et=new dn(pt,tt,Q,Z),lt=new hn(pt),st=new nn(J),nt=new Ci(g,$,W,X,dt,st),it=new $i(J),rt=new Di(J),ot=new ji(W,X),at=new $e(g,$,Y,et,c),ct=new tn(pt,W,Z,X),ut=new an(pt,W,Z,X),Z.programs=nt.programs,g.capabilities=X,g.extensions=W,g.properties=J,g.renderLists=rt,g.state=Y,g.info=Z}mt();const gt=new Ki(g,pt);this.xr=gt;const vt=new Vi(g,et,X.maxTextureSize);function yt(t){t.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),v=!0}function bt(){console.log("THREE.WebGLRenderer: Context Restored."),v=!1,mt()}function xt(t){const e=t.target;e.removeEventListener("dispose",xt),function(t){wt(t),J.remove(t)}(e)}function wt(t){const e=J.get(t).program;void 0!==e&&nt.releaseProgram(e)}this.shadowMap=vt,this.getContext=function(){return pt},this.getContextAttributes=function(){return pt.getContextAttributes()},this.forceContextLoss=function(){const t=W.get("WEBGL_lose_context");t&&t.loseContext()},this.forceContextRestore=function(){const t=W.get("WEBGL_lose_context");t&&t.restoreContext()},this.getPixelRatio=function(){return O},this.setPixelRatio=function(t){void 0!==t&&(O=t,this.setSize(C,R,!1))},this.getSize=function(t){return void 0===t&&(console.warn("WebGLRenderer: .getsize() now requires a Vector2 as an argument"),t=new l),t.set(C,R)},this.setSize=function(t,n,i){gt.isPresenting?console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting."):(C=t,R=n,e.width=Math.floor(t*O),e.height=Math.floor(n*O),!1!==i&&(e.style.width=t+"px",e.style.height=n+"px"),this.setViewport(0,0,t,n))},this.getDrawingBufferSize=function(t){return void 0===t&&(console.warn("WebGLRenderer: .getdrawingBufferSize() now requires a Vector2 as an argument"),t=new l),t.set(C*O,R*O).floor()},this.setDrawingBufferSize=function(t,n,i){C=t,R=n,O=i,e.width=Math.floor(t*i),e.height=Math.floor(n*i),this.setViewport(0,0,t,n)},this.getCurrentViewport=function(t){return void 0===t&&(console.warn("WebGLRenderer: .getCurrentViewport() now requires a Vector4 as an argument"),t=new f),t.copy(A)},this.getViewport=function(t){return t.copy(D)},this.setViewport=function(t,e,n,i){t.isVector4?D.set(t.x,t.y,t.z,t.w):D.set(t,e,n,i),Y.viewport(A.copy(D).multiplyScalar(O).floor())},this.getScissor=function(t){return t.copy(z)},this.setScissor=function(t,e,n,i){t.isVector4?z.set(t.x,t.y,t.z,t.w):z.set(t,e,n,i),Y.scissor(L.copy(z).multiplyScalar(O).floor())},this.getScissorTest=function(){return k},this.setScissorTest=function(t){Y.setScissorTest(k=t)},this.setOpaqueSort=function(t){I=t},this.setTransparentSort=function(t){N=t},this.getClearColor=function(){return at.getClearColor()},this.setClearColor=function(){at.setClearColor.apply(at,arguments)},this.getClearAlpha=function(){return at.getClearAlpha()},this.setClearAlpha=function(){at.setClearAlpha.apply(at,arguments)},this.clear=function(t,e,n){let i=0;(void 0===t||t)&&(i|=16384),(void 0===e||e)&&(i|=256),(void 0===n||n)&&(i|=1024),pt.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",yt,!1),e.removeEventListener("webglcontextrestored",bt,!1),rt.dispose(),ot.dispose(),J.dispose(),$.dispose(),et.dispose(),dt.dispose(),gt.dispose(),St.stop()},this.renderBufferImmediate=function(t,e){dt.initAttributes();const n=J.get(t);t.hasPositions&&!n.position&&(n.position=pt.createBuffer()),t.hasNormals&&!n.normal&&(n.normal=pt.createBuffer()),t.hasUvs&&!n.uv&&(n.uv=pt.createBuffer()),t.hasColors&&!n.color&&(n.color=pt.createBuffer());const i=e.getAttributes();t.hasPositions&&(pt.bindBuffer(34962,n.position),pt.bufferData(34962,t.positionArray,35048),dt.enableAttribute(i.position),pt.vertexAttribPointer(i.position,3,5126,!1,0,0)),t.hasNormals&&(pt.bindBuffer(34962,n.normal),pt.bufferData(34962,t.normalArray,35048),dt.enableAttribute(i.normal),pt.vertexAttribPointer(i.normal,3,5126,!1,0,0)),t.hasUvs&&(pt.bindBuffer(34962,n.uv),pt.bufferData(34962,t.uvArray,35048),dt.enableAttribute(i.uv),pt.vertexAttribPointer(i.uv,2,5126,!1,0,0)),t.hasColors&&(pt.bindBuffer(34962,n.color),pt.bufferData(34962,t.colorArray,35048),dt.enableAttribute(i.color),pt.vertexAttribPointer(i.color,3,5126,!1,0,0)),dt.disableUnusedAttributes(),pt.drawArrays(4,0,t.count),t.count=0},this.renderBufferDirect=function(t,e,n,i,r,o){null===e&&(e=G);const s=r.isMesh&&r.matrixWorld.determinant()<0,a=Lt(t,e,i,r);Y.setMaterial(i,s);let l=n.index;const c=n.attributes.position;if(null===l){if(void 0===c||0===c.count)return}else if(0===l.count)return;let u,h=1;!0===i.wireframe&&(l=tt.getWireframeAttribute(n),h=2),(i.morphTargets||i.morphNormals)&&lt.update(r,n,i,a),dt.setup(r,i,a,n,l);let d=ct;null!==l&&(u=Q.get(l),d=ut,d.setIndex(u));const p=null!==l?l.count:c.count,f=n.drawRange.start*h,m=n.drawRange.count*h,g=null!==o?o.start*h:0,v=null!==o?o.count*h:1/0,y=Math.max(f,g),b=Math.min(p,f+m,g+v)-1,x=Math.max(0,b-y+1);if(0!==x){if(r.isMesh)!0===i.wireframe?(Y.setLineWidth(i.wireframeLinewidth*V()),d.setMode(1)):d.setMode(4);else if(r.isLine){let t=i.linewidth;void 0===t&&(t=1),Y.setLineWidth(t*V()),r.isLineSegments?d.setMode(1):r.isLineLoop?d.setMode(2):d.setMode(3)}else r.isPoints?d.setMode(0):r.isSprite&&d.setMode(4);if(r.isInstancedMesh)d.renderInstances(y,x,r.count);else if(n.isInstancedBufferGeometry){const t=Math.min(n.instanceCount,n._maxInstanceCount);d.renderInstances(y,x,t)}else d.render(y,x)}},this.compile=function(t,e){m=ot.get(t,e),m.init(),t.traverseVisible((function(t){t.isLight&&t.layers.test(e.layers)&&(m.pushLight(t),t.castShadow&&m.pushShadow(t))})),m.setupLights(e);const n=new WeakMap;t.traverse((function(e){const i=e.material;if(i)if(Array.isArray(i))for(let r=0;r<i.length;r++){const o=i[r];!1===n.has(o)&&(At(o,t,e),n.set(o))}else!1===n.has(i)&&(At(i,t,e),n.set(i))}))};let _t=null;const St=new qe;function Mt(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)m.pushLight(t),t.castShadow&&m.pushShadow(t);else if(t.isSprite){if(!t.frustumCulled||B.intersectsSprite(t)){i&&H.setFromMatrixPosition(t.matrixWorld).applyMatrix4(j);const e=et.update(t),r=t.material;r.visible&&p.push(t,e,r,n,H.z,null)}}else if(t.isImmediateRenderObject)i&&H.setFromMatrixPosition(t.matrixWorld).applyMatrix4(j),p.push(t,null,t.material,n,H.z,null);else if((t.isMesh||t.isLine||t.isPoints)&&(t.isSkinnedMesh&&t.skeleton.frame!==Z.render.frame&&(t.skeleton.update(),t.skeleton.frame=Z.render.frame),!t.frustumCulled||B.intersectsObject(t))){i&&H.setFromMatrixPosition(t.matrixWorld).applyMatrix4(j);const e=et.update(t),r=t.material;if(Array.isArray(r)){const i=e.groups;for(let o=0,s=i.length;o<s;o++){const s=i[o],a=r[s.materialIndex];a&&a.visible&&p.push(t,e,a,n,H.z,s)}}else r.visible&&p.push(t,e,r,n,H.z,null)}const r=t.children;for(let t=0,o=r.length;t<o;t++)Mt(r[t],e,n,i)}function Et(t,e,n){const i=!0===e.isScene?e.overrideMaterial:null;for(let r=0,o=t.length;r<o;r++){const o=t[r],s=o.object,a=o.geometry,l=null===i?o.material:i,c=o.group;if(n.isArrayCamera){T=n;const t=n.cameras;for(let n=0,i=t.length;n<i;n++){const i=t[n];s.layers.test(i.layers)&&(Y.viewport(A.copy(i.viewport)),m.setupLights(i),Tt(s,e,i,a,l,c))}}else T=null,Tt(s,e,n,a,l,c)}}function Tt(t,e,n,i,r,o){if(t.onBeforeRender(g,e,n,i,r,o),m=ot.get(e,T||n),t.modelViewMatrix.multiplyMatrices(n.matrixWorldInverse,t.matrixWorld),t.normalMatrix.getNormalMatrix(t.modelViewMatrix),t.isImmediateRenderObject){const i=Lt(n,e,r,t);Y.setMaterial(r),dt.reset(),function(t,e){t.render((function(t){g.renderBufferImmediate(t,e)}))}(t,i)}else g.renderBufferDirect(n,e,i,r,t,o);t.onAfterRender(g,e,n,i,r,o),m=ot.get(e,T||n)}function At(t,e,n){!0!==e.isScene&&(e=G);const i=J.get(t),r=m.state.lights,o=m.state.shadowsArray,s=r.state.version,a=nt.getParameters(t,r.state,o,e,n),l=nt.getProgramCacheKey(a);let c=i.program,u=!0;if(void 0===c)t.addEventListener("dispose",xt);else if(c.cacheKey!==l)wt(t);else if(i.lightsStateVersion!==s)u=!1;else{if(void 0!==a.shaderID){const n=t.isMeshStandardMaterial?e.environment:null;return void(i.envMap=$.get(t.envMap||n))}u=!1}u&&(a.uniforms=nt.getUniforms(t),t.onBeforeCompile(a,g),c=nt.acquireProgram(a,l),i.program=c,i.uniforms=a.uniforms,i.outputEncoding=a.outputEncoding);const h=i.uniforms;(t.isShaderMaterial||t.isRawShaderMaterial)&&!0!==t.clipping||(i.numClippingPlanes=st.numPlanes,i.numIntersection=st.numIntersection,h.clippingPlanes=st.uniform),i.environment=t.isMeshStandardMaterial?e.environment:null,i.fog=e.fog,i.envMap=$.get(t.envMap||i.environment),i.needsLights=function(t){return t.isMeshLambertMaterial||t.isMeshToonMaterial||t.isMeshPhongMaterial||t.isMeshStandardMaterial||t.isShadowMaterial||t.isShaderMaterial&&!0===t.lights}(t),i.lightsStateVersion=s,i.needsLights&&(h.ambientLightColor.value=r.state.ambient,h.lightProbe.value=r.state.probe,h.directionalLights.value=r.state.directional,h.directionalLightShadows.value=r.state.directionalShadow,h.spotLights.value=r.state.spot,h.spotLightShadows.value=r.state.spotShadow,h.rectAreaLights.value=r.state.rectArea,h.ltc_1.value=r.state.rectAreaLTC1,h.ltc_2.value=r.state.rectAreaLTC2,h.pointLights.value=r.state.point,h.pointLightShadows.value=r.state.pointShadow,h.hemisphereLights.value=r.state.hemi,h.directionalShadowMap.value=r.state.directionalShadowMap,h.directionalShadowMatrix.value=r.state.directionalShadowMatrix,h.spotShadowMap.value=r.state.spotShadowMap,h.spotShadowMatrix.value=r.state.spotShadowMatrix,h.pointShadowMap.value=r.state.pointShadowMap,h.pointShadowMatrix.value=r.state.pointShadowMatrix);const d=i.program.getUniforms(),p=ci.seqWithValue(d.seq,h);i.uniformsList=p}function Lt(t,e,n,i){!0!==e.isScene&&(e=G),K.resetTextureUnits();const r=e.fog,o=n.isMeshStandardMaterial?e.environment:null,s=null===_?g.outputEncoding:_.texture.encoding,l=$.get(n.envMap||o),c=J.get(n),u=m.state.lights;if(!0===F&&(!0===U||t!==E)){const e=t===E&&n.id===M;st.setState(n,t,e)}n.version===c.__version?n.fog&&c.fog!==r||c.environment!==o||c.needsLights&&c.lightsStateVersion!==u.state.version?At(n,e,i):void 0===c.numClippingPlanes||c.numClippingPlanes===st.numPlanes&&c.numIntersection===st.numIntersection?(c.outputEncoding!==s||c.envMap!==l)&&At(n,e,i):At(n,e,i):(At(n,e,i),c.__version=n.version);let h=!1,d=!1,p=!1;const f=c.program,v=f.getUniforms(),y=c.uniforms;if(Y.useProgram(f.program)&&(h=!0,d=!0,p=!0),n.id!==M&&(M=n.id,d=!0),h||E!==t){if(v.setValue(pt,"projectionMatrix",t.projectionMatrix),X.logarithmicDepthBuffer&&v.setValue(pt,"logDepthBufFC",2/(Math.log(t.far+1)/Math.LN2)),E!==t&&(E=t,d=!0,p=!0),n.isShaderMaterial||n.isMeshPhongMaterial||n.isMeshToonMaterial||n.isMeshStandardMaterial||n.envMap){const e=v.map.cameraPosition;void 0!==e&&e.setValue(pt,H.setFromMatrixPosition(t.matrixWorld))}(n.isMeshPhongMaterial||n.isMeshToonMaterial||n.isMeshLambertMaterial||n.isMeshBasicMaterial||n.isMeshStandardMaterial||n.isShaderMaterial)&&v.setValue(pt,"isOrthographic",!0===t.isOrthographicCamera),(n.isMeshPhongMaterial||n.isMeshToonMaterial||n.isMeshLambertMaterial||n.isMeshBasicMaterial||n.isMeshStandardMaterial||n.isShaderMaterial||n.isShadowMaterial||n.skinning)&&v.setValue(pt,"viewMatrix",t.matrixWorldInverse)}if(n.skinning){v.setOptional(pt,i,"bindMatrix"),v.setOptional(pt,i,"bindMatrixInverse");const t=i.skeleton;if(t){const e=t.bones;if(X.floatVertexTextures){if(void 0===t.boneTexture){let n=Math.sqrt(4*e.length);n=a.ceilPowerOfTwo(n),n=Math.max(n,4);const i=new Float32Array(n*n*4);i.set(t.boneMatrices);const r=new He(i,n,n,1023,1015);t.boneMatrices=i,t.boneTexture=r,t.boneTextureSize=n}v.setValue(pt,"boneTexture",t.boneTexture,K),v.setValue(pt,"boneTextureSize",t.boneTextureSize)}else v.setOptional(pt,t,"boneMatrices")}}var b,x;return(d||c.receiveShadow!==i.receiveShadow)&&(c.receiveShadow=i.receiveShadow,v.setValue(pt,"receiveShadow",i.receiveShadow)),d&&(v.setValue(pt,"toneMappingExposure",g.toneMappingExposure),c.needsLights&&(x=p,(b=y).ambientLightColor.needsUpdate=x,b.lightProbe.needsUpdate=x,b.directionalLights.needsUpdate=x,b.directionalLightShadows.needsUpdate=x,b.pointLights.needsUpdate=x,b.pointLightShadows.needsUpdate=x,b.spotLights.needsUpdate=x,b.spotLightShadows.needsUpdate=x,b.rectAreaLights.needsUpdate=x,b.hemisphereLights.needsUpdate=x),r&&n.fog&&it.refreshFogUniforms(y,r),it.refreshMaterialUniforms(y,n,O,R),ci.upload(pt,c.uniformsList,y,K)),n.isShaderMaterial&&!0===n.uniformsNeedUpdate&&(ci.upload(pt,c.uniformsList,y,K),n.uniformsNeedUpdate=!1),n.isSpriteMaterial&&v.setValue(pt,"center",i.center),v.setValue(pt,"modelViewMatrix",i.modelViewMatrix),v.setValue(pt,"normalMatrix",i.normalMatrix),v.setValue(pt,"modelMatrix",i.matrixWorld),f}St.setAnimationLoop((function(t){gt.isPresenting||_t&&_t(t)})),"undefined"!=typeof window&&St.setContext(window),this.setAnimationLoop=function(t){_t=t,gt.setAnimationLoop(t),null===t?St.stop():St.start()},this.render=function(t,e){let n,i;if(void 0!==arguments[2]&&(console.warn("THREE.WebGLRenderer.render(): the renderTarget argument has been removed. Use .setRenderTarget() instead."),n=arguments[2]),void 0!==arguments[3]&&(console.warn("THREE.WebGLRenderer.render(): the forceClear argument has been removed. Use .clear() instead."),i=arguments[3]),void 0!==e&&!0!==e.isCamera)return void console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");if(!0===v)return;dt.resetDefaultState(),M=-1,E=null,!0===t.autoUpdate&&t.updateMatrixWorld(),null===e.parent&&e.updateMatrixWorld(),!0===gt.enabled&&!0===gt.isPresenting&&(e=gt.getCamera(e)),!0===t.isScene&&t.onBeforeRender(g,t,e,n||_),m=ot.get(t,e),m.init(),j.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),B.setFromProjectionMatrix(j),U=this.localClippingEnabled,F=st.init(this.clippingPlanes,U,e),p=rt.get(t,e),p.init(),Mt(t,e,0,g.sortObjects),p.finish(),!0===g.sortObjects&&p.sort(I,N),!0===F&&st.beginShadows();const r=m.state.shadowsArray;vt.render(r,t,e),m.setupLights(e),!0===F&&st.endShadows(),!0===this.info.autoReset&&this.info.reset(),void 0!==n&&this.setRenderTarget(n),at.render(p,t,e,i);const o=p.opaque,s=p.transparent;o.length>0&&Et(o,t,e),s.length>0&&Et(s,t,e),!0===t.isScene&&t.onAfterRender(g,t,e),null!==_&&(K.updateRenderTargetMipmap(_),K.updateMultisampleRenderTarget(_)),Y.buffers.depth.setTest(!0),Y.buffers.depth.setMask(!0),Y.buffers.color.setMask(!0),Y.setPolygonOffset(!1),p=null,m=null},this.setFramebuffer=function(t){b!==t&&null===_&&pt.bindFramebuffer(36160,t),b=t},this.getActiveCubeFace=function(){return x},this.getActiveMipmapLevel=function(){return w},this.getRenderList=function(){return p},this.setRenderList=function(t){p=t},this.getRenderState=function(){return m},this.setRenderState=function(t){m=t},this.getRenderTarget=function(){return _},this.setRenderTarget=function(t,e=0,n=0){_=t,x=e,w=n,t&&void 0===J.get(t).__webglFramebuffer&&K.setupRenderTarget(t);let i=b,r=!1;if(t){const n=J.get(t).__webglFramebuffer;t.isWebGLCubeRenderTarget?(i=n[e],r=!0):i=t.isWebGLMultisampleRenderTarget?J.get(t).__webglMultisampledFramebuffer:n,A.copy(t.viewport),L.copy(t.scissor),P=t.scissorTest}else A.copy(D).multiplyScalar(O).floor(),L.copy(z).multiplyScalar(O).floor(),P=k;if(S!==i&&(pt.bindFramebuffer(36160,i),S=i),Y.viewport(A),Y.scissor(L),Y.setScissorTest(P),r){const i=J.get(t.texture);pt.framebufferTexture2D(36160,36064,34069+e,i.__webglTexture,n)}},this.readRenderTargetPixels=function(t,e,n,i,r,o,s){if(!t||!t.isWebGLRenderTarget)return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let a=J.get(t).__webglFramebuffer;if(t.isWebGLCubeRenderTarget&&void 0!==s&&(a=a[s]),a){let s=!1;a!==S&&(pt.bindFramebuffer(36160,a),s=!0);try{const a=t.texture,l=a.format,c=a.type;if(1023!==l&&ht.convert(l)!==pt.getParameter(35739))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");if(!(1009===c||ht.convert(c)===pt.getParameter(35738)||1015===c&&(X.isWebGL2||W.get("OES_texture_float")||W.get("WEBGL_color_buffer_float"))||1016===c&&(X.isWebGL2?W.get("EXT_color_buffer_float"):W.get("EXT_color_buffer_half_float"))))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");36053===pt.checkFramebufferStatus(36160)?e>=0&&e<=t.width-i&&n>=0&&n<=t.height-r&&pt.readPixels(e,n,i,r,ht.convert(l),ht.convert(c),o):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.")}finally{s&&pt.bindFramebuffer(36160,S)}}},this.copyFramebufferToTexture=function(t,e,n){void 0===n&&(n=0);const i=Math.pow(2,-n),r=Math.floor(e.image.width*i),o=Math.floor(e.image.height*i),s=ht.convert(e.format);K.setTexture2D(e,0),pt.copyTexImage2D(3553,n,s,t.x,t.y,r,o,0),Y.unbindTexture()},this.copyTextureToTexture=function(t,e,n,i){void 0===i&&(i=0);const r=e.image.width,o=e.image.height,s=ht.convert(n.format),a=ht.convert(n.type);K.setTexture2D(n,0),pt.pixelStorei(37440,n.flipY),pt.pixelStorei(37441,n.premultiplyAlpha),pt.pixelStorei(3317,n.unpackAlignment),e.isDataTexture?pt.texSubImage2D(3553,i,t.x,t.y,r,o,s,a,e.image.data):e.isCompressedTexture?pt.compressedTexSubImage2D(3553,i,t.x,t.y,e.mipmaps[0].width,e.mipmaps[0].height,s,e.mipmaps[0].data):pt.texSubImage2D(3553,i,t.x,t.y,s,a,e.image),0===i&&n.generateMipmaps&&pt.generateMipmap(3553),Y.unbindTexture()},this.initTexture=function(t){K.setTexture2D(t,0),Y.unbindTexture()},"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}function tr(t){Qi.call(this,t)}Yi.prototype=Object.assign(Object.create(Be.prototype),{constructor:Yi,isArrayCamera:!0}),Zi.prototype=Object.assign(Object.create(vt.prototype),{constructor:Zi,isGroup:!0}),Object.assign(Ji.prototype,{constructor:Ji,getHandSpace:function(){if(null===this._hand&&(this._hand=new Zi,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints=[],this._hand.inputState={pinching:!1},window.XRHand))for(let t=0;t<=window.XRHand.LITTLE_PHALANX_TIP;t++){const t=new Zi;t.matrixAutoUpdate=!1,t.visible=!1,this._hand.joints.push(t),this._hand.add(t)}return this._hand},getTargetRaySpace:function(){return null===this._targetRay&&(this._targetRay=new Zi,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1),this._targetRay},getGripSpace:function(){return null===this._grip&&(this._grip=new Zi,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1),this._grip},dispatchEvent:function(t){return null!==this._targetRay&&this._targetRay.dispatchEvent(t),null!==this._grip&&this._grip.dispatchEvent(t),null!==this._hand&&this._hand.dispatchEvent(t),this},disconnect:function(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:function(t,e,n){let i=null,r=null,o=null;const s=this._targetRay,a=this._grip,l=this._hand;if(t)if(l&&t.hand){o=!0;for(let i=0;i<=window.XRHand.LITTLE_PHALANX_TIP;i++)if(t.hand[i]){const r=e.getJointPose(t.hand[i],n),o=l.joints[i];null!==r&&(o.matrix.fromArray(r.transform.matrix),o.matrix.decompose(o.position,o.rotation,o.scale),o.jointRadius=r.radius),o.visible=null!==r;const s=l.joints[window.XRHand.INDEX_PHALANX_TIP],a=l.joints[window.XRHand.THUMB_PHALANX_TIP],c=s.position.distanceTo(a.position),u=.02,h=.005;l.inputState.pinching&&c>u+h?(l.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:t.handedness,target:this})):!l.inputState.pinching&&c<=u-h&&(l.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:t.handedness,target:this}))}}else null!==s&&(i=e.getPose(t.targetRaySpace,n),null!==i&&(s.matrix.fromArray(i.transform.matrix),s.matrix.decompose(s.position,s.rotation,s.scale))),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)));return null!==s&&(s.visible=null!==i),null!==a&&(a.visible=null!==r),null!==l&&(l.visible=null!==o),this}}),Object.assign(Ki.prototype,r.prototype),tr.prototype=Object.assign(Object.create(Qi.prototype),{constructor:tr,isWebGL1Renderer:!0});class er extends vt{constructor(){super(),Object.defineProperty(this,"isScene",{value:!0}),this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.overrideMaterial=null,this.autoUpdate=!0,"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()),null!==t.overrideMaterial&&(this.overrideMaterial=t.overrideMaterial.clone()),this.autoUpdate=t.autoUpdate,this.matrixAutoUpdate=t.matrixAutoUpdate,this}toJSON(t){const e=super.toJSON(t);return null!==this.background&&(e.object.background=this.background.toJSON(t)),null!==this.environment&&(e.object.environment=this.environment.toJSON(t)),null!==this.fog&&(e.object.fog=this.fog.toJSON()),e}}function nr(t,e){this.array=t,this.stride=e,this.count=void 0!==t?t.length/e:0,this.usage=35044,this.updateRange={offset:0,count:-1},this.version=0,this.uuid=a.generateUUID()}Object.defineProperty(nr.prototype,"needsUpdate",{set:function(t){!0===t&&this.version++}}),Object.assign(nr.prototype,{isInterleavedBuffer:!0,onUploadCallback:function(){},setUsage:function(t){return this.usage=t,this},copy:function(t){return this.array=new t.array.constructor(t.array),this.count=t.count,this.stride=t.stride,this.usage=t.usage,this},copyAt:function(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:function(t,e){return void 0===e&&(e=0),this.array.set(t,e),this},clone:function(t){void 0===t.arrayBuffers&&(t.arrayBuffers={}),void 0===this.array.buffer._uuid&&(this.array.buffer._uuid=a.generateUUID()),void 0===t.arrayBuffers[this.array.buffer._uuid]&&(t.arrayBuffers[this.array.buffer._uuid]=this.array.slice(0).buffer);const e=new nr(new this.array.constructor(t.arrayBuffers[this.array.buffer._uuid]),this.stride);return e.setUsage(this.usage),e},onUpload:function(t){return this.onUploadCallback=t,this},toJSON:function(t){return void 0===t.arrayBuffers&&(t.arrayBuffers={}),void 0===this.array.buffer._uuid&&(this.array.buffer._uuid=a.generateUUID()),void 0===t.arrayBuffers[this.array.buffer._uuid]&&(t.arrayBuffers[this.array.buffer._uuid]=Array.prototype.slice.call(new Uint32Array(this.array.buffer))),{uuid:this.uuid,buffer:this.array.buffer._uuid,type:this.array.constructor.name,stride:this.stride}}});const ir=new y;function rr(t,e,n,i){this.name="",this.data=t,this.itemSize=e,this.offset=n,this.normalized=!0===i}function or(t){Ht.call(this),this.type="SpriteMaterial",this.color=new Ft(16777215),this.map=null,this.alphaMap=null,this.rotation=0,this.sizeAttenuation=!0,this.transparent=!0,this.setValues(t)}let sr;Object.defineProperties(rr.prototype,{count:{get:function(){return this.data.count}},array:{get:function(){return this.data.array}},needsUpdate:{set:function(t){this.data.needsUpdate=t}}}),Object.assign(rr.prototype,{isInterleavedBufferAttribute:!0,applyMatrix4:function(t){for(let e=0,n=this.data.count;e<n;e++)ir.x=this.getX(e),ir.y=this.getY(e),ir.z=this.getZ(e),ir.applyMatrix4(t),this.setXYZ(e,ir.x,ir.y,ir.z);return this},setX:function(t,e){return this.data.array[t*this.data.stride+this.offset]=e,this},setY:function(t,e){return this.data.array[t*this.data.stride+this.offset+1]=e,this},setZ:function(t,e){return this.data.array[t*this.data.stride+this.offset+2]=e,this},setW:function(t,e){return this.data.array[t*this.data.stride+this.offset+3]=e,this},getX:function(t){return this.data.array[t*this.data.stride+this.offset]},getY:function(t){return this.data.array[t*this.data.stride+this.offset+1]},getZ:function(t){return this.data.array[t*this.data.stride+this.offset+2]},getW:function(t){return this.data.array[t*this.data.stride+this.offset+3]},setXY:function(t,e,n){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=n,this},setXYZ:function(t,e,n,i){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=n,this.data.array[t+2]=i,this},setXYZW:function(t,e,n,i,r){return t=t*this.data.stride+this.offset,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:function(t){if(void 0===t){console.log("THREE.InterleavedBufferAttribute.clone(): Cloning an interlaved buffer attribute will deinterleave 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 qt(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 rr(t.interleavedBuffers[this.data.uuid],this.itemSize,this.offset,this.normalized)},toJSON:function(t){if(void 0===t){console.log("THREE.InterleavedBufferAttribute.toJSON(): Serializing an interlaved buffer attribute will deinterleave 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}}}),or.prototype=Object.create(Ht.prototype),or.prototype.constructor=or,or.prototype.isSpriteMaterial=!0,or.prototype.copy=function(t){return Ht.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.alphaMap=t.alphaMap,this.rotation=t.rotation,this.sizeAttenuation=t.sizeAttenuation,this};const ar=new y,lr=new y,cr=new y,ur=new l,hr=new l,dr=new q,pr=new y,fr=new y,mr=new y,gr=new l,vr=new l,yr=new l;function br(t){if(vt.call(this),this.type="Sprite",void 0===sr){sr=new he;const t=new nr(new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]),5);sr.setIndex([0,1,2,0,2,3]),sr.setAttribute("position",new rr(t,3,0,!1)),sr.setAttribute("uv",new rr(t,2,3,!1))}this.geometry=sr,this.material=void 0!==t?t:new or,this.center=new l(.5,.5)}function xr(t,e,n,i,r,o){ur.subVectors(t,n).addScalar(.5).multiply(i),void 0!==r?(hr.x=o*ur.x-r*ur.y,hr.y=r*ur.x+o*ur.y):hr.copy(ur),t.copy(e),t.x+=hr.x,t.y+=hr.y,t.applyMatrix4(dr)}br.prototype=Object.assign(Object.create(vt.prototype),{constructor:br,isSprite:!0,raycast:function(t,e){null===t.camera&&console.error('THREE.Sprite: "Raycaster.camera" needs to be set in order to raycast against sprites.'),lr.setFromMatrixScale(this.matrixWorld),dr.copy(t.camera.matrixWorld),this.modelViewMatrix.multiplyMatrices(t.camera.matrixWorldInverse,this.matrixWorld),cr.setFromMatrixPosition(this.modelViewMatrix),t.camera.isPerspectiveCamera&&!1===this.material.sizeAttenuation&&lr.multiplyScalar(-cr.z);const n=this.material.rotation;let i,r;0!==n&&(r=Math.cos(n),i=Math.sin(n));const o=this.center;xr(pr.set(-.5,-.5,0),cr,o,lr,i,r),xr(fr.set(.5,-.5,0),cr,o,lr,i,r),xr(mr.set(.5,.5,0),cr,o,lr,i,r),gr.set(0,0),vr.set(1,0),yr.set(1,1);let s=t.ray.intersectTriangle(pr,fr,mr,!1,ar);if(null===s&&(xr(fr.set(-.5,.5,0),cr,o,lr,i,r),vr.set(0,1),s=t.ray.intersectTriangle(pr,mr,fr,!1,ar),null===s))return;const a=t.ray.origin.distanceTo(ar);a<t.near||a>t.far||e.push({distance:a,point:ar.clone(),uv:Ot.getUV(ar,pr,fr,mr,gr,vr,yr,new l),face:null,object:this})},copy:function(t){return vt.prototype.copy.call(this,t),void 0!==t.center&&this.center.copy(t.center),this.material=t.material,this}});const wr=new y,_r=new y;function Sr(){vt.call(this),this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]}}),this.autoUpdate=!0}function Mr(t,e){t&&t.isGeometry&&console.error("THREE.SkinnedMesh no longer supports THREE.Geometry. Use THREE.BufferGeometry instead."),Pe.call(this,t,e),this.type="SkinnedMesh",this.bindMode="attached",this.bindMatrix=new q,this.bindMatrixInverse=new q}Sr.prototype=Object.assign(Object.create(vt.prototype),{constructor:Sr,isLOD:!0,copy:function(t){vt.prototype.copy.call(this,t,!1);const e=t.levels;for(let t=0,n=e.length;t<n;t++){const n=e[t];this.addLevel(n.object.clone(),n.distance)}return this.autoUpdate=t.autoUpdate,this},addLevel:function(t,e){void 0===e&&(e=0),e=Math.abs(e);const n=this.levels;let i;for(i=0;i<n.length&&!(e<n[i].distance);i++);return n.splice(i,0,{distance:e,object:t}),this.add(t),this},getCurrentLevel:function(){return this._currentLevel},getObjectForDistance:function(t){const e=this.levels;if(e.length>0){let n,i;for(n=1,i=e.length;n<i&&!(t<e[n].distance);n++);return e[n-1].object}return null},raycast:function(t,e){if(this.levels.length>0){wr.setFromMatrixPosition(this.matrixWorld);const n=t.ray.origin.distanceTo(wr);this.getObjectForDistance(n).raycast(t,e)}},update:function(t){const e=this.levels;if(e.length>1){wr.setFromMatrixPosition(t.matrixWorld),_r.setFromMatrixPosition(this.matrixWorld);const n=wr.distanceTo(_r)/t.zoom;let i,r;for(e[0].object.visible=!0,i=1,r=e.length;i<r&&n>=e[i].distance;i++)e[i-1].object.visible=!1,e[i].object.visible=!0;for(this._currentLevel=i-1;i<r;i++)e[i].object.visible=!1}},toJSON:function(t){const e=vt.prototype.toJSON.call(this,t);!1===this.autoUpdate&&(e.object.autoUpdate=!1),e.object.levels=[];const n=this.levels;for(let t=0,i=n.length;t<i;t++){const i=n[t];e.object.levels.push({object:i.object.uuid,distance:i.distance})}return e}}),Mr.prototype=Object.assign(Object.create(Pe.prototype),{constructor:Mr,isSkinnedMesh:!0,copy:function(t){return Pe.prototype.copy.call(this,t),this.bindMode=t.bindMode,this.bindMatrix.copy(t.bindMatrix),this.bindMatrixInverse.copy(t.bindMatrixInverse),this.skeleton=t.skeleton,this},bind:function(t,e){this.skeleton=t,void 0===e&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),e=this.matrixWorld),this.bindMatrix.copy(e),this.bindMatrixInverse.getInverse(e)},pose:function(){this.skeleton.pose()},normalizeSkinWeights:function(){const t=new f,e=this.geometry.attributes.skinWeight;for(let n=0,i=e.count;n<i;n++){t.x=e.getX(n),t.y=e.getY(n),t.z=e.getZ(n),t.w=e.getW(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:function(t){Pe.prototype.updateMatrixWorld.call(this,t),"attached"===this.bindMode?this.bindMatrixInverse.getInverse(this.matrixWorld):"detached"===this.bindMode?this.bindMatrixInverse.getInverse(this.bindMatrix):console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+this.bindMode)},boneTransform:function(){const t=new y,e=new f,n=new f,i=new y,r=new q;return function(o,s){const a=this.skeleton,l=this.geometry;e.fromBufferAttribute(l.attributes.skinIndex,o),n.fromBufferAttribute(l.attributes.skinWeight,o),t.fromBufferAttribute(l.attributes.position,o).applyMatrix4(this.bindMatrix),s.set(0,0,0);for(let o=0;o<4;o++){const l=n.getComponent(o);if(0!==l){const n=e.getComponent(o);r.multiplyMatrices(a.bones[n].matrixWorld,a.boneInverses[n]),s.addScaledVector(i.copy(t).applyMatrix4(r),l)}}return s.applyMatrix4(this.bindMatrixInverse)}}()});const Er=new q,Tr=new q;function Ar(t,e){if(t=t||[],this.bones=t.slice(0),this.boneMatrices=new Float32Array(16*this.bones.length),this.frame=-1,void 0===e)this.calculateInverses();else if(this.bones.length===e.length)this.boneInverses=e.slice(0);else{console.warn("THREE.Skeleton boneInverses is the wrong length."),this.boneInverses=[];for(let t=0,e=this.bones.length;t<e;t++)this.boneInverses.push(new q)}}function Lr(){vt.call(this),this.type="Bone"}Object.assign(Ar.prototype,{calculateInverses:function(){this.boneInverses=[];for(let t=0,e=this.bones.length;t<e;t++){const e=new q;this.bones[t]&&e.getInverse(this.bones[t].matrixWorld),this.boneInverses.push(e)}},pose:function(){for(let t=0,e=this.bones.length;t<e;t++){const e=this.bones[t];e&&e.matrixWorld.getInverse(this.boneInverses[t])}for(let t=0,e=this.bones.length;t<e;t++){const e=this.bones[t];e&&(e.parent&&e.parent.isBone?(e.matrix.getInverse(e.parent.matrixWorld),e.matrix.multiply(e.matrixWorld)):e.matrix.copy(e.matrixWorld),e.matrix.decompose(e.position,e.quaternion,e.scale))}},update:function(){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:Tr;Er.multiplyMatrices(r,e[i]),Er.toArray(n,16*i)}void 0!==i&&(i.needsUpdate=!0)},clone:function(){return new Ar(this.bones,this.boneInverses)},getBoneByName:function(t){for(let e=0,n=this.bones.length;e<n;e++){const n=this.bones[e];if(n.name===t)return n}},dispose:function(){this.boneTexture&&(this.boneTexture.dispose(),this.boneTexture=void 0)}}),Lr.prototype=Object.assign(Object.create(vt.prototype),{constructor:Lr,isBone:!0});const Pr=new q,Cr=new q,Rr=[],Or=new Pe;function Ir(t,e,n){Pe.call(this,t,e),this.instanceMatrix=new qt(new Float32Array(16*n),16),this.instanceColor=null,this.count=n,this.frustumCulled=!1}function Nr(t){Ht.call(this),this.type="LineBasicMaterial",this.color=new Ft(16777215),this.linewidth=1,this.linecap="round",this.linejoin="round",this.morphTargets=!1,this.setValues(t)}Ir.prototype=Object.assign(Object.create(Pe.prototype),{constructor:Ir,isInstancedMesh:!0,copy:function(t){return Pe.prototype.copy.call(this,t),this.instanceMatrix.copy(t.instanceMatrix),this.count=t.count,this},setColorAt:function(t,e){null===this.instanceColor&&(this.instanceColor=new qt(new Float32Array(3*this.count),3)),e.toArray(this.instanceColor.array,3*t)},getMatrixAt:function(t,e){e.fromArray(this.instanceMatrix.array,16*t)},raycast:function(t,e){const n=this.matrixWorld,i=this.count;if(Or.geometry=this.geometry,Or.material=this.material,void 0!==Or.material)for(let r=0;r<i;r++){this.getMatrixAt(r,Pr),Cr.multiplyMatrices(n,Pr),Or.matrixWorld=Cr,Or.raycast(t,Rr);for(let t=0,n=Rr.length;t<n;t++){const n=Rr[t];n.instanceId=r,n.object=this,e.push(n)}Rr.length=0}},setMatrixAt:function(t,e){e.toArray(this.instanceMatrix.array,16*t)},updateMorphTargets:function(){}}),Nr.prototype=Object.create(Ht.prototype),Nr.prototype.constructor=Nr,Nr.prototype.isLineBasicMaterial=!0,Nr.prototype.copy=function(t){return Ht.prototype.copy.call(this,t),this.color.copy(t.color),this.linewidth=t.linewidth,this.linecap=t.linecap,this.linejoin=t.linejoin,this.morphTargets=t.morphTargets,this};const Dr=new y,zr=new y,kr=new q,Br=new W,Fr=new k;function Ur(t,e,n){1===n&&console.error("THREE.Line: parameter THREE.LinePieces no longer supported. Use THREE.LineSegments instead."),vt.call(this),this.type="Line",this.geometry=void 0!==t?t:new he,this.material=void 0!==e?e:new Nr,this.updateMorphTargets()}Ur.prototype=Object.assign(Object.create(vt.prototype),{constructor:Ur,isLine:!0,copy:function(t){return vt.prototype.copy.call(this,t),this.material=t.material,this.geometry=t.geometry,this},computeLineDistances:function(){const t=this.geometry;if(t.isBufferGeometry)if(null===t.index){const e=t.attributes.position,n=[0];for(let t=1,i=e.count;t<i;t++)Dr.fromBufferAttribute(e,t-1),zr.fromBufferAttribute(e,t),n[t]=n[t-1],n[t]+=Dr.distanceTo(zr);t.setAttribute("lineDistance",new te(n,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else if(t.isGeometry){const e=t.vertices,n=t.lineDistances;n[0]=0;for(let t=1,i=e.length;t<i;t++)n[t]=n[t-1],n[t]+=e[t-1].distanceTo(e[t])}return this},raycast:function(t,e){const n=this.geometry,i=this.matrixWorld,r=t.params.Line.threshold;if(null===n.boundingSphere&&n.computeBoundingSphere(),Fr.copy(n.boundingSphere),Fr.applyMatrix4(i),Fr.radius+=r,!1===t.ray.intersectsSphere(Fr))return;kr.getInverse(i),Br.copy(t.ray).applyMatrix4(kr);const o=r/((this.scale.x+this.scale.y+this.scale.z)/3),s=o*o,a=new y,l=new y,c=new y,u=new y,h=this.isLineSegments?2:1;if(n.isBufferGeometry){const i=n.index,r=n.attributes.position;if(null!==i){const n=i.array;for(let i=0,o=n.length-1;i<o;i+=h){const o=n[i],h=n[i+1];a.fromBufferAttribute(r,o),l.fromBufferAttribute(r,h);if(Br.distanceSqToSegment(a,l,u,c)>s)continue;u.applyMatrix4(this.matrixWorld);const d=t.ray.origin.distanceTo(u);d<t.near||d>t.far||e.push({distance:d,point:c.clone().applyMatrix4(this.matrixWorld),index:i,face:null,faceIndex:null,object:this})}}else for(let n=0,i=r.count-1;n<i;n+=h){a.fromBufferAttribute(r,n),l.fromBufferAttribute(r,n+1);if(Br.distanceSqToSegment(a,l,u,c)>s)continue;u.applyMatrix4(this.matrixWorld);const i=t.ray.origin.distanceTo(u);i<t.near||i>t.far||e.push({distance:i,point:c.clone().applyMatrix4(this.matrixWorld),index:n,face:null,faceIndex:null,object:this})}}else if(n.isGeometry){const i=n.vertices,r=i.length;for(let n=0;n<r-1;n+=h){if(Br.distanceSqToSegment(i[n],i[n+1],u,c)>s)continue;u.applyMatrix4(this.matrixWorld);const r=t.ray.origin.distanceTo(u);r<t.near||r>t.far||e.push({distance:r,point:c.clone().applyMatrix4(this.matrixWorld),index:n,face:null,faceIndex:null,object:this})}}},updateMorphTargets:function(){const t=this.geometry;if(t.isBufferGeometry){const e=t.morphAttributes,n=Object.keys(e);if(n.length>0){const t=e[n[0]];if(void 0!==t){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let e=0,n=t.length;e<n;e++){const n=t[e].name||String(e);this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=e}}}}else{const e=t.morphTargets;void 0!==e&&e.length>0&&console.error("THREE.Line.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.")}}});const jr=new y,Hr=new y;function Gr(t,e){Ur.call(this,t,e),this.type="LineSegments"}function Vr(t,e){Ur.call(this,t,e),this.type="LineLoop"}function Wr(t){Ht.call(this),this.type="PointsMaterial",this.color=new Ft(16777215),this.map=null,this.alphaMap=null,this.size=1,this.sizeAttenuation=!0,this.morphTargets=!1,this.setValues(t)}Gr.prototype=Object.assign(Object.create(Ur.prototype),{constructor:Gr,isLineSegments:!0,computeLineDistances:function(){const t=this.geometry;if(t.isBufferGeometry)if(null===t.index){const e=t.attributes.position,n=[];for(let t=0,i=e.count;t<i;t+=2)jr.fromBufferAttribute(e,t),Hr.fromBufferAttribute(e,t+1),n[t]=0===t?0:n[t-1],n[t+1]=n[t]+jr.distanceTo(Hr);t.setAttribute("lineDistance",new te(n,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else if(t.isGeometry){const e=t.vertices,n=t.lineDistances;for(let t=0,i=e.length;t<i;t+=2)jr.copy(e[t]),Hr.copy(e[t+1]),n[t]=0===t?0:n[t-1],n[t+1]=n[t]+jr.distanceTo(Hr)}return this}}),Vr.prototype=Object.assign(Object.create(Ur.prototype),{constructor:Vr,isLineLoop:!0}),Wr.prototype=Object.create(Ht.prototype),Wr.prototype.constructor=Wr,Wr.prototype.isPointsMaterial=!0,Wr.prototype.copy=function(t){return Ht.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.alphaMap=t.alphaMap,this.size=t.size,this.sizeAttenuation=t.sizeAttenuation,this.morphTargets=t.morphTargets,this};const qr=new q,Xr=new W,Yr=new k,Zr=new y;function Jr(t,e){vt.call(this),this.type="Points",this.geometry=void 0!==t?t:new he,this.material=void 0!==e?e:new Wr,this.updateMorphTargets()}function Kr(t,e,n,i,r,o,s){const a=Xr.distanceSqToPoint(t);if(a<n){const n=new y;Xr.closestPointToPoint(t,n),n.applyMatrix4(i);const l=r.ray.origin.distanceTo(n);if(l<r.near||l>r.far)return;o.push({distance:l,distanceToRay:Math.sqrt(a),point:n,index:e,face:null,object:s})}}function $r(t,e,n,i,r,o,s,a,l){p.call(this,t,e,n,i,r,o,s,a,l),this.format=void 0!==s?s:1022,this.minFilter=void 0!==o?o:1006,this.magFilter=void 0!==r?r:1006,this.generateMipmaps=!1;const c=this;"requestVideoFrameCallback"in t&&t.requestVideoFrameCallback((function e(){c.needsUpdate=!0,t.requestVideoFrameCallback(e)}))}function Qr(t,e,n,i,r,o,s,a,l,c,u,h){p.call(this,null,o,s,a,l,c,i,r,u,h),this.image={width:e,height:n},this.mipmaps=t,this.flipY=!1,this.generateMipmaps=!1}function to(t,e,n,i,r,o,s,a,l){p.call(this,t,e,n,i,r,o,s,a,l),this.needsUpdate=!0}function eo(t,e,n,i,r,o,s,a,l,c){if(1026!==(c=void 0!==c?c:1026)&&1027!==c)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");void 0===n&&1026===c&&(n=1012),void 0===n&&1027===c&&(n=1020),p.call(this,null,i,r,o,s,a,c,n,l),this.image={width:t,height:e},this.magFilter=void 0!==s?s:1003,this.minFilter=void 0!==a?a:1003,this.flipY=!1,this.generateMipmaps=!1}Jr.prototype=Object.assign(Object.create(vt.prototype),{constructor:Jr,isPoints:!0,copy:function(t){return vt.prototype.copy.call(this,t),this.material=t.material,this.geometry=t.geometry,this},raycast:function(t,e){const n=this.geometry,i=this.matrixWorld,r=t.params.Points.threshold;if(null===n.boundingSphere&&n.computeBoundingSphere(),Yr.copy(n.boundingSphere),Yr.applyMatrix4(i),Yr.radius+=r,!1===t.ray.intersectsSphere(Yr))return;qr.getInverse(i),Xr.copy(t.ray).applyMatrix4(qr);const o=r/((this.scale.x+this.scale.y+this.scale.z)/3),s=o*o;if(n.isBufferGeometry){const r=n.index,o=n.attributes.position;if(null!==r){const n=r.array;for(let r=0,a=n.length;r<a;r++){const a=n[r];Zr.fromBufferAttribute(o,a),Kr(Zr,a,s,i,t,e,this)}}else for(let n=0,r=o.count;n<r;n++)Zr.fromBufferAttribute(o,n),Kr(Zr,n,s,i,t,e,this)}else{const r=n.vertices;for(let n=0,o=r.length;n<o;n++)Kr(r[n],n,s,i,t,e,this)}},updateMorphTargets:function(){const t=this.geometry;if(t.isBufferGeometry){const e=t.morphAttributes,n=Object.keys(e);if(n.length>0){const t=e[n[0]];if(void 0!==t){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let e=0,n=t.length;e<n;e++){const n=t[e].name||String(e);this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=e}}}}else{const e=t.morphTargets;void 0!==e&&e.length>0&&console.error("THREE.Points.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.")}}}),$r.prototype=Object.assign(Object.create(p.prototype),{constructor:$r,clone:function(){return new this.constructor(this.image).copy(this)},isVideoTexture:!0,update:function(){const t=this.image;!1==="requestVideoFrameCallback"in t&&t.readyState>=t.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}),Qr.prototype=Object.create(p.prototype),Qr.prototype.constructor=Qr,Qr.prototype.isCompressedTexture=!0,to.prototype=Object.create(p.prototype),to.prototype.constructor=to,to.prototype.isCanvasTexture=!0,eo.prototype=Object.create(p.prototype),eo.prototype.constructor=eo,eo.prototype.isDepthTexture=!0;let no=0;const io=new q,ro=new vt,oo=new y;function so(){Object.defineProperty(this,"id",{value:no+=2}),this.uuid=a.generateUUID(),this.name="",this.type="Geometry",this.vertices=[],this.colors=[],this.faces=[],this.faceVertexUvs=[[]],this.morphTargets=[],this.morphNormals=[],this.skinWeights=[],this.skinIndices=[],this.lineDistances=[],this.boundingBox=null,this.boundingSphere=null,this.elementsNeedUpdate=!1,this.verticesNeedUpdate=!1,this.uvsNeedUpdate=!1,this.normalsNeedUpdate=!1,this.colorsNeedUpdate=!1,this.lineDistancesNeedUpdate=!1,this.groupsNeedUpdate=!1}so.prototype=Object.assign(Object.create(r.prototype),{constructor:so,isGeometry:!0,applyMatrix4:function(t){const e=(new c).getNormalMatrix(t);for(let e=0,n=this.vertices.length;e<n;e++){this.vertices[e].applyMatrix4(t)}for(let t=0,n=this.faces.length;t<n;t++){const n=this.faces[t];n.normal.applyMatrix3(e).normalize();for(let t=0,i=n.vertexNormals.length;t<i;t++)n.vertexNormals[t].applyMatrix3(e).normalize()}return null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this.verticesNeedUpdate=!0,this.normalsNeedUpdate=!0,this},rotateX:function(t){return io.makeRotationX(t),this.applyMatrix4(io),this},rotateY:function(t){return io.makeRotationY(t),this.applyMatrix4(io),this},rotateZ:function(t){return io.makeRotationZ(t),this.applyMatrix4(io),this},translate:function(t,e,n){return io.makeTranslation(t,e,n),this.applyMatrix4(io),this},scale:function(t,e,n){return io.makeScale(t,e,n),this.applyMatrix4(io),this},lookAt:function(t){return ro.lookAt(t),ro.updateMatrix(),this.applyMatrix4(ro.matrix),this},fromBufferGeometry:function(t){const e=this,n=null!==t.index?t.index:void 0,i=t.attributes;if(void 0===i.position)return console.error("THREE.Geometry.fromBufferGeometry(): Position attribute required for conversion."),this;const r=i.position,o=i.normal,s=i.color,a=i.uv,c=i.uv2;void 0!==c&&(this.faceVertexUvs[1]=[]);for(let t=0;t<r.count;t++)e.vertices.push((new y).fromBufferAttribute(r,t)),void 0!==s&&e.colors.push((new Ft).fromBufferAttribute(s,t));function u(t,n,i,r){const u=void 0===s?[]:[e.colors[t].clone(),e.colors[n].clone(),e.colors[i].clone()],h=void 0===o?[]:[(new y).fromBufferAttribute(o,t),(new y).fromBufferAttribute(o,n),(new y).fromBufferAttribute(o,i)],d=new Ut(t,n,i,h,u,r);e.faces.push(d),void 0!==a&&e.faceVertexUvs[0].push([(new l).fromBufferAttribute(a,t),(new l).fromBufferAttribute(a,n),(new l).fromBufferAttribute(a,i)]),void 0!==c&&e.faceVertexUvs[1].push([(new l).fromBufferAttribute(c,t),(new l).fromBufferAttribute(c,n),(new l).fromBufferAttribute(c,i)])}const h=t.groups;if(h.length>0)for(let t=0;t<h.length;t++){const e=h[t],i=e.start;for(let t=i,r=i+e.count;t<r;t+=3)void 0!==n?u(n.getX(t),n.getX(t+1),n.getX(t+2),e.materialIndex):u(t,t+1,t+2,e.materialIndex)}else if(void 0!==n)for(let t=0;t<n.count;t+=3)u(n.getX(t),n.getX(t+1),n.getX(t+2));else for(let t=0;t<r.count;t+=3)u(t,t+1,t+2);return this.computeFaceNormals(),null!==t.boundingBox&&(this.boundingBox=t.boundingBox.clone()),null!==t.boundingSphere&&(this.boundingSphere=t.boundingSphere.clone()),this},center:function(){return this.computeBoundingBox(),this.boundingBox.getCenter(oo).negate(),this.translate(oo.x,oo.y,oo.z),this},normalize:function(){this.computeBoundingSphere();const t=this.boundingSphere.center,e=this.boundingSphere.radius,n=0===e?1:1/e,i=new q;return i.set(n,0,0,-n*t.x,0,n,0,-n*t.y,0,0,n,-n*t.z,0,0,0,1),this.applyMatrix4(i),this},computeFaceNormals:function(){const t=new y,e=new y;for(let n=0,i=this.faces.length;n<i;n++){const i=this.faces[n],r=this.vertices[i.a],o=this.vertices[i.b],s=this.vertices[i.c];t.subVectors(s,o),e.subVectors(r,o),t.cross(e),t.normalize(),i.normal.copy(t)}},computeVertexNormals:function(t){void 0===t&&(t=!0);const e=new Array(this.vertices.length);for(let t=0,n=this.vertices.length;t<n;t++)e[t]=new y;if(t){const t=new y,n=new y;for(let i=0,r=this.faces.length;i<r;i++){const r=this.faces[i],o=this.vertices[r.a],s=this.vertices[r.b],a=this.vertices[r.c];t.subVectors(a,s),n.subVectors(o,s),t.cross(n),e[r.a].add(t),e[r.b].add(t),e[r.c].add(t)}}else{this.computeFaceNormals();for(let t=0,n=this.faces.length;t<n;t++){const n=this.faces[t];e[n.a].add(n.normal),e[n.b].add(n.normal),e[n.c].add(n.normal)}}for(let t=0,n=this.vertices.length;t<n;t++)e[t].normalize();for(let t=0,n=this.faces.length;t<n;t++){const n=this.faces[t],i=n.vertexNormals;3===i.length?(i[0].copy(e[n.a]),i[1].copy(e[n.b]),i[2].copy(e[n.c])):(i[0]=e[n.a].clone(),i[1]=e[n.b].clone(),i[2]=e[n.c].clone())}this.faces.length>0&&(this.normalsNeedUpdate=!0)},computeFlatVertexNormals:function(){this.computeFaceNormals();for(let t=0,e=this.faces.length;t<e;t++){const e=this.faces[t],n=e.vertexNormals;3===n.length?(n[0].copy(e.normal),n[1].copy(e.normal),n[2].copy(e.normal)):(n[0]=e.normal.clone(),n[1]=e.normal.clone(),n[2]=e.normal.clone())}this.faces.length>0&&(this.normalsNeedUpdate=!0)},computeMorphNormals:function(){for(let t=0,e=this.faces.length;t<e;t++){const e=this.faces[t];e.__originalFaceNormal?e.__originalFaceNormal.copy(e.normal):e.__originalFaceNormal=e.normal.clone(),e.__originalVertexNormals||(e.__originalVertexNormals=[]);for(let t=0,n=e.vertexNormals.length;t<n;t++)e.__originalVertexNormals[t]?e.__originalVertexNormals[t].copy(e.vertexNormals[t]):e.__originalVertexNormals[t]=e.vertexNormals[t].clone()}const t=new so;t.faces=this.faces;for(let e=0,n=this.morphTargets.length;e<n;e++){if(!this.morphNormals[e]){this.morphNormals[e]={},this.morphNormals[e].faceNormals=[],this.morphNormals[e].vertexNormals=[];const t=this.morphNormals[e].faceNormals,n=this.morphNormals[e].vertexNormals;for(let e=0,i=this.faces.length;e<i;e++){const e=new y,i={a:new y,b:new y,c:new y};t.push(e),n.push(i)}}const n=this.morphNormals[e];t.vertices=this.morphTargets[e].vertices,t.computeFaceNormals(),t.computeVertexNormals();for(let t=0,e=this.faces.length;t<e;t++){const e=this.faces[t],i=n.faceNormals[t],r=n.vertexNormals[t];i.copy(e.normal),r.a.copy(e.vertexNormals[0]),r.b.copy(e.vertexNormals[1]),r.c.copy(e.vertexNormals[2])}}for(let t=0,e=this.faces.length;t<e;t++){const e=this.faces[t];e.normal=e.__originalFaceNormal,e.vertexNormals=e.__originalVertexNormals}},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new w),this.boundingBox.setFromPoints(this.vertices)},computeBoundingSphere:function(){null===this.boundingSphere&&(this.boundingSphere=new k),this.boundingSphere.setFromPoints(this.vertices)},merge:function(t,e,n){if(!t||!t.isGeometry)return void console.error("THREE.Geometry.merge(): geometry not an instance of THREE.Geometry.",t);let i;const r=this.vertices.length,o=this.vertices,s=t.vertices,a=this.faces,l=t.faces,u=this.colors,h=t.colors;void 0===n&&(n=0),void 0!==e&&(i=(new c).getNormalMatrix(e));for(let t=0,n=s.length;t<n;t++){const n=s[t].clone();void 0!==e&&n.applyMatrix4(e),o.push(n)}for(let t=0,e=h.length;t<e;t++)u.push(h[t].clone());for(let t=0,e=l.length;t<e;t++){const e=l[t];let o,s;const c=e.vertexNormals,u=e.vertexColors,h=new Ut(e.a+r,e.b+r,e.c+r);h.normal.copy(e.normal),void 0!==i&&h.normal.applyMatrix3(i).normalize();for(let t=0,e=c.length;t<e;t++)o=c[t].clone(),void 0!==i&&o.applyMatrix3(i).normalize(),h.vertexNormals.push(o);h.color.copy(e.color);for(let t=0,e=u.length;t<e;t++)s=u[t],h.vertexColors.push(s.clone());h.materialIndex=e.materialIndex+n,a.push(h)}for(let e=0,n=t.faceVertexUvs.length;e<n;e++){const n=t.faceVertexUvs[e];void 0===this.faceVertexUvs[e]&&(this.faceVertexUvs[e]=[]);for(let t=0,i=n.length;t<i;t++){const i=n[t],r=[];for(let t=0,e=i.length;t<e;t++)r.push(i[t].clone());this.faceVertexUvs[e].push(r)}}},mergeMesh:function(t){t&&t.isMesh?(t.matrixAutoUpdate&&t.updateMatrix(),this.merge(t.geometry,t.matrix)):console.error("THREE.Geometry.mergeMesh(): mesh not an instance of THREE.Mesh.",t)},mergeVertices:function(){const t={},e=[],n=[],i=Math.pow(10,4);for(let r=0,o=this.vertices.length;r<o;r++){const o=this.vertices[r],s=Math.round(o.x*i)+"_"+Math.round(o.y*i)+"_"+Math.round(o.z*i);void 0===t[s]?(t[s]=r,e.push(this.vertices[r]),n[r]=e.length-1):n[r]=n[t[s]]}const r=[];for(let t=0,e=this.faces.length;t<e;t++){const e=this.faces[t];e.a=n[e.a],e.b=n[e.b],e.c=n[e.c];const i=[e.a,e.b,e.c];for(let e=0;e<3;e++)if(i[e]===i[(e+1)%3]){r.push(t);break}}for(let t=r.length-1;t>=0;t--){const e=r[t];this.faces.splice(e,1);for(let t=0,n=this.faceVertexUvs.length;t<n;t++)this.faceVertexUvs[t].splice(e,1)}const o=this.vertices.length-e.length;return this.vertices=e,o},setFromPoints:function(t){this.vertices=[];for(let e=0,n=t.length;e<n;e++){const n=t[e];this.vertices.push(new y(n.x,n.y,n.z||0))}return this},sortFacesByMaterialIndex:function(){const t=this.faces,e=t.length;for(let n=0;n<e;n++)t[n]._id=n;t.sort((function(t,e){return t.materialIndex-e.materialIndex}));const n=this.faceVertexUvs[0],i=this.faceVertexUvs[1];let r,o;n&&n.length===e&&(r=[]),i&&i.length===e&&(o=[]);for(let s=0;s<e;s++){const e=t[s]._id;r&&r.push(n[e]),o&&o.push(i[e])}r&&(this.faceVertexUvs[0]=r),o&&(this.faceVertexUvs[1]=o)},toJSON:function(){const t={metadata:{version:4.5,type:"Geometry",generator:"Geometry.toJSON"}};if(t.uuid=this.uuid,t.type=this.type,""!==this.name&&(t.name=this.name),void 0!==this.parameters){const e=this.parameters;for(const n in e)void 0!==e[n]&&(t[n]=e[n]);return t}const e=[];for(let t=0;t<this.vertices.length;t++){const n=this.vertices[t];e.push(n.x,n.y,n.z)}const n=[],i=[],r={},o=[],s={},a=[],l={};for(let t=0;t<this.faces.length;t++){const e=this.faces[t],i=!0,r=!1,o=void 0!==this.faceVertexUvs[0][t],s=e.normal.length()>0,a=e.vertexNormals.length>0,l=1!==e.color.r||1!==e.color.g||1!==e.color.b,p=e.vertexColors.length>0;let f=0;if(f=c(f,0,0),f=c(f,1,i),f=c(f,2,r),f=c(f,3,o),f=c(f,4,s),f=c(f,5,a),f=c(f,6,l),f=c(f,7,p),n.push(f),n.push(e.a,e.b,e.c),n.push(e.materialIndex),o){const e=this.faceVertexUvs[0][t];n.push(d(e[0]),d(e[1]),d(e[2]))}if(s&&n.push(u(e.normal)),a){const t=e.vertexNormals;n.push(u(t[0]),u(t[1]),u(t[2]))}if(l&&n.push(h(e.color)),p){const t=e.vertexColors;n.push(h(t[0]),h(t[1]),h(t[2]))}}function c(t,e,n){return n?t|1<<e:t&~(1<<e)}function u(t){const e=t.x.toString()+t.y.toString()+t.z.toString();return void 0!==r[e]||(r[e]=i.length/3,i.push(t.x,t.y,t.z)),r[e]}function h(t){const e=t.r.toString()+t.g.toString()+t.b.toString();return void 0!==s[e]||(s[e]=o.length,o.push(t.getHex())),s[e]}function d(t){const e=t.x.toString()+t.y.toString();return void 0!==l[e]||(l[e]=a.length/2,a.push(t.x,t.y)),l[e]}return t.data={},t.data.vertices=e,t.data.normals=i,o.length>0&&(t.data.colors=o),a.length>0&&(t.data.uvs=[a]),t.data.faces=n,t},clone:function(){return(new so).copy(this)},copy:function(t){this.vertices=[],this.colors=[],this.faces=[],this.faceVertexUvs=[[]],this.morphTargets=[],this.morphNormals=[],this.skinWeights=[],this.skinIndices=[],this.lineDistances=[],this.boundingBox=null,this.boundingSphere=null,this.name=t.name;const e=t.vertices;for(let t=0,n=e.length;t<n;t++)this.vertices.push(e[t].clone());const n=t.colors;for(let t=0,e=n.length;t<e;t++)this.colors.push(n[t].clone());const i=t.faces;for(let t=0,e=i.length;t<e;t++)this.faces.push(i[t].clone());for(let e=0,n=t.faceVertexUvs.length;e<n;e++){const n=t.faceVertexUvs[e];void 0===this.faceVertexUvs[e]&&(this.faceVertexUvs[e]=[]);for(let t=0,i=n.length;t<i;t++){const i=n[t],r=[];for(let t=0,e=i.length;t<e;t++){const e=i[t];r.push(e.clone())}this.faceVertexUvs[e].push(r)}}const r=t.morphTargets;for(let t=0,e=r.length;t<e;t++){const e={};if(e.name=r[t].name,void 0!==r[t].vertices){e.vertices=[];for(let n=0,i=r[t].vertices.length;n<i;n++)e.vertices.push(r[t].vertices[n].clone())}if(void 0!==r[t].normals){e.normals=[];for(let n=0,i=r[t].normals.length;n<i;n++)e.normals.push(r[t].normals[n].clone())}this.morphTargets.push(e)}const o=t.morphNormals;for(let t=0,e=o.length;t<e;t++){const e={};if(void 0!==o[t].vertexNormals){e.vertexNormals=[];for(let n=0,i=o[t].vertexNormals.length;n<i;n++){const i=o[t].vertexNormals[n],r={};r.a=i.a.clone(),r.b=i.b.clone(),r.c=i.c.clone(),e.vertexNormals.push(r)}}if(void 0!==o[t].faceNormals){e.faceNormals=[];for(let n=0,i=o[t].faceNormals.length;n<i;n++)e.faceNormals.push(o[t].faceNormals[n].clone())}this.morphNormals.push(e)}const s=t.skinWeights;for(let t=0,e=s.length;t<e;t++)this.skinWeights.push(s[t].clone());const a=t.skinIndices;for(let t=0,e=a.length;t<e;t++)this.skinIndices.push(a[t].clone());const l=t.lineDistances;for(let t=0,e=l.length;t<e;t++)this.lineDistances.push(l[t]);const c=t.boundingBox;null!==c&&(this.boundingBox=c.clone());const u=t.boundingSphere;return null!==u&&(this.boundingSphere=u.clone()),this.elementsNeedUpdate=t.elementsNeedUpdate,this.verticesNeedUpdate=t.verticesNeedUpdate,this.uvsNeedUpdate=t.uvsNeedUpdate,this.normalsNeedUpdate=t.normalsNeedUpdate,this.colorsNeedUpdate=t.colorsNeedUpdate,this.lineDistancesNeedUpdate=t.lineDistancesNeedUpdate,this.groupsNeedUpdate=t.groupsNeedUpdate,this},dispose:function(){this.dispatchEvent({type:"dispose"})}});new y,new y,new y,new Ot;const ao=function(t,e,n){n=n||2;const i=e&&e.length,r=i?e[0]*n:t.length;let o=lo(t,0,r,n,!0);const s=[];if(!o||o.next===o.prev)return s;let a,l,c,u,h,d,p;if(i&&(o=function(t,e,n,i){const r=[];let o,s,a,l,c;for(o=0,s=e.length;o<s;o++)a=e[o]*i,l=o<s-1?e[o+1]*i:t.length,c=lo(t,a,l,i,!1),c===c.next&&(c.steiner=!0),r.push(xo(c));for(r.sort(go),o=0;o<r.length;o++)vo(r[o],n),n=co(n,n.next);return n}(t,e,o,n)),t.length>80*n){a=c=t[0],l=u=t[1];for(let e=n;e<r;e+=n)h=t[e],d=t[e+1],h<a&&(a=h),d<l&&(l=d),h>c&&(c=h),d>u&&(u=d);p=Math.max(c-a,u-l),p=0!==p?1/p:0}return uo(o,s,n,a,l,p),s};function lo(t,e,n,i,r){let o,s;if(r===function(t,e,n,i){let r=0;for(let o=e,s=n-i;o<n;o+=i)r+=(t[s]-t[o])*(t[o+1]+t[s+1]),s=o;return r}(t,e,n,i)>0)for(o=e;o<n;o+=i)s=Co(o,t[o],t[o+1],s);else for(o=n-i;o>=e;o-=i)s=Co(o,t[o],t[o+1],s);return s&&Mo(s,s.next)&&(Ro(s),s=s.next),s}function co(t,e){if(!t)return t;e||(e=t);let n,i=t;do{if(n=!1,i.steiner||!Mo(i,i.next)&&0!==So(i.prev,i,i.next))i=i.next;else{if(Ro(i),i=e=i.prev,i===i.next)break;n=!0}}while(n||i!==e);return e}function uo(t,e,n,i,r,o,s){if(!t)return;!s&&o&&function(t,e,n,i){let r=t;do{null===r.z&&(r.z=bo(r.x,r.y,e,n,i)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next}while(r!==t);r.prevZ.nextZ=null,r.prevZ=null,function(t){let e,n,i,r,o,s,a,l,c=1;do{for(n=t,t=null,o=null,s=0;n;){for(s++,i=n,a=0,e=0;e<c&&(a++,i=i.nextZ,i);e++);for(l=c;a>0||l>0&&i;)0!==a&&(0===l||!i||n.z<=i.z)?(r=n,n=n.nextZ,a--):(r=i,i=i.nextZ,l--),o?o.nextZ=r:t=r,r.prevZ=o,o=r;n=i}o.nextZ=null,c*=2}while(s>1)}(r)}(t,i,r,o);let a,l,c=t;for(;t.prev!==t.next;)if(a=t.prev,l=t.next,o?po(t,i,r,o):ho(t))e.push(a.i/n),e.push(t.i/n),e.push(l.i/n),Ro(t),t=l.next,c=l.next;else if((t=l)===c){s?1===s?uo(t=fo(co(t),e,n),e,n,i,r,o,2):2===s&&mo(t,e,n,i,r,o):uo(co(t),e,n,i,r,o,1);break}}function ho(t){const e=t.prev,n=t,i=t.next;if(So(e,n,i)>=0)return!1;let r=t.next.next;for(;r!==t.prev;){if(wo(e.x,e.y,n.x,n.y,i.x,i.y,r.x,r.y)&&So(r.prev,r,r.next)>=0)return!1;r=r.next}return!0}function po(t,e,n,i){const r=t.prev,o=t,s=t.next;if(So(r,o,s)>=0)return!1;const a=r.x<o.x?r.x<s.x?r.x:s.x:o.x<s.x?o.x:s.x,l=r.y<o.y?r.y<s.y?r.y:s.y:o.y<s.y?o.y:s.y,c=r.x>o.x?r.x>s.x?r.x:s.x:o.x>s.x?o.x:s.x,u=r.y>o.y?r.y>s.y?r.y:s.y:o.y>s.y?o.y:s.y,h=bo(a,l,e,n,i),d=bo(c,u,e,n,i);let p=t.prevZ,f=t.nextZ;for(;p&&p.z>=h&&f&&f.z<=d;){if(p!==t.prev&&p!==t.next&&wo(r.x,r.y,o.x,o.y,s.x,s.y,p.x,p.y)&&So(p.prev,p,p.next)>=0)return!1;if(p=p.prevZ,f!==t.prev&&f!==t.next&&wo(r.x,r.y,o.x,o.y,s.x,s.y,f.x,f.y)&&So(f.prev,f,f.next)>=0)return!1;f=f.nextZ}for(;p&&p.z>=h;){if(p!==t.prev&&p!==t.next&&wo(r.x,r.y,o.x,o.y,s.x,s.y,p.x,p.y)&&So(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;f&&f.z<=d;){if(f!==t.prev&&f!==t.next&&wo(r.x,r.y,o.x,o.y,s.x,s.y,f.x,f.y)&&So(f.prev,f,f.next)>=0)return!1;f=f.nextZ}return!0}function fo(t,e,n){let i=t;do{const r=i.prev,o=i.next.next;!Mo(r,o)&&Eo(r,i,i.next,o)&&Lo(r,o)&&Lo(o,r)&&(e.push(r.i/n),e.push(i.i/n),e.push(o.i/n),Ro(i),Ro(i.next),i=t=o),i=i.next}while(i!==t);return co(i)}function mo(t,e,n,i,r,o){let s=t;do{let t=s.next.next;for(;t!==s.prev;){if(s.i!==t.i&&_o(s,t)){let a=Po(s,t);return s=co(s,s.next),a=co(a,a.next),uo(s,e,n,i,r,o),void uo(a,e,n,i,r,o)}t=t.next}s=s.next}while(s!==t)}function go(t,e){return t.x-e.x}function vo(t,e){if(e=function(t,e){let n=e;const i=t.x,r=t.y;let o,s=-1/0;do{if(r<=n.y&&r>=n.next.y&&n.next.y!==n.y){const t=n.x+(r-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(t<=i&&t>s){if(s=t,t===i){if(r===n.y)return n;if(r===n.next.y)return n.next}o=n.x<n.next.x?n:n.next}}n=n.next}while(n!==e);if(!o)return null;if(i===s)return o;const a=o,l=o.x,c=o.y;let u,h=1/0;n=o;do{i>=n.x&&n.x>=l&&i!==n.x&&wo(r<c?i:s,r,l,c,r<c?s:i,r,n.x,n.y)&&(u=Math.abs(r-n.y)/(i-n.x),Lo(n,t)&&(u<h||u===h&&(n.x>o.x||n.x===o.x&&yo(o,n)))&&(o=n,h=u)),n=n.next}while(n!==a);return o}(t,e)){const n=Po(e,t);co(e,e.next),co(n,n.next)}}function yo(t,e){return So(t.prev,t,e.prev)<0&&So(e.next,t,t.next)<0}function bo(t,e,n,i,r){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*r)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-i)*r)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function xo(t){let e=t,n=t;do{(e.x<n.x||e.x===n.x&&e.y<n.y)&&(n=e),e=e.next}while(e!==t);return n}function wo(t,e,n,i,r,o,s,a){return(r-s)*(e-a)-(t-s)*(o-a)>=0&&(t-s)*(i-a)-(n-s)*(e-a)>=0&&(n-s)*(o-a)-(r-s)*(i-a)>=0}function _o(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){let n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&Eo(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}(t,e)&&(Lo(t,e)&&Lo(e,t)&&function(t,e){let n=t,i=!1;const r=(t.x+e.x)/2,o=(t.y+e.y)/2;do{n.y>o!=n.next.y>o&&n.next.y!==n.y&&r<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(i=!i),n=n.next}while(n!==t);return i}(t,e)&&(So(t.prev,t,e.prev)||So(t,e.prev,e))||Mo(t,e)&&So(t.prev,t,t.next)>0&&So(e.prev,e,e.next)>0)}function So(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function Mo(t,e){return t.x===e.x&&t.y===e.y}function Eo(t,e,n,i){const r=Ao(So(t,e,n)),o=Ao(So(t,e,i)),s=Ao(So(n,i,t)),a=Ao(So(n,i,e));return r!==o&&s!==a||(!(0!==r||!To(t,n,e))||(!(0!==o||!To(t,i,e))||(!(0!==s||!To(n,t,i))||!(0!==a||!To(n,e,i)))))}function To(t,e,n){return e.x<=Math.max(t.x,n.x)&&e.x>=Math.min(t.x,n.x)&&e.y<=Math.max(t.y,n.y)&&e.y>=Math.min(t.y,n.y)}function Ao(t){return t>0?1:t<0?-1:0}function Lo(t,e){return So(t.prev,t,t.next)<0?So(t,e,t.next)>=0&&So(t,t.prev,e)>=0:So(t,e,t.prev)<0||So(t,t.next,e)<0}function Po(t,e){const n=new Oo(t.i,t.x,t.y),i=new Oo(e.i,e.x,e.y),r=t.next,o=e.prev;return t.next=e,e.prev=t,n.next=r,r.prev=n,i.next=n,n.prev=i,o.next=i,i.prev=o,i}function Co(t,e,n,i){const r=new Oo(t,e,n);return i?(r.next=i.next,r.prev=i,i.next.prev=r,i.next=r):(r.prev=r,r.next=r),r}function Ro(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function Oo(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}const Io={area:function(t){const e=t.length;let n=0;for(let i=e-1,r=0;r<e;i=r++)n+=t[i].x*t[r].y-t[r].x*t[i].y;return.5*n},isClockWise:function(t){return Io.area(t)<0},triangulateShape:function(t,e){const n=[],i=[],r=[];No(t),Do(n,t);let o=t.length;e.forEach(No);for(let t=0;t<e.length;t++)i.push(o),o+=e[t].length,Do(n,e[t]);const s=ao(n,i);for(let t=0;t<s.length;t+=3)r.push(s.slice(t,t+3));return r}};function No(t){const e=t.length;e>2&&t[e-1].equals(t[0])&&t.pop()}function Do(t,e){for(let n=0;n<e.length;n++)t.push(e[n].x),t.push(e[n].y)}class zo extends he{constructor(t,e){super(),this.type="ExtrudeBufferGeometry",this.parameters={shapes:t,options:e},t=Array.isArray(t)?t:[t];const n=this,i=[],r=[];for(let e=0,n=t.length;e<n;e++){o(t[e])}function o(t){const o=[],s=void 0!==e.curveSegments?e.curveSegments:12,a=void 0!==e.steps?e.steps:1;let c=void 0!==e.depth?e.depth:100,u=void 0===e.bevelEnabled||e.bevelEnabled,h=void 0!==e.bevelThickness?e.bevelThickness:6,d=void 0!==e.bevelSize?e.bevelSize:h-2,p=void 0!==e.bevelOffset?e.bevelOffset:0,f=void 0!==e.bevelSegments?e.bevelSegments:3;const m=e.extrudePath,g=void 0!==e.UVGenerator?e.UVGenerator:ko;void 0!==e.amount&&(console.warn("THREE.ExtrudeBufferGeometry: amount has been renamed to depth."),c=e.amount);let v,b,x,w,_,S=!1;m&&(v=m.getSpacedPoints(a),S=!0,u=!1,b=m.computeFrenetFrames(a,!1),x=new y,w=new y,_=new y),u||(f=0,h=0,d=0,p=0);const M=t.extractPoints(s);let E=M.shape;const T=M.holes;if(!Io.isClockWise(E)){E=E.reverse();for(let t=0,e=T.length;t<e;t++){const e=T[t];Io.isClockWise(e)&&(T[t]=e.reverse())}}const A=Io.triangulateShape(E,T),L=E;for(let t=0,e=T.length;t<e;t++){const e=T[t];E=E.concat(e)}function P(t,e,n){return e||console.error("THREE.ExtrudeGeometry: vec does not exist"),e.clone().multiplyScalar(n).add(t)}const C=E.length,R=A.length;function O(t,e,n){let i,r,o;const s=t.x-e.x,a=t.y-e.y,c=n.x-t.x,u=n.y-t.y,h=s*s+a*a,d=s*u-a*c;if(Math.abs(d)>Number.EPSILON){const d=Math.sqrt(h),p=Math.sqrt(c*c+u*u),f=e.x-a/d,m=e.y+s/d,g=((n.x-u/p-f)*u-(n.y+c/p-m)*c)/(s*u-a*c);i=f+s*g-t.x,r=m+a*g-t.y;const v=i*i+r*r;if(v<=2)return new l(i,r);o=Math.sqrt(v/2)}else{let t=!1;s>Number.EPSILON?c>Number.EPSILON&&(t=!0):s<-Number.EPSILON?c<-Number.EPSILON&&(t=!0):Math.sign(a)===Math.sign(u)&&(t=!0),t?(i=-a,r=s,o=Math.sqrt(h)):(i=s,r=a,o=Math.sqrt(h/2))}return new l(i/o,r/o)}const I=[];for(let t=0,e=L.length,n=e-1,i=t+1;t<e;t++,n++,i++)n===e&&(n=0),i===e&&(i=0),I[t]=O(L[t],L[n],L[i]);const N=[];let D,z=I.concat();for(let t=0,e=T.length;t<e;t++){const e=T[t];D=[];for(let t=0,n=e.length,i=n-1,r=t+1;t<n;t++,i++,r++)i===n&&(i=0),r===n&&(r=0),D[t]=O(e[t],e[i],e[r]);N.push(D),z=z.concat(D)}for(let t=0;t<f;t++){const e=t/f,n=h*Math.cos(e*Math.PI/2),i=d*Math.sin(e*Math.PI/2)+p;for(let t=0,e=L.length;t<e;t++){const e=P(L[t],I[t],i);F(e.x,e.y,-n)}for(let t=0,e=T.length;t<e;t++){const e=T[t];D=N[t];for(let t=0,r=e.length;t<r;t++){const r=P(e[t],D[t],i);F(r.x,r.y,-n)}}}const k=d+p;for(let t=0;t<C;t++){const e=u?P(E[t],z[t],k):E[t];S?(w.copy(b.normals[0]).multiplyScalar(e.x),x.copy(b.binormals[0]).multiplyScalar(e.y),_.copy(v[0]).add(w).add(x),F(_.x,_.y,_.z)):F(e.x,e.y,0)}for(let t=1;t<=a;t++)for(let e=0;e<C;e++){const n=u?P(E[e],z[e],k):E[e];S?(w.copy(b.normals[t]).multiplyScalar(n.x),x.copy(b.binormals[t]).multiplyScalar(n.y),_.copy(v[t]).add(w).add(x),F(_.x,_.y,_.z)):F(n.x,n.y,c/a*t)}for(let t=f-1;t>=0;t--){const e=t/f,n=h*Math.cos(e*Math.PI/2),i=d*Math.sin(e*Math.PI/2)+p;for(let t=0,e=L.length;t<e;t++){const e=P(L[t],I[t],i);F(e.x,e.y,c+n)}for(let t=0,e=T.length;t<e;t++){const e=T[t];D=N[t];for(let t=0,r=e.length;t<r;t++){const r=P(e[t],D[t],i);S?F(r.x,r.y+v[a-1].y,v[a-1].x+n):F(r.x,r.y,c+n)}}}function B(t,e){let n=t.length;for(;--n>=0;){const i=n;let r=n-1;r<0&&(r=t.length-1);for(let t=0,n=a+2*f;t<n;t++){const n=C*t,o=C*(t+1);j(e+i+n,e+r+n,e+r+o,e+i+o)}}}function F(t,e,n){o.push(t),o.push(e),o.push(n)}function U(t,e,r){H(t),H(e),H(r);const o=i.length/3,s=g.generateTopUV(n,i,o-3,o-2,o-1);G(s[0]),G(s[1]),G(s[2])}function j(t,e,r,o){H(t),H(e),H(o),H(e),H(r),H(o);const s=i.length/3,a=g.generateSideWallUV(n,i,s-6,s-3,s-2,s-1);G(a[0]),G(a[1]),G(a[3]),G(a[1]),G(a[2]),G(a[3])}function H(t){i.push(o[3*t+0]),i.push(o[3*t+1]),i.push(o[3*t+2])}function G(t){r.push(t.x),r.push(t.y)}!function(){const t=i.length/3;if(u){let t=0,e=C*t;for(let t=0;t<R;t++){const n=A[t];U(n[2]+e,n[1]+e,n[0]+e)}t=a+2*f,e=C*t;for(let t=0;t<R;t++){const n=A[t];U(n[0]+e,n[1]+e,n[2]+e)}}else{for(let t=0;t<R;t++){const e=A[t];U(e[2],e[1],e[0])}for(let t=0;t<R;t++){const e=A[t];U(e[0]+C*a,e[1]+C*a,e[2]+C*a)}}n.addGroup(t,i.length/3-t,0)}(),function(){const t=i.length/3;let e=0;B(L,e),e+=L.length;for(let t=0,n=T.length;t<n;t++){const n=T[t];B(n,e),e+=n.length}n.addGroup(t,i.length/3-t,1)}()}this.setAttribute("position",new te(i,3)),this.setAttribute("uv",new te(r,2)),this.computeVertexNormals()}toJSON(){const t=he.prototype.toJSON.call(this);return function(t,e,n){if(n.shapes=[],Array.isArray(t))for(let e=0,i=t.length;e<i;e++){const i=t[e];n.shapes.push(i.uuid)}else n.shapes.push(t.uuid);void 0!==e.extrudePath&&(n.options.extrudePath=e.extrudePath.toJSON());return n}(this.parameters.shapes,this.parameters.options,t)}}const ko={generateTopUV:function(t,e,n,i,r){const o=e[3*n],s=e[3*n+1],a=e[3*i],c=e[3*i+1],u=e[3*r],h=e[3*r+1];return[new l(o,s),new l(a,c),new l(u,h)]},generateSideWallUV:function(t,e,n,i,r,o){const s=e[3*n],a=e[3*n+1],c=e[3*n+2],u=e[3*i],h=e[3*i+1],d=e[3*i+2],p=e[3*r],f=e[3*r+1],m=e[3*r+2],g=e[3*o],v=e[3*o+1],y=e[3*o+2];return Math.abs(a-h)<.01?[new l(s,1-c),new l(u,1-d),new l(p,1-m),new l(g,1-y)]:[new l(a,1-c),new l(h,1-d),new l(f,1-m),new l(v,1-y)]}};class Bo extends so{constructor(t,e){super(),this.type="ExtrudeGeometry",this.parameters={shapes:t,options:e},this.fromBufferGeometry(new zo(t,e)),this.mergeVertices()}toJSON(){const t=super.toJSON();return function(t,e,n){if(n.shapes=[],Array.isArray(t))for(let e=0,i=t.length;e<i;e++){const i=t[e];n.shapes.push(i.uuid)}else n.shapes.push(t.uuid);void 0!==e.extrudePath&&(n.options.extrudePath=e.extrudePath.toJSON());return n}(this.parameters.shapes,this.parameters.options,t)}}function Fo(t,e,n){he.call(this),this.type="ParametricBufferGeometry",this.parameters={func:t,slices:e,stacks:n};const i=[],r=[],o=[],s=[],a=1e-5,l=new y,c=new y,u=new y,h=new y,d=new y;t.length<3&&console.error("THREE.ParametricGeometry: Function must now modify a Vector3 as third parameter.");const p=e+1;for(let i=0;i<=n;i++){const p=i/n;for(let n=0;n<=e;n++){const i=n/e;t(i,p,c),r.push(c.x,c.y,c.z),i-a>=0?(t(i-a,p,u),h.subVectors(c,u)):(t(i+a,p,u),h.subVectors(u,c)),p-a>=0?(t(i,p-a,u),d.subVectors(c,u)):(t(i,p+a,u),d.subVectors(u,c)),l.crossVectors(h,d).normalize(),o.push(l.x,l.y,l.z),s.push(i,p)}}for(let t=0;t<n;t++)for(let n=0;n<e;n++){const e=t*p+n,r=t*p+n+1,o=(t+1)*p+n+1,s=(t+1)*p+n;i.push(e,r,s),i.push(r,o,s)}this.setIndex(i),this.setAttribute("position",new te(r,3)),this.setAttribute("normal",new te(o,3)),this.setAttribute("uv",new te(s,2))}function Uo(t,e,n){so.call(this),this.type="ParametricGeometry",this.parameters={func:t,slices:e,stacks:n},this.fromBufferGeometry(new Fo(t,e,n)),this.mergeVertices()}Fo.prototype=Object.create(he.prototype),Fo.prototype.constructor=Fo,Uo.prototype=Object.create(so.prototype),Uo.prototype.constructor=Uo;class jo extends he{constructor(t,e){super(),this.type="ShapeBufferGeometry",this.parameters={shapes:t,curveSegments:e},e=e||12;const n=[],i=[],r=[],o=[];let s=0,a=0;if(!1===Array.isArray(t))l(t);else for(let e=0;e<t.length;e++)l(t[e]),this.addGroup(s,a,e),s+=a,a=0;function l(t){const s=i.length/3,l=t.extractPoints(e);let c=l.shape;const u=l.holes;!1===Io.isClockWise(c)&&(c=c.reverse());for(let t=0,e=u.length;t<e;t++){const e=u[t];!0===Io.isClockWise(e)&&(u[t]=e.reverse())}const h=Io.triangulateShape(c,u);for(let t=0,e=u.length;t<e;t++){const e=u[t];c=c.concat(e)}for(let t=0,e=c.length;t<e;t++){const e=c[t];i.push(e.x,e.y,0),r.push(0,0,1),o.push(e.x,e.y)}for(let t=0,e=h.length;t<e;t++){const e=h[t],i=e[0]+s,r=e[1]+s,o=e[2]+s;n.push(i,r,o),a+=3}}this.setIndex(n),this.setAttribute("position",new te(i,3)),this.setAttribute("normal",new te(r,3)),this.setAttribute("uv",new te(o,2))}toJSON(){const t=he.prototype.toJSON.call(this);return function(t,e){if(e.shapes=[],Array.isArray(t))for(let n=0,i=t.length;n<i;n++){const i=t[n];e.shapes.push(i.uuid)}else e.shapes.push(t.uuid);return e}(this.parameters.shapes,t)}}class Ho extends so{constructor(t,e){super(),this.type="ShapeGeometry","object"==typeof e&&(console.warn("THREE.ShapeGeometry: Options parameter has been removed."),e=e.curveSegments),this.parameters={shapes:t,curveSegments:e},this.fromBufferGeometry(new jo(t,e)),this.mergeVertices()}toJSON(){const t=so.prototype.toJSON.call(this);return function(t,e){if(e.shapes=[],Array.isArray(t))for(let n=0,i=t.length;n<i;n++){const i=t[n];e.shapes.push(i.uuid)}else e.shapes.push(t.uuid);return e}(this.parameters.shapes,t)}}function Go(t){Ht.call(this),this.type="ShadowMaterial",this.color=new Ft(0),this.transparent=!0,this.setValues(t)}function Vo(t){ze.call(this,t),this.type="RawShaderMaterial"}function Wo(t){Ht.call(this),this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new Ft(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 Ft(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new l(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapIntensity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.vertexTangents=!1,this.setValues(t)}function qo(t){Wo.call(this),this.defines={STANDARD:"",PHYSICAL:""},this.type="MeshPhysicalMaterial",this.clearcoat=0,this.clearcoatMap=null,this.clearcoatRoughness=0,this.clearcoatRoughnessMap=null,this.clearcoatNormalScale=new l(1,1),this.clearcoatNormalMap=null,this.reflectivity=.5,Object.defineProperty(this,"ior",{get:function(){return(1+.4*this.reflectivity)/(1-.4*this.reflectivity)},set:function(t){this.reflectivity=a.clamp(2.5*(t-1)/(t+1),0,1)}}),this.sheen=null,this.transmission=0,this.transmissionMap=null,this.setValues(t)}function Xo(t){Ht.call(this),this.type="MeshPhongMaterial",this.color=new Ft(16777215),this.specular=new Ft(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Ft(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new l(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=0,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function Yo(t){Ht.call(this),this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new Ft(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Ft(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new l(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function Zo(t){Ht.call(this),this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new l(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function Jo(t){Ht.call(this),this.type="MeshLambertMaterial",this.color=new Ft(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Ft(0),this.emissiveIntensity=1,this.emissiveMap=null,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=0,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function Ko(t){Ht.call(this),this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new Ft(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new l(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function $o(t){Nr.call(this),this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(t)}Go.prototype=Object.create(Ht.prototype),Go.prototype.constructor=Go,Go.prototype.isShadowMaterial=!0,Go.prototype.copy=function(t){return Ht.prototype.copy.call(this,t),this.color.copy(t.color),this},Vo.prototype=Object.create(ze.prototype),Vo.prototype.constructor=Vo,Vo.prototype.isRawShaderMaterial=!0,Wo.prototype=Object.create(Ht.prototype),Wo.prototype.constructor=Wo,Wo.prototype.isMeshStandardMaterial=!0,Wo.prototype.copy=function(t){return Ht.prototype.copy.call(this,t),this.defines={STANDARD:""},this.color.copy(t.color),this.roughness=t.roughness,this.metalness=t.metalness,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.roughnessMap=t.roughnessMap,this.metalnessMap=t.metalnessMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.envMapIntensity=t.envMapIntensity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this.vertexTangents=t.vertexTangents,this},qo.prototype=Object.create(Wo.prototype),qo.prototype.constructor=qo,qo.prototype.isMeshPhysicalMaterial=!0,qo.prototype.copy=function(t){return Wo.prototype.copy.call(this,t),this.defines={STANDARD:"",PHYSICAL:""},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.reflectivity=t.reflectivity,t.sheen?this.sheen=(this.sheen||new Ft).copy(t.sheen):this.sheen=null,this.transmission=t.transmission,this.transmissionMap=t.transmissionMap,this},Xo.prototype=Object.create(Ht.prototype),Xo.prototype.constructor=Xo,Xo.prototype.isMeshPhongMaterial=!0,Xo.prototype.copy=function(t){return Ht.prototype.copy.call(this,t),this.color.copy(t.color),this.specular.copy(t.specular),this.shininess=t.shininess,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},Yo.prototype=Object.create(Ht.prototype),Yo.prototype.constructor=Yo,Yo.prototype.isMeshToonMaterial=!0,Yo.prototype.copy=function(t){return Ht.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.gradientMap=t.gradientMap,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.alphaMap=t.alphaMap,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},Zo.prototype=Object.create(Ht.prototype),Zo.prototype.constructor=Zo,Zo.prototype.isMeshNormalMaterial=!0,Zo.prototype.copy=function(t){return Ht.prototype.copy.call(this,t),this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},Jo.prototype=Object.create(Ht.prototype),Jo.prototype.constructor=Jo,Jo.prototype.isMeshLambertMaterial=!0,Jo.prototype.copy=function(t){return Ht.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},Ko.prototype=Object.create(Ht.prototype),Ko.prototype.constructor=Ko,Ko.prototype.isMeshMatcapMaterial=!0,Ko.prototype.copy=function(t){return Ht.prototype.copy.call(this,t),this.defines={MATCAP:""},this.color.copy(t.color),this.matcap=t.matcap,this.map=t.map,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.alphaMap=t.alphaMap,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},$o.prototype=Object.create(Nr.prototype),$o.prototype.constructor=$o,$o.prototype.isLineDashedMaterial=!0,$o.prototype.copy=function(t){return Nr.prototype.copy.call(this,t),this.scale=t.scale,this.dashSize=t.dashSize,this.gapSize=t.gapSize,this};var Qo=Object.freeze({__proto__:null,ShadowMaterial:Go,SpriteMaterial:or,RawShaderMaterial:Vo,ShaderMaterial:ze,PointsMaterial:Wr,MeshPhysicalMaterial:qo,MeshStandardMaterial:Wo,MeshPhongMaterial:Xo,MeshToonMaterial:Yo,MeshNormalMaterial:Zo,MeshLambertMaterial:Jo,MeshDepthMaterial:Hi,MeshDistanceMaterial:Gi,MeshBasicMaterial:Gt,MeshMatcapMaterial:Ko,LineDashedMaterial:$o,LineBasicMaterial:Nr,Material:Ht});const ts={arraySlice:function(t,e,n){return ts.isTypedArray(t)?new t.constructor(t.subarray(e,void 0!==n?n:t.length)):t.slice(e,n)},convertArray:function(t,e,n){return!t||!n&&t.constructor===e?t:"number"==typeof e.BYTES_PER_ELEMENT?new e(t):Array.prototype.slice.call(t)},isTypedArray:function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)},getKeyframeOrder:function(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},sortedArray:function(t,e,n){const i=t.length,r=new t.constructor(i);for(let o=0,s=0;s!==i;++o){const i=n[o]*e;for(let n=0;n!==e;++n)r[s++]=t[i+n]}return r},flattenJSON:function(t,e,n,i){let r=1,o=t[0];for(;void 0!==o&&void 0===o[i];)o=t[r++];if(void 0===o)return;let s=o[i];if(void 0!==s)if(Array.isArray(s))do{s=o[i],void 0!==s&&(e.push(o.time),n.push.apply(n,s)),o=t[r++]}while(void 0!==o);else if(void 0!==s.toArray)do{s=o[i],void 0!==s&&(e.push(o.time),s.toArray(n,n.length)),o=t[r++]}while(void 0!==o);else do{s=o[i],void 0!==s&&(e.push(o.time),n.push(s)),o=t[r++]}while(void 0!==o)},subclip:function(t,e,n,i,r){r=r||30;const o=t.clone();o.name=e;const s=[];for(let t=0;t<o.tracks.length;++t){const e=o.tracks[t],a=e.getValueSize(),l=[],c=[];for(let t=0;t<e.times.length;++t){const o=e.times[t]*r;if(!(o<n||o>=i)){l.push(e.times[t]);for(let n=0;n<a;++n)c.push(e.values[t*a+n])}}0!==l.length&&(e.times=ts.convertArray(l,e.times.constructor),e.values=ts.convertArray(c,e.values.constructor),s.push(e))}o.tracks=s;let a=1/0;for(let t=0;t<o.tracks.length;++t)a>o.tracks[t].times[0]&&(a=o.tracks[t].times[0]);for(let t=0;t<o.tracks.length;++t)o.tracks[t].shift(-1*a);return o.resetDuration(),o},makeClipAdditive:function(t,e,n,i){void 0===e&&(e=0),void 0===n&&(n=t),(void 0===i||i<=0)&&(i=30);const r=n.tracks.length,o=e/i;for(let e=0;e<r;++e){const i=n.tracks[e],r=i.ValueTypeName;if("bool"===r||"string"===r)continue;const s=t.tracks.find((function(t){return t.name===i.name&&t.ValueTypeName===r}));if(void 0===s)continue;let a=0;const l=i.getValueSize();i.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(a=l/3);let c=0;const u=s.getValueSize();s.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(c=u/3);const h=i.times.length-1;let d;if(o<=i.times[0]){const t=a,e=l-a;d=ts.arraySlice(i.values,t,e)}else if(o>=i.times[h]){const t=h*l+a,e=t+l-a;d=ts.arraySlice(i.values,t,e)}else{const t=i.createInterpolant(),e=a,n=l-a;t.evaluate(o),d=ts.arraySlice(t.resultBuffer,e,n)}if("quaternion"===r){(new v).fromArray(d).normalize().conjugate().toArray(d)}const p=s.times.length;for(let t=0;t<p;++t){const e=t*u+c;if("quaternion"===r)v.multiplyQuaternionsFlat(s.values,e,d,0,s.values,e);else{const t=u-2*c;for(let n=0;n<t;++n)s.values[e+n]-=d[n]}}}return t.blendMode=2501,t}};function es(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}function ns(t,e,n,i){es.call(this,t,e,n,i),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0}function is(t,e,n,i){es.call(this,t,e,n,i)}function rs(t,e,n,i){es.call(this,t,e,n,i)}function os(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=ts.convertArray(e,this.TimeBufferType),this.values=ts.convertArray(n,this.ValueBufferType),this.setInterpolation(i||this.DefaultInterpolation)}function ss(t,e,n){os.call(this,t,e,n)}function as(t,e,n,i){os.call(this,t,e,n,i)}function ls(t,e,n,i){os.call(this,t,e,n,i)}function cs(t,e,n,i){es.call(this,t,e,n,i)}function us(t,e,n,i){os.call(this,t,e,n,i)}function hs(t,e,n,i){os.call(this,t,e,n,i)}function ds(t,e,n,i){os.call(this,t,e,n,i)}function ps(t,e,n,i){this.name=t,this.tracks=n,this.duration=void 0!==e?e:-1,this.blendMode=void 0!==i?i:2500,this.uuid=a.generateUUID(),this.duration<0&&this.resetDuration()}function fs(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 ls;case"vector":case"vector2":case"vector3":case"vector4":return ds;case"color":return as;case"quaternion":return us;case"bool":case"boolean":return ss;case"string":return hs}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+t)}(t.type);if(void 0===t.times){const e=[],n=[];ts.flattenJSON(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)}Object.assign(es.prototype,{evaluate:function(t){const e=this.parameterPositions;let n=this._cachedIndex,i=e[n],r=e[n-1];t:{e:{let o;n:{i:if(!(t<i)){for(let o=n+2;;){if(void 0===i){if(t<r)break i;return n=e.length,this._cachedIndex=n,this.afterEnd_(n-1,t,r)}if(n===o)break;if(r=i,i=e[++n],t<i)break e}o=e.length;break n}if(t>=r)break t;{const s=e[1];t<s&&(n=2,r=s);for(let o=n-2;;){if(void 0===r)return this._cachedIndex=0,this.beforeStart_(0,t,i);if(n===o)break;if(i=r,r=e[--n-1],t>=r)break e}o=n,n=0}}for(;n<o;){const i=n+o>>>1;t<e[i]?o=i:n=i+1}if(i=e[n],r=e[n-1],void 0===r)return this._cachedIndex=0,this.beforeStart_(0,t,i);if(void 0===i)return n=e.length,this._cachedIndex=n,this.afterEnd_(n-1,r,t)}this._cachedIndex=n,this.intervalChanged_(n,r,i)}return this.interpolate_(n,r,t,i)},settings:null,DefaultSettings_:{},getSettings_:function(){return this.settings||this.DefaultSettings_},copySampleValue_:function(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_:function(){throw new Error("call to abstract method")},intervalChanged_:function(){}}),Object.assign(es.prototype,{beforeStart_:es.prototype.copySampleValue_,afterEnd_:es.prototype.copySampleValue_}),ns.prototype=Object.assign(Object.create(es.prototype),{constructor:ns,DefaultSettings_:{endingStart:2400,endingEnd:2400},intervalChanged_:function(t,e,n){const i=this.parameterPositions;let r=t-2,o=t+1,s=i[r],a=i[o];if(void 0===s)switch(this.getSettings_().endingStart){case 2401:r=t,s=2*e-n;break;case 2402:r=i.length-2,s=e+i[r]-i[r+1];break;default:r=t,s=n}if(void 0===a)switch(this.getSettings_().endingEnd){case 2401:o=t,a=2*n-e;break;case 2402:o=1,a=n+i[1]-i[0];break;default:o=t-1,a=e}const l=.5*(n-e),c=this.valueSize;this._weightPrev=l/(e-s),this._weightNext=l/(a-n),this._offsetPrev=r*c,this._offsetNext=o*c},interpolate_:function(t,e,n,i){const r=this.resultBuffer,o=this.sampleValues,s=this.valueSize,a=t*s,l=a-s,c=this._offsetPrev,u=this._offsetNext,h=this._weightPrev,d=this._weightNext,p=(n-e)/(i-e),f=p*p,m=f*p,g=-h*m+2*h*f-h*p,v=(1+h)*m+(-1.5-2*h)*f+(-.5+h)*p+1,y=(-1-d)*m+(1.5+d)*f+.5*p,b=d*m-d*f;for(let t=0;t!==s;++t)r[t]=g*o[c+t]+v*o[l+t]+y*o[a+t]+b*o[u+t];return r}}),is.prototype=Object.assign(Object.create(es.prototype),{constructor:is,interpolate_:function(t,e,n,i){const r=this.resultBuffer,o=this.sampleValues,s=this.valueSize,a=t*s,l=a-s,c=(n-e)/(i-e),u=1-c;for(let t=0;t!==s;++t)r[t]=o[l+t]*u+o[a+t]*c;return r}}),rs.prototype=Object.assign(Object.create(es.prototype),{constructor:rs,interpolate_:function(t){return this.copySampleValue_(t-1)}}),Object.assign(os,{toJSON:function(t){const e=t.constructor;let n;if(void 0!==e.toJSON)n=e.toJSON(t);else{n={name:t.name,times:ts.convertArray(t.times,Array),values:ts.convertArray(t.values,Array)};const e=t.getInterpolation();e!==t.DefaultInterpolation&&(n.interpolation=e)}return n.type=t.ValueTypeName,n}}),Object.assign(os.prototype,{constructor:os,TimeBufferType:Float32Array,ValueBufferType:Float32Array,DefaultInterpolation:2301,InterpolantFactoryMethodDiscrete:function(t){return new rs(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodLinear:function(t){return new is(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodSmooth:function(t){return new ns(this.times,this.values,this.getValueSize(),t)},setInterpolation:function(t){let e;switch(t){case 2300:e=this.InterpolantFactoryMethodDiscrete;break;case 2301:e=this.InterpolantFactoryMethodLinear;break;case 2302:e=this.InterpolantFactoryMethodSmooth}if(void 0===e){const e="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(void 0===this.createInterpolant){if(t===this.DefaultInterpolation)throw new Error(e);this.setInterpolation(this.DefaultInterpolation)}return console.warn("THREE.KeyframeTrack:",e),this}return this.createInterpolant=e,this},getInterpolation:function(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return 2300;case this.InterpolantFactoryMethodLinear:return 2301;case this.InterpolantFactoryMethodSmooth:return 2302}},getValueSize:function(){return this.values.length/this.times.length},shift:function(t){if(0!==t){const e=this.times;for(let n=0,i=e.length;n!==i;++n)e[n]+=t}return this},scale:function(t){if(1!==t){const e=this.times;for(let n=0,i=e.length;n!==i;++n)e[n]*=t}return this},trim:function(t,e){const n=this.times,i=n.length;let r=0,o=i-1;for(;r!==i&&n[r]<t;)++r;for(;-1!==o&&n[o]>e;)--o;if(++o,0!==r||o!==i){r>=o&&(o=Math.max(o,1),r=o-1);const t=this.getValueSize();this.times=ts.arraySlice(n,r,o),this.values=ts.arraySlice(this.values,r*t,o*t)}return this},validate:function(){let t=!0;const e=this.getValueSize();e-Math.floor(e)!=0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),t=!1);const n=this.times,i=this.values,r=n.length;0===r&&(console.error("THREE.KeyframeTrack: Track is empty.",this),t=!1);let o=null;for(let e=0;e!==r;e++){const i=n[e];if("number"==typeof i&&isNaN(i)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,e,i),t=!1;break}if(null!==o&&o>i){console.error("THREE.KeyframeTrack: Out of order keys.",this,e,i,o),t=!1;break}o=i}if(void 0!==i&&ts.isTypedArray(i))for(let e=0,n=i.length;e!==n;++e){const n=i[e];if(isNaN(n)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,e,n),t=!1;break}}return t},optimize:function(){const t=ts.arraySlice(this.times),e=ts.arraySlice(this.values),n=this.getValueSize(),i=2302===this.getInterpolation(),r=t.length-1;let o=1;for(let s=1;s<r;++s){let r=!1;const a=t[s];if(a!==t[s+1]&&(1!==s||a!==a[0]))if(i)r=!0;else{const t=s*n,i=t-n,o=t+n;for(let s=0;s!==n;++s){const n=e[t+s];if(n!==e[i+s]||n!==e[o+s]){r=!0;break}}}if(r){if(s!==o){t[o]=t[s];const i=s*n,r=o*n;for(let t=0;t!==n;++t)e[r+t]=e[i+t]}++o}}if(r>0){t[o]=t[r];for(let t=r*n,i=o*n,s=0;s!==n;++s)e[i+s]=e[t+s];++o}return o!==t.length?(this.times=ts.arraySlice(t,0,o),this.values=ts.arraySlice(e,0,o*n)):(this.times=t,this.values=e),this},clone:function(){const t=ts.arraySlice(this.times,0),e=ts.arraySlice(this.values,0),n=new(0,this.constructor)(this.name,t,e);return n.createInterpolant=this.createInterpolant,n}}),ss.prototype=Object.assign(Object.create(os.prototype),{constructor:ss,ValueTypeName:"bool",ValueBufferType:Array,DefaultInterpolation:2300,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),as.prototype=Object.assign(Object.create(os.prototype),{constructor:as,ValueTypeName:"color"}),ls.prototype=Object.assign(Object.create(os.prototype),{constructor:ls,ValueTypeName:"number"}),cs.prototype=Object.assign(Object.create(es.prototype),{constructor:cs,interpolate_:function(t,e,n,i){const r=this.resultBuffer,o=this.sampleValues,s=this.valueSize,a=(n-e)/(i-e);let l=t*s;for(let t=l+s;l!==t;l+=4)v.slerpFlat(r,0,o,l-s,o,l,a);return r}}),us.prototype=Object.assign(Object.create(os.prototype),{constructor:us,ValueTypeName:"quaternion",DefaultInterpolation:2301,InterpolantFactoryMethodLinear:function(t){return new cs(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodSmooth:void 0}),hs.prototype=Object.assign(Object.create(os.prototype),{constructor:hs,ValueTypeName:"string",ValueBufferType:Array,DefaultInterpolation:2300,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),ds.prototype=Object.assign(Object.create(os.prototype),{constructor:ds,ValueTypeName:"vector"}),Object.assign(ps,{parse:function(t){const e=[],n=t.tracks,i=1/(t.fps||1);for(let t=0,r=n.length;t!==r;++t)e.push(fs(n[t]).scale(i));return new ps(t.name,t.duration,e,t.blendMode)},toJSON:function(t){const e=[],n=t.tracks,i={name:t.name,duration:t.duration,tracks:e,uuid:t.uuid,blendMode:t.blendMode};for(let t=0,i=n.length;t!==i;++t)e.push(os.toJSON(n[t]));return i},CreateFromMorphTargetSequence:function(t,e,n,i){const r=e.length,o=[];for(let t=0;t<r;t++){let s=[],a=[];s.push((t+r-1)%r,t,(t+1)%r),a.push(0,1,0);const l=ts.getKeyframeOrder(s);s=ts.sortedArray(s,1,l),a=ts.sortedArray(a,1,l),i||0!==s[0]||(s.push(r),a.push(a[0])),o.push(new ls(".morphTargetInfluences["+e[t].name+"]",s,a).scale(1/n))}return new ps(t,-1,o)},findByName:function(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},CreateClipsFromMorphTargetSequences:function(t,e,n){const i={},r=/^([\w-]*?)([\d]+)$/;for(let e=0,n=t.length;e<n;e++){const n=t[e],o=n.name.match(r);if(o&&o.length>1){const t=o[1];let e=i[t];e||(i[t]=e=[]),e.push(n)}}const o=[];for(const t in i)o.push(ps.CreateFromMorphTargetSequence(t,i[t],e,n));return o},parseAnimation:function(t,e){if(!t)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const n=function(t,e,n,i,r){if(0!==n.length){const o=[],s=[];ts.flattenJSON(n,o,s,i),0!==o.length&&r.push(new t(e,o,s))}},i=[],r=t.name||"default",o=t.fps||30,s=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=[],o=[];for(let i=0;i!==r[e].morphTargets.length;++i){const i=r[e];t.push(i.time),o.push(i.morphTarget===n?1:0)}i.push(new ls(".morphTargetInfluence["+n+"]",t,o))}a=t.length*(o||1)}else{const o=".bones["+e[t].name+"]";n(ds,o+".position",r,"pos",i),n(us,o+".quaternion",r,"rot",i),n(ds,o+".scale",r,"scl",i)}}if(0===i.length)return null;return new ps(r,a,i,s)}}),Object.assign(ps.prototype,{resetDuration:function(){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:function(){for(let t=0;t<this.tracks.length;t++)this.tracks[t].trim(0,this.duration);return this},validate:function(){let t=!0;for(let e=0;e<this.tracks.length;e++)t=t&&this.tracks[e].validate();return t},optimize:function(){for(let t=0;t<this.tracks.length;t++)this.tracks[t].optimize();return this},clone:function(){const t=[];for(let e=0;e<this.tracks.length;e++)t.push(this.tracks[e].clone());return new ps(this.name,this.duration,t,this.blendMode)}});const ms={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={}}};function gs(t,e,n){const i=this;let r=!1,o=0,s=0,a=void 0;const l=[];this.onStart=void 0,this.onLoad=t,this.onProgress=e,this.onError=n,this.itemStart=function(t){s++,!1===r&&void 0!==i.onStart&&i.onStart(t,o,s),r=!0},this.itemEnd=function(t){o++,void 0!==i.onProgress&&i.onProgress(t,o,s),o===s&&(r=!1,void 0!==i.onLoad&&i.onLoad())},this.itemError=function(t){void 0!==i.onError&&i.onError(t)},this.resolveURL=function(t){return a?a(t):t},this.setURLModifier=function(t){return a=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}}const vs=new gs;function ys(t){this.manager=void 0!==t?t:vs,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={}}Object.assign(ys.prototype,{load:function(){},loadAsync:function(t,e){const n=this;return new Promise((function(i,r){n.load(t,i,e,r)}))},parse:function(){},setCrossOrigin:function(t){return this.crossOrigin=t,this},setWithCredentials:function(t){return this.withCredentials=t,this},setPath:function(t){return this.path=t,this},setResourcePath:function(t){return this.resourcePath=t,this},setRequestHeader:function(t){return this.requestHeader=t,this}});const bs={};function xs(t){ys.call(this,t)}function ws(t){ys.call(this,t)}function _s(t){ys.call(this,t)}function Ss(t){ys.call(this,t)}function Ms(t){ys.call(this,t)}function Es(t){ys.call(this,t)}function Ts(t){ys.call(this,t)}function As(){this.type="Curve",this.arcLengthDivisions=200}function Ls(t,e,n,i,r,o,s,a){As.call(this),this.type="EllipseCurve",this.aX=t||0,this.aY=e||0,this.xRadius=n||1,this.yRadius=i||1,this.aStartAngle=r||0,this.aEndAngle=o||2*Math.PI,this.aClockwise=s||!1,this.aRotation=a||0}function Ps(t,e,n,i,r,o){Ls.call(this,t,e,n,n,i,r,o),this.type="ArcCurve"}function Cs(){let t=0,e=0,n=0,i=0;function r(r,o,s,a){t=r,e=s,n=-3*r+3*o-2*s-a,i=2*r-2*o+s+a}return{initCatmullRom:function(t,e,n,i,o){r(e,n,o*(n-t),o*(i-e))},initNonuniformCatmullRom:function(t,e,n,i,o,s,a){let l=(e-t)/o-(n-t)/(o+s)+(n-e)/s,c=(n-e)/s-(i-e)/(s+a)+(i-n)/a;l*=s,c*=s,r(e,n,l,c)},calc:function(r){const o=r*r;return t+e*r+n*o+i*(o*r)}}}xs.prototype=Object.assign(Object.create(ys.prototype),{constructor:xs,load:function(t,e,n,i){void 0===t&&(t=""),void 0!==this.path&&(t=this.path+t),t=this.manager.resolveURL(t);const r=this,o=ms.get(t);if(void 0!==o)return r.manager.itemStart(t),setTimeout((function(){e&&e(o),r.manager.itemEnd(t)}),0),o;if(void 0!==bs[t])return void bs[t].push({onLoad:e,onProgress:n,onError:i});const s=t.match(/^data:(.*?)(;base64)?,(.*)$/);let a;if(s){const n=s[1],o=!!s[2];let a=s[3];a=decodeURIComponent(a),o&&(a=atob(a));try{let i;const o=(this.responseType||"").toLowerCase();switch(o){case"arraybuffer":case"blob":const t=new Uint8Array(a.length);for(let e=0;e<a.length;e++)t[e]=a.charCodeAt(e);i="blob"===o?new Blob([t.buffer],{type:n}):t.buffer;break;case"document":const e=new DOMParser;i=e.parseFromString(a,n);break;case"json":i=JSON.parse(a);break;default:i=a}setTimeout((function(){e&&e(i),r.manager.itemEnd(t)}),0)}catch(e){setTimeout((function(){i&&i(e),r.manager.itemError(t),r.manager.itemEnd(t)}),0)}}else{bs[t]=[],bs[t].push({onLoad:e,onProgress:n,onError:i}),a=new XMLHttpRequest,a.open("GET",t,!0),a.addEventListener("load",(function(e){const n=this.response,i=bs[t];if(delete bs[t],200===this.status||0===this.status){0===this.status&&console.warn("THREE.FileLoader: HTTP Status 0 received."),ms.add(t,n);for(let t=0,e=i.length;t<e;t++){const e=i[t];e.onLoad&&e.onLoad(n)}r.manager.itemEnd(t)}else{for(let t=0,n=i.length;t<n;t++){const n=i[t];n.onError&&n.onError(e)}r.manager.itemError(t),r.manager.itemEnd(t)}}),!1),a.addEventListener("progress",(function(e){const n=bs[t];for(let t=0,i=n.length;t<i;t++){const i=n[t];i.onProgress&&i.onProgress(e)}}),!1),a.addEventListener("error",(function(e){const n=bs[t];delete bs[t];for(let t=0,i=n.length;t<i;t++){const i=n[t];i.onError&&i.onError(e)}r.manager.itemError(t),r.manager.itemEnd(t)}),!1),a.addEventListener("abort",(function(e){const n=bs[t];delete bs[t];for(let t=0,i=n.length;t<i;t++){const i=n[t];i.onError&&i.onError(e)}r.manager.itemError(t),r.manager.itemEnd(t)}),!1),void 0!==this.responseType&&(a.responseType=this.responseType),void 0!==this.withCredentials&&(a.withCredentials=this.withCredentials),a.overrideMimeType&&a.overrideMimeType(void 0!==this.mimeType?this.mimeType:"text/plain");for(const t in this.requestHeader)a.setRequestHeader(t,this.requestHeader[t]);a.send(null)}return r.manager.itemStart(t),a},setResponseType:function(t){return this.responseType=t,this},setMimeType:function(t){return this.mimeType=t,this}}),ws.prototype=Object.assign(Object.create(ys.prototype),{constructor:ws,load:function(t,e,n,i){const r=this,o=new xs(r.manager);o.setPath(r.path),o.setRequestHeader(r.requestHeader),o.setWithCredentials(r.withCredentials),o.load(t,(function(n){try{e(r.parse(JSON.parse(n)))}catch(e){i?i(e):console.error(e),r.manager.itemError(t)}}),n,i)},parse:function(t){const e=[];for(let n=0;n<t.length;n++){const i=ps.parse(t[n]);e.push(i)}return e}}),_s.prototype=Object.assign(Object.create(ys.prototype),{constructor:_s,load:function(t,e,n,i){const r=this,o=[],s=new Qr;s.image=o;const a=new xs(this.manager);a.setPath(this.path),a.setResponseType("arraybuffer"),a.setRequestHeader(this.requestHeader),a.setWithCredentials(r.withCredentials);let l=0;function c(c){a.load(t[c],(function(t){const n=r.parse(t,!0);o[c]={width:n.width,height:n.height,format:n.format,mipmaps:n.mipmaps},l+=1,6===l&&(1===n.mipmapCount&&(s.minFilter=1006),s.format=n.format,s.needsUpdate=!0,e&&e(s))}),n,i)}if(Array.isArray(t))for(let e=0,n=t.length;e<n;++e)c(e);else a.load(t,(function(t){const n=r.parse(t,!0);if(n.isCubemap){const t=n.mipmaps.length/n.mipmapCount;for(let e=0;e<t;e++){o[e]={mipmaps:[]};for(let t=0;t<n.mipmapCount;t++)o[e].mipmaps.push(n.mipmaps[e*n.mipmapCount+t]),o[e].format=n.format,o[e].width=n.width,o[e].height=n.height}}else s.image.width=n.width,s.image.height=n.height,s.mipmaps=n.mipmaps;1===n.mipmapCount&&(s.minFilter=1006),s.format=n.format,s.needsUpdate=!0,e&&e(s)}),n,i);return s}}),Ss.prototype=Object.assign(Object.create(ys.prototype),{constructor:Ss,load:function(t,e,n,i){void 0!==this.path&&(t=this.path+t),t=this.manager.resolveURL(t);const r=this,o=ms.get(t);if(void 0!==o)return r.manager.itemStart(t),setTimeout((function(){e&&e(o),r.manager.itemEnd(t)}),0),o;const s=document.createElementNS("http://www.w3.org/1999/xhtml","img");function a(){s.removeEventListener("load",a,!1),s.removeEventListener("error",l,!1),ms.add(t,this),e&&e(this),r.manager.itemEnd(t)}function l(e){s.removeEventListener("load",a,!1),s.removeEventListener("error",l,!1),i&&i(e),r.manager.itemError(t),r.manager.itemEnd(t)}return s.addEventListener("load",a,!1),s.addEventListener("error",l,!1),"data:"!==t.substr(0,5)&&void 0!==this.crossOrigin&&(s.crossOrigin=this.crossOrigin),r.manager.itemStart(t),s.src=t,s}}),Ms.prototype=Object.assign(Object.create(ys.prototype),{constructor:Ms,load:function(t,e,n,i){const r=new Ue,o=new Ss(this.manager);o.setCrossOrigin(this.crossOrigin),o.setPath(this.path);let s=0;function a(n){o.load(t[n],(function(t){r.images[n]=t,s++,6===s&&(r.needsUpdate=!0,e&&e(r))}),void 0,i)}for(let e=0;e<t.length;++e)a(e);return r}}),Es.prototype=Object.assign(Object.create(ys.prototype),{constructor:Es,load:function(t,e,n,i){const r=this,o=new He,s=new xs(this.manager);return s.setResponseType("arraybuffer"),s.setRequestHeader(this.requestHeader),s.setPath(this.path),s.setWithCredentials(r.withCredentials),s.load(t,(function(t){const n=r.parse(t);n&&(void 0!==n.image?o.image=n.image:void 0!==n.data&&(o.image.width=n.width,o.image.height=n.height,o.image.data=n.data),o.wrapS=void 0!==n.wrapS?n.wrapS:1001,o.wrapT=void 0!==n.wrapT?n.wrapT:1001,o.magFilter=void 0!==n.magFilter?n.magFilter:1006,o.minFilter=void 0!==n.minFilter?n.minFilter:1006,o.anisotropy=void 0!==n.anisotropy?n.anisotropy:1,void 0!==n.format&&(o.format=n.format),void 0!==n.type&&(o.type=n.type),void 0!==n.mipmaps&&(o.mipmaps=n.mipmaps,o.minFilter=1008),1===n.mipmapCount&&(o.minFilter=1006),o.needsUpdate=!0,e&&e(o,n))}),n,i),o}}),Ts.prototype=Object.assign(Object.create(ys.prototype),{constructor:Ts,load:function(t,e,n,i){const r=new p,o=new Ss(this.manager);return o.setCrossOrigin(this.crossOrigin),o.setPath(this.path),o.load(t,(function(n){r.image=n;const i=t.search(/\.jpe?g($|\?)/i)>0||0===t.search(/^data\:image\/jpeg/);r.format=i?1022:1023,r.needsUpdate=!0,void 0!==e&&e(r)}),n,i),r}}),Object.assign(As.prototype,{getPoint:function(){return console.warn("THREE.Curve: .getPoint() not implemented."),null},getPointAt:function(t,e){const n=this.getUtoTmapping(t);return this.getPoint(n,e)},getPoints:function(t){void 0===t&&(t=5);const e=[];for(let n=0;n<=t;n++)e.push(this.getPoint(n/t));return e},getSpacedPoints:function(t){void 0===t&&(t=5);const e=[];for(let n=0;n<=t;n++)e.push(this.getPointAt(n/t));return e},getLength:function(){const t=this.getLengths();return t[t.length-1]},getLengths:function(t){if(void 0===t&&(t=this.arcLengthDivisions),this.cacheArcLengths&&this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;const e=[];let n,i=this.getPoint(0),r=0;e.push(0);for(let o=1;o<=t;o++)n=this.getPoint(o/t),r+=n.distanceTo(i),e.push(r),i=n;return this.cacheArcLengths=e,e},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()},getUtoTmapping:function(t,e){const n=this.getLengths();let i=0;const r=n.length;let o;o=e||t*n[r-1];let s,a=0,l=r-1;for(;a<=l;)if(i=Math.floor(a+(l-a)/2),s=n[i]-o,s<0)a=i+1;else{if(!(s>0)){l=i;break}l=i-1}if(i=l,n[i]===o)return i/(r-1);const c=n[i];return(i+(o-c)/(n[i+1]-c))/(r-1)},getTangent:function(t,e){let n=t-1e-4,i=t+1e-4;n<0&&(n=0),i>1&&(i=1);const r=this.getPoint(n),o=this.getPoint(i),s=e||(r.isVector2?new l:new y);return s.copy(o).sub(r).normalize(),s},getTangentAt:function(t,e){const n=this.getUtoTmapping(t);return this.getTangent(n,e)},computeFrenetFrames:function(t,e){const n=new y,i=[],r=[],o=[],s=new y,l=new q;for(let e=0;e<=t;e++){const n=e/t;i[e]=this.getTangentAt(n,new y),i[e].normalize()}r[0]=new y,o[0]=new y;let c=Number.MAX_VALUE;const u=Math.abs(i[0].x),h=Math.abs(i[0].y),d=Math.abs(i[0].z);u<=c&&(c=u,n.set(1,0,0)),h<=c&&(c=h,n.set(0,1,0)),d<=c&&n.set(0,0,1),s.crossVectors(i[0],n).normalize(),r[0].crossVectors(i[0],s),o[0].crossVectors(i[0],r[0]);for(let e=1;e<=t;e++){if(r[e]=r[e-1].clone(),o[e]=o[e-1].clone(),s.crossVectors(i[e-1],i[e]),s.length()>Number.EPSILON){s.normalize();const t=Math.acos(a.clamp(i[e-1].dot(i[e]),-1,1));r[e].applyMatrix4(l.makeRotationAxis(s,t))}o[e].crossVectors(i[e],r[e])}if(!0===e){let e=Math.acos(a.clamp(r[0].dot(r[t]),-1,1));e/=t,i[0].dot(s.crossVectors(r[0],r[t]))>0&&(e=-e);for(let n=1;n<=t;n++)r[n].applyMatrix4(l.makeRotationAxis(i[n],e*n)),o[n].crossVectors(i[n],r[n])}return{tangents:i,normals:r,binormals:o}},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.arcLengthDivisions=t.arcLengthDivisions,this},toJSON:function(){const t={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return t.arcLengthDivisions=this.arcLengthDivisions,t.type=this.type,t},fromJSON:function(t){return this.arcLengthDivisions=t.arcLengthDivisions,this}}),Ls.prototype=Object.create(As.prototype),Ls.prototype.constructor=Ls,Ls.prototype.isEllipseCurve=!0,Ls.prototype.getPoint=function(t,e){const n=e||new l,i=2*Math.PI;let r=this.aEndAngle-this.aStartAngle;const o=Math.abs(r)<Number.EPSILON;for(;r<0;)r+=i;for(;r>i;)r-=i;r<Number.EPSILON&&(r=o?0:i),!0!==this.aClockwise||o||(r===i?r=-i:r-=i);const s=this.aStartAngle+t*r;let a=this.aX+this.xRadius*Math.cos(s),c=this.aY+this.yRadius*Math.sin(s);if(0!==this.aRotation){const t=Math.cos(this.aRotation),e=Math.sin(this.aRotation),n=a-this.aX,i=c-this.aY;a=n*t-i*e+this.aX,c=n*e+i*t+this.aY}return n.set(a,c)},Ls.prototype.copy=function(t){return As.prototype.copy.call(this,t),this.aX=t.aX,this.aY=t.aY,this.xRadius=t.xRadius,this.yRadius=t.yRadius,this.aStartAngle=t.aStartAngle,this.aEndAngle=t.aEndAngle,this.aClockwise=t.aClockwise,this.aRotation=t.aRotation,this},Ls.prototype.toJSON=function(){const t=As.prototype.toJSON.call(this);return t.aX=this.aX,t.aY=this.aY,t.xRadius=this.xRadius,t.yRadius=this.yRadius,t.aStartAngle=this.aStartAngle,t.aEndAngle=this.aEndAngle,t.aClockwise=this.aClockwise,t.aRotation=this.aRotation,t},Ls.prototype.fromJSON=function(t){return As.prototype.fromJSON.call(this,t),this.aX=t.aX,this.aY=t.aY,this.xRadius=t.xRadius,this.yRadius=t.yRadius,this.aStartAngle=t.aStartAngle,this.aEndAngle=t.aEndAngle,this.aClockwise=t.aClockwise,this.aRotation=t.aRotation,this},Ps.prototype=Object.create(Ls.prototype),Ps.prototype.constructor=Ps,Ps.prototype.isArcCurve=!0;const Rs=new y,Os=new Cs,Is=new Cs,Ns=new Cs;function Ds(t,e,n,i){As.call(this),this.type="CatmullRomCurve3",this.points=t||[],this.closed=e||!1,this.curveType=n||"centripetal",this.tension=void 0!==i?i:.5}function zs(t,e,n,i,r){const o=.5*(i-e),s=.5*(r-n),a=t*t;return(2*n-2*i+o+s)*(t*a)+(-3*n+3*i-2*o-s)*a+o*t+n}function ks(t,e,n,i){return function(t,e){const n=1-t;return n*n*e}(t,e)+function(t,e){return 2*(1-t)*t*e}(t,n)+function(t,e){return t*t*e}(t,i)}function Bs(t,e,n,i,r){return function(t,e){const n=1-t;return n*n*n*e}(t,e)+function(t,e){const n=1-t;return 3*n*n*t*e}(t,n)+function(t,e){return 3*(1-t)*t*t*e}(t,i)+function(t,e){return t*t*t*e}(t,r)}function Fs(t,e,n,i){As.call(this),this.type="CubicBezierCurve",this.v0=t||new l,this.v1=e||new l,this.v2=n||new l,this.v3=i||new l}function Us(t,e,n,i){As.call(this),this.type="CubicBezierCurve3",this.v0=t||new y,this.v1=e||new y,this.v2=n||new y,this.v3=i||new y}function js(t,e){As.call(this),this.type="LineCurve",this.v1=t||new l,this.v2=e||new l}function Hs(t,e){As.call(this),this.type="LineCurve3",this.v1=t||new y,this.v2=e||new y}function Gs(t,e,n){As.call(this),this.type="QuadraticBezierCurve",this.v0=t||new l,this.v1=e||new l,this.v2=n||new l}function Vs(t,e,n){As.call(this),this.type="QuadraticBezierCurve3",this.v0=t||new y,this.v1=e||new y,this.v2=n||new y}function Ws(t){As.call(this),this.type="SplineCurve",this.points=t||[]}Ds.prototype=Object.create(As.prototype),Ds.prototype.constructor=Ds,Ds.prototype.isCatmullRomCurve3=!0,Ds.prototype.getPoint=function(t,e){const n=e||new y,i=this.points,r=i.length,o=(r-(this.closed?0:1))*t;let s,a,l=Math.floor(o),c=o-l;this.closed?l+=l>0?0:(Math.floor(Math.abs(l)/r)+1)*r:0===c&&l===r-1&&(l=r-2,c=1),this.closed||l>0?s=i[(l-1)%r]:(Rs.subVectors(i[0],i[1]).add(i[0]),s=Rs);const u=i[l%r],h=i[(l+1)%r];if(this.closed||l+2<r?a=i[(l+2)%r]:(Rs.subVectors(i[r-1],i[r-2]).add(i[r-1]),a=Rs),"centripetal"===this.curveType||"chordal"===this.curveType){const t="chordal"===this.curveType?.5:.25;let e=Math.pow(s.distanceToSquared(u),t),n=Math.pow(u.distanceToSquared(h),t),i=Math.pow(h.distanceToSquared(a),t);n<1e-4&&(n=1),e<1e-4&&(e=n),i<1e-4&&(i=n),Os.initNonuniformCatmullRom(s.x,u.x,h.x,a.x,e,n,i),Is.initNonuniformCatmullRom(s.y,u.y,h.y,a.y,e,n,i),Ns.initNonuniformCatmullRom(s.z,u.z,h.z,a.z,e,n,i)}else"catmullrom"===this.curveType&&(Os.initCatmullRom(s.x,u.x,h.x,a.x,this.tension),Is.initCatmullRom(s.y,u.y,h.y,a.y,this.tension),Ns.initCatmullRom(s.z,u.z,h.z,a.z,this.tension));return n.set(Os.calc(c),Is.calc(c),Ns.calc(c)),n},Ds.prototype.copy=function(t){As.prototype.copy.call(this,t),this.points=[];for(let e=0,n=t.points.length;e<n;e++){const n=t.points[e];this.points.push(n.clone())}return this.closed=t.closed,this.curveType=t.curveType,this.tension=t.tension,this},Ds.prototype.toJSON=function(){const t=As.prototype.toJSON.call(this);t.points=[];for(let e=0,n=this.points.length;e<n;e++){const n=this.points[e];t.points.push(n.toArray())}return t.closed=this.closed,t.curveType=this.curveType,t.tension=this.tension,t},Ds.prototype.fromJSON=function(t){As.prototype.fromJSON.call(this,t),this.points=[];for(let e=0,n=t.points.length;e<n;e++){const n=t.points[e];this.points.push((new y).fromArray(n))}return this.closed=t.closed,this.curveType=t.curveType,this.tension=t.tension,this},Fs.prototype=Object.create(As.prototype),Fs.prototype.constructor=Fs,Fs.prototype.isCubicBezierCurve=!0,Fs.prototype.getPoint=function(t,e){const n=e||new l,i=this.v0,r=this.v1,o=this.v2,s=this.v3;return n.set(Bs(t,i.x,r.x,o.x,s.x),Bs(t,i.y,r.y,o.y,s.y)),n},Fs.prototype.copy=function(t){return As.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this.v3.copy(t.v3),this},Fs.prototype.toJSON=function(){const t=As.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t.v3=this.v3.toArray(),t},Fs.prototype.fromJSON=function(t){return As.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this.v3.fromArray(t.v3),this},Us.prototype=Object.create(As.prototype),Us.prototype.constructor=Us,Us.prototype.isCubicBezierCurve3=!0,Us.prototype.getPoint=function(t,e){const n=e||new y,i=this.v0,r=this.v1,o=this.v2,s=this.v3;return n.set(Bs(t,i.x,r.x,o.x,s.x),Bs(t,i.y,r.y,o.y,s.y),Bs(t,i.z,r.z,o.z,s.z)),n},Us.prototype.copy=function(t){return As.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this.v3.copy(t.v3),this},Us.prototype.toJSON=function(){const t=As.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t.v3=this.v3.toArray(),t},Us.prototype.fromJSON=function(t){return As.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this.v3.fromArray(t.v3),this},js.prototype=Object.create(As.prototype),js.prototype.constructor=js,js.prototype.isLineCurve=!0,js.prototype.getPoint=function(t,e){const n=e||new l;return 1===t?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(t).add(this.v1)),n},js.prototype.getPointAt=function(t,e){return this.getPoint(t,e)},js.prototype.getTangent=function(t,e){const n=e||new l;return n.copy(this.v2).sub(this.v1).normalize(),n},js.prototype.copy=function(t){return As.prototype.copy.call(this,t),this.v1.copy(t.v1),this.v2.copy(t.v2),this},js.prototype.toJSON=function(){const t=As.prototype.toJSON.call(this);return t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},js.prototype.fromJSON=function(t){return As.prototype.fromJSON.call(this,t),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},Hs.prototype=Object.create(As.prototype),Hs.prototype.constructor=Hs,Hs.prototype.isLineCurve3=!0,Hs.prototype.getPoint=function(t,e){const n=e||new y;return 1===t?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(t).add(this.v1)),n},Hs.prototype.getPointAt=function(t,e){return this.getPoint(t,e)},Hs.prototype.copy=function(t){return As.prototype.copy.call(this,t),this.v1.copy(t.v1),this.v2.copy(t.v2),this},Hs.prototype.toJSON=function(){const t=As.prototype.toJSON.call(this);return t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},Hs.prototype.fromJSON=function(t){return As.prototype.fromJSON.call(this,t),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},Gs.prototype=Object.create(As.prototype),Gs.prototype.constructor=Gs,Gs.prototype.isQuadraticBezierCurve=!0,Gs.prototype.getPoint=function(t,e){const n=e||new l,i=this.v0,r=this.v1,o=this.v2;return n.set(ks(t,i.x,r.x,o.x),ks(t,i.y,r.y,o.y)),n},Gs.prototype.copy=function(t){return As.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this},Gs.prototype.toJSON=function(){const t=As.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},Gs.prototype.fromJSON=function(t){return As.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},Vs.prototype=Object.create(As.prototype),Vs.prototype.constructor=Vs,Vs.prototype.isQuadraticBezierCurve3=!0,Vs.prototype.getPoint=function(t,e){const n=e||new y,i=this.v0,r=this.v1,o=this.v2;return n.set(ks(t,i.x,r.x,o.x),ks(t,i.y,r.y,o.y),ks(t,i.z,r.z,o.z)),n},Vs.prototype.copy=function(t){return As.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this},Vs.prototype.toJSON=function(){const t=As.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},Vs.prototype.fromJSON=function(t){return As.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},Ws.prototype=Object.create(As.prototype),Ws.prototype.constructor=Ws,Ws.prototype.isSplineCurve=!0,Ws.prototype.getPoint=function(t,e){const n=e||new l,i=this.points,r=(i.length-1)*t,o=Math.floor(r),s=r-o,a=i[0===o?o:o-1],c=i[o],u=i[o>i.length-2?i.length-1:o+1],h=i[o>i.length-3?i.length-1:o+2];return n.set(zs(s,a.x,c.x,u.x,h.x),zs(s,a.y,c.y,u.y,h.y)),n},Ws.prototype.copy=function(t){As.prototype.copy.call(this,t),this.points=[];for(let e=0,n=t.points.length;e<n;e++){const n=t.points[e];this.points.push(n.clone())}return this},Ws.prototype.toJSON=function(){const t=As.prototype.toJSON.call(this);t.points=[];for(let e=0,n=this.points.length;e<n;e++){const n=this.points[e];t.points.push(n.toArray())}return t},Ws.prototype.fromJSON=function(t){As.prototype.fromJSON.call(this,t),this.points=[];for(let e=0,n=t.points.length;e<n;e++){const n=t.points[e];this.points.push((new l).fromArray(n))}return this};var qs=Object.freeze({__proto__:null,ArcCurve:Ps,CatmullRomCurve3:Ds,CubicBezierCurve:Fs,CubicBezierCurve3:Us,EllipseCurve:Ls,LineCurve:js,LineCurve3:Hs,QuadraticBezierCurve:Gs,QuadraticBezierCurve3:Vs,SplineCurve:Ws});function Xs(){As.call(this),this.type="CurvePath",this.curves=[],this.autoClose=!1}function Ys(t){Xs.call(this),this.type="Path",this.currentPoint=new l,t&&this.setFromPoints(t)}function Zs(t){Ys.call(this,t),this.uuid=a.generateUUID(),this.type="Shape",this.holes=[]}function Js(t,e){vt.call(this),this.type="Light",this.color=new Ft(t),this.intensity=void 0!==e?e:1}function Ks(t,e,n){Js.call(this,t,n),this.type="HemisphereLight",this.position.copy(vt.DefaultUp),this.updateMatrix(),this.groundColor=new Ft(e)}function $s(t){this.camera=t,this.bias=0,this.normalBias=0,this.radius=1,this.mapSize=new l(512,512),this.map=null,this.mapPass=null,this.matrix=new q,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new We,this._frameExtents=new l(1,1),this._viewportCount=1,this._viewports=[new f(0,0,1,1)]}function Qs(){$s.call(this,new Be(50,1,.5,500)),this.focus=1}function ta(t,e,n,i,r,o){Js.call(this,t,e),this.type="SpotLight",this.position.copy(vt.DefaultUp),this.updateMatrix(),this.target=new vt,Object.defineProperty(this,"power",{get:function(){return this.intensity*Math.PI},set:function(t){this.intensity=t/Math.PI}}),this.distance=void 0!==n?n:0,this.angle=void 0!==i?i:Math.PI/3,this.penumbra=void 0!==r?r:0,this.decay=void 0!==o?o:1,this.shadow=new Qs}function ea(){$s.call(this,new Be(90,1,.5,500)),this._frameExtents=new l(4,2),this._viewportCount=6,this._viewports=[new f(2,1,1,1),new f(0,1,1,1),new f(3,1,1,1),new f(1,1,1,1),new f(3,0,1,1),new f(1,0,1,1)],this._cubeDirections=[new y(1,0,0),new y(-1,0,0),new y(0,0,1),new y(0,0,-1),new y(0,1,0),new y(0,-1,0)],this._cubeUps=[new y(0,1,0),new y(0,1,0),new y(0,1,0),new y(0,1,0),new y(0,0,1),new y(0,0,-1)]}function na(t,e,n,i){Js.call(this,t,e),this.type="PointLight",Object.defineProperty(this,"power",{get:function(){return 4*this.intensity*Math.PI},set:function(t){this.intensity=t/(4*Math.PI)}}),this.distance=void 0!==n?n:0,this.decay=void 0!==i?i:1,this.shadow=new ea}function ia(t,e,n,i,r,o){ke.call(this),this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=void 0!==t?t:-1,this.right=void 0!==e?e:1,this.top=void 0!==n?n:1,this.bottom=void 0!==i?i:-1,this.near=void 0!==r?r:.1,this.far=void 0!==o?o:2e3,this.updateProjectionMatrix()}function ra(){$s.call(this,new ia(-5,5,5,-5,.5,500))}function oa(t,e){Js.call(this,t,e),this.type="DirectionalLight",this.position.copy(vt.DefaultUp),this.updateMatrix(),this.target=new vt,this.shadow=new ra}function sa(t,e){Js.call(this,t,e),this.type="AmbientLight"}function aa(t,e,n,i){Js.call(this,t,e),this.type="RectAreaLight",this.width=void 0!==n?n:10,this.height=void 0!==i?i:10}Xs.prototype=Object.assign(Object.create(As.prototype),{constructor:Xs,add:function(t){this.curves.push(t)},closePath:function(){const t=this.curves[0].getPoint(0),e=this.curves[this.curves.length-1].getPoint(1);t.equals(e)||this.curves.push(new js(e,t))},getPoint:function(t){const e=t*this.getLength(),n=this.getCurveLengths();let i=0;for(;i<n.length;){if(n[i]>=e){const t=n[i]-e,r=this.curves[i],o=r.getLength(),s=0===o?0:1-t/o;return r.getPointAt(s)}i++}return null},getLength:function(){const t=this.getCurveLengths();return t[t.length-1]},updateArcLengths:function(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()},getCurveLengths:function(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;const t=[];let e=0;for(let n=0,i=this.curves.length;n<i;n++)e+=this.curves[n].getLength(),t.push(e);return this.cacheLengths=t,t},getSpacedPoints:function(t){void 0===t&&(t=40);const e=[];for(let n=0;n<=t;n++)e.push(this.getPoint(n/t));return this.autoClose&&e.push(e[0]),e},getPoints:function(t){t=t||12;const e=[];let n;for(let i=0,r=this.curves;i<r.length;i++){const o=r[i],s=o&&o.isEllipseCurve?2*t:o&&(o.isLineCurve||o.isLineCurve3)?1:o&&o.isSplineCurve?t*o.points.length:t,a=o.getPoints(s);for(let t=0;t<a.length;t++){const i=a[t];n&&n.equals(i)||(e.push(i),n=i)}}return this.autoClose&&e.length>1&&!e[e.length-1].equals(e[0])&&e.push(e[0]),e},copy:function(t){As.prototype.copy.call(this,t),this.curves=[];for(let e=0,n=t.curves.length;e<n;e++){const n=t.curves[e];this.curves.push(n.clone())}return this.autoClose=t.autoClose,this},toJSON:function(){const t=As.prototype.toJSON.call(this);t.autoClose=this.autoClose,t.curves=[];for(let e=0,n=this.curves.length;e<n;e++){const n=this.curves[e];t.curves.push(n.toJSON())}return t},fromJSON:function(t){As.prototype.fromJSON.call(this,t),this.autoClose=t.autoClose,this.curves=[];for(let e=0,n=t.curves.length;e<n;e++){const n=t.curves[e];this.curves.push((new qs[n.type]).fromJSON(n))}return this}}),Ys.prototype=Object.assign(Object.create(Xs.prototype),{constructor:Ys,setFromPoints:function(t){this.moveTo(t[0].x,t[0].y);for(let e=1,n=t.length;e<n;e++)this.lineTo(t[e].x,t[e].y);return this},moveTo:function(t,e){return this.currentPoint.set(t,e),this},lineTo:function(t,e){const n=new js(this.currentPoint.clone(),new l(t,e));return this.curves.push(n),this.currentPoint.set(t,e),this},quadraticCurveTo:function(t,e,n,i){const r=new Gs(this.currentPoint.clone(),new l(t,e),new l(n,i));return this.curves.push(r),this.currentPoint.set(n,i),this},bezierCurveTo:function(t,e,n,i,r,o){const s=new Fs(this.currentPoint.clone(),new l(t,e),new l(n,i),new l(r,o));return this.curves.push(s),this.currentPoint.set(r,o),this},splineThru:function(t){const e=new Ws([this.currentPoint.clone()].concat(t));return this.curves.push(e),this.currentPoint.copy(t[t.length-1]),this},arc:function(t,e,n,i,r,o){const s=this.currentPoint.x,a=this.currentPoint.y;return this.absarc(t+s,e+a,n,i,r,o),this},absarc:function(t,e,n,i,r,o){return this.absellipse(t,e,n,n,i,r,o),this},ellipse:function(t,e,n,i,r,o,s,a){const l=this.currentPoint.x,c=this.currentPoint.y;return this.absellipse(t+l,e+c,n,i,r,o,s,a),this},absellipse:function(t,e,n,i,r,o,s,a){const l=new Ls(t,e,n,i,r,o,s,a);if(this.curves.length>0){const t=l.getPoint(0);t.equals(this.currentPoint)||this.lineTo(t.x,t.y)}this.curves.push(l);const c=l.getPoint(1);return this.currentPoint.copy(c),this},copy:function(t){return Xs.prototype.copy.call(this,t),this.currentPoint.copy(t.currentPoint),this},toJSON:function(){const t=Xs.prototype.toJSON.call(this);return t.currentPoint=this.currentPoint.toArray(),t},fromJSON:function(t){return Xs.prototype.fromJSON.call(this,t),this.currentPoint.fromArray(t.currentPoint),this}}),Zs.prototype=Object.assign(Object.create(Ys.prototype),{constructor:Zs,getPointsHoles:function(t){const e=[];for(let n=0,i=this.holes.length;n<i;n++)e[n]=this.holes[n].getPoints(t);return e},extractPoints:function(t){return{shape:this.getPoints(t),holes:this.getPointsHoles(t)}},copy:function(t){Ys.prototype.copy.call(this,t),this.holes=[];for(let e=0,n=t.holes.length;e<n;e++){const n=t.holes[e];this.holes.push(n.clone())}return this},toJSON:function(){const t=Ys.prototype.toJSON.call(this);t.uuid=this.uuid,t.holes=[];for(let e=0,n=this.holes.length;e<n;e++){const n=this.holes[e];t.holes.push(n.toJSON())}return t},fromJSON:function(t){Ys.prototype.fromJSON.call(this,t),this.uuid=t.uuid,this.holes=[];for(let e=0,n=t.holes.length;e<n;e++){const n=t.holes[e];this.holes.push((new Ys).fromJSON(n))}return this}}),Js.prototype=Object.assign(Object.create(vt.prototype),{constructor:Js,isLight:!0,copy:function(t){return vt.prototype.copy.call(this,t),this.color.copy(t.color),this.intensity=t.intensity,this},toJSON:function(t){const e=vt.prototype.toJSON.call(this,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()),e}}),Ks.prototype=Object.assign(Object.create(Js.prototype),{constructor:Ks,isHemisphereLight:!0,copy:function(t){return Js.prototype.copy.call(this,t),this.groundColor.copy(t.groundColor),this}}),Object.assign($s.prototype,{_projScreenMatrix:new q,_lightPositionWorld:new y,_lookTarget:new y,getViewportCount:function(){return this._viewportCount},getFrustum:function(){return this._frustum},updateMatrices:function(t){const e=this.camera,n=this.matrix,i=this._projScreenMatrix,r=this._lookTarget,o=this._lightPositionWorld;o.setFromMatrixPosition(t.matrixWorld),e.position.copy(o),r.setFromMatrixPosition(t.target.matrixWorld),e.lookAt(r),e.updateMatrixWorld(),i.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),this._frustum.setFromProjectionMatrix(i),n.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),n.multiply(e.projectionMatrix),n.multiply(e.matrixWorldInverse)},getViewport:function(t){return this._viewports[t]},getFrameExtents:function(){return this._frameExtents},copy:function(t){return this.camera=t.camera.clone(),this.bias=t.bias,this.radius=t.radius,this.mapSize.copy(t.mapSize),this},clone:function(){return(new this.constructor).copy(this)},toJSON:function(){const t={};return 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}}),Qs.prototype=Object.assign(Object.create($s.prototype),{constructor:Qs,isSpotLightShadow:!0,updateMatrices:function(t){const e=this.camera,n=2*a.RAD2DEG*t.angle*this.focus,i=this.mapSize.width/this.mapSize.height,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()),$s.prototype.updateMatrices.call(this,t)}}),ta.prototype=Object.assign(Object.create(Js.prototype),{constructor:ta,isSpotLight:!0,copy:function(t){return Js.prototype.copy.call(this,t),this.distance=t.distance,this.angle=t.angle,this.penumbra=t.penumbra,this.decay=t.decay,this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}),ea.prototype=Object.assign(Object.create($s.prototype),{constructor:ea,isPointLightShadow:!0,updateMatrices:function(t,e){void 0===e&&(e=0);const n=this.camera,i=this.matrix,r=this._lightPositionWorld,o=this._lookTarget,s=this._projScreenMatrix;r.setFromMatrixPosition(t.matrixWorld),n.position.copy(r),o.copy(n.position),o.add(this._cubeDirections[e]),n.up.copy(this._cubeUps[e]),n.lookAt(o),n.updateMatrixWorld(),i.makeTranslation(-r.x,-r.y,-r.z),s.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse),this._frustum.setFromProjectionMatrix(s)}}),na.prototype=Object.assign(Object.create(Js.prototype),{constructor:na,isPointLight:!0,copy:function(t){return Js.prototype.copy.call(this,t),this.distance=t.distance,this.decay=t.decay,this.shadow=t.shadow.clone(),this}}),ia.prototype=Object.assign(Object.create(ke.prototype),{constructor:ia,isOrthographicCamera:!0,copy:function(t,e){return ke.prototype.copy.call(this,t,e),this.left=t.left,this.right=t.right,this.top=t.top,this.bottom=t.bottom,this.near=t.near,this.far=t.far,this.zoom=t.zoom,this.view=null===t.view?null:Object.assign({},t.view),this},setViewOffset:function(t,e,n,i,r,o){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=o,this.updateProjectionMatrix()},clearViewOffset:function(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()},updateProjectionMatrix:function(){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,o=n+t,s=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,o=r+t*this.view.width,s-=e*this.view.offsetY,a=s-e*this.view.height}this.projectionMatrix.makeOrthographic(r,o,s,a,this.near,this.far),this.projectionMatrixInverse.getInverse(this.projectionMatrix)},toJSON:function(t){const e=vt.prototype.toJSON.call(this,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}}),ra.prototype=Object.assign(Object.create($s.prototype),{constructor:ra,isDirectionalLightShadow:!0,updateMatrices:function(t){$s.prototype.updateMatrices.call(this,t)}}),oa.prototype=Object.assign(Object.create(Js.prototype),{constructor:oa,isDirectionalLight:!0,copy:function(t){return Js.prototype.copy.call(this,t),this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}),sa.prototype=Object.assign(Object.create(Js.prototype),{constructor:sa,isAmbientLight:!0}),aa.prototype=Object.assign(Object.create(Js.prototype),{constructor:aa,isRectAreaLight:!0,copy:function(t){return Js.prototype.copy.call(this,t),this.width=t.width,this.height=t.height,this},toJSON:function(t){const e=Js.prototype.toJSON.call(this,t);return e.object.width=this.width,e.object.height=this.height,e}});class la{constructor(){Object.defineProperty(this,"isSphericalHarmonics3",{value:!0}),this.coefficients=[];for(let t=0;t<9;t++)this.coefficients.push(new y)}set(t){for(let e=0;e<9;e++)this.coefficients[e].copy(t[e]);return this}zero(){for(let t=0;t<9;t++)this.coefficients[t].set(0,0,0);return this}getAt(t,e){const n=t.x,i=t.y,r=t.z,o=this.coefficients;return e.copy(o[0]).multiplyScalar(.282095),e.addScaledVector(o[1],.488603*i),e.addScaledVector(o[2],.488603*r),e.addScaledVector(o[3],.488603*n),e.addScaledVector(o[4],n*i*1.092548),e.addScaledVector(o[5],i*r*1.092548),e.addScaledVector(o[6],.315392*(3*r*r-1)),e.addScaledVector(o[7],n*r*1.092548),e.addScaledVector(o[8],.546274*(n*n-i*i)),e}getIrradianceAt(t,e){const n=t.x,i=t.y,r=t.z,o=this.coefficients;return e.copy(o[0]).multiplyScalar(.886227),e.addScaledVector(o[1],1.023328*i),e.addScaledVector(o[2],1.023328*r),e.addScaledVector(o[3],1.023328*n),e.addScaledVector(o[4],.858086*n*i),e.addScaledVector(o[5],.858086*i*r),e.addScaledVector(o[6],.743125*r*r-.247708),e.addScaledVector(o[7],.858086*n*r),e.addScaledVector(o[8],.429043*(n*n-i*i)),e}add(t){for(let e=0;e<9;e++)this.coefficients[e].add(t.coefficients[e]);return this}addScaledSH(t,e){for(let n=0;n<9;n++)this.coefficients[n].addScaledVector(t.coefficients[n],e);return this}scale(t){for(let e=0;e<9;e++)this.coefficients[e].multiplyScalar(t);return this}lerp(t,e){for(let n=0;n<9;n++)this.coefficients[n].lerp(t.coefficients[n],e);return this}equals(t){for(let e=0;e<9;e++)if(!this.coefficients[e].equals(t.coefficients[e]))return!1;return!0}copy(t){return this.set(t.coefficients)}clone(){return(new this.constructor).copy(this)}fromArray(t,e=0){const n=this.coefficients;for(let i=0;i<9;i++)n[i].fromArray(t,e+3*i);return this}toArray(t=[],e=0){const n=this.coefficients;for(let i=0;i<9;i++)n[i].toArray(t,e+3*i);return t}static getBasisAt(t,e){const n=t.x,i=t.y,r=t.z;e[0]=.282095,e[1]=.488603*i,e[2]=.488603*r,e[3]=.488603*n,e[4]=1.092548*n*i,e[5]=1.092548*i*r,e[6]=.315392*(3*r*r-1),e[7]=1.092548*n*r,e[8]=.546274*(n*n-i*i)}}function ca(t,e){Js.call(this,void 0,e),this.type="LightProbe",this.sh=void 0!==t?t:new la}function ua(t){ys.call(this,t),this.textures={}}ca.prototype=Object.assign(Object.create(Js.prototype),{constructor:ca,isLightProbe:!0,copy:function(t){return Js.prototype.copy.call(this,t),this.sh.copy(t.sh),this},fromJSON:function(t){return this.intensity=t.intensity,this.sh.fromArray(t.sh),this},toJSON:function(t){const e=Js.prototype.toJSON.call(this,t);return e.object.sh=this.sh.toArray(),e}}),ua.prototype=Object.assign(Object.create(ys.prototype),{constructor:ua,load:function(t,e,n,i){const r=this,o=new xs(r.manager);o.setPath(r.path),o.setRequestHeader(r.requestHeader),o.setWithCredentials(r.withCredentials),o.load(t,(function(n){try{e(r.parse(JSON.parse(n)))}catch(e){i?i(e):console.error(e),r.manager.itemError(t)}}),n,i)},parse:function(t){const e=this.textures;function n(t){return void 0===e[t]&&console.warn("THREE.MaterialLoader: Undefined texture",t),e[t]}const i=new Qo[t.type];if(void 0!==t.uuid&&(i.uuid=t.uuid),void 0!==t.name&&(i.name=t.name),void 0!==t.color&&void 0!==i.color&&i.color.setHex(t.color),void 0!==t.roughness&&(i.roughness=t.roughness),void 0!==t.metalness&&(i.metalness=t.metalness),void 0!==t.sheen&&(i.sheen=(new Ft).setHex(t.sheen)),void 0!==t.emissive&&void 0!==i.emissive&&i.emissive.setHex(t.emissive),void 0!==t.specular&&void 0!==i.specular&&i.specular.setHex(t.specular),void 0!==t.shininess&&(i.shininess=t.shininess),void 0!==t.clearcoat&&(i.clearcoat=t.clearcoat),void 0!==t.clearcoatRoughness&&(i.clearcoatRoughness=t.clearcoatRoughness),void 0!==t.fog&&(i.fog=t.fog),void 0!==t.flatShading&&(i.flatShading=t.flatShading),void 0!==t.blending&&(i.blending=t.blending),void 0!==t.combine&&(i.combine=t.combine),void 0!==t.side&&(i.side=t.side),void 0!==t.opacity&&(i.opacity=t.opacity),void 0!==t.transparent&&(i.transparent=t.transparent),void 0!==t.alphaTest&&(i.alphaTest=t.alphaTest),void 0!==t.depthTest&&(i.depthTest=t.depthTest),void 0!==t.depthWrite&&(i.depthWrite=t.depthWrite),void 0!==t.colorWrite&&(i.colorWrite=t.colorWrite),void 0!==t.stencilWrite&&(i.stencilWrite=t.stencilWrite),void 0!==t.stencilWriteMask&&(i.stencilWriteMask=t.stencilWriteMask),void 0!==t.stencilFunc&&(i.stencilFunc=t.stencilFunc),void 0!==t.stencilRef&&(i.stencilRef=t.stencilRef),void 0!==t.stencilFuncMask&&(i.stencilFuncMask=t.stencilFuncMask),void 0!==t.stencilFail&&(i.stencilFail=t.stencilFail),void 0!==t.stencilZFail&&(i.stencilZFail=t.stencilZFail),void 0!==t.stencilZPass&&(i.stencilZPass=t.stencilZPass),void 0!==t.wireframe&&(i.wireframe=t.wireframe),void 0!==t.wireframeLinewidth&&(i.wireframeLinewidth=t.wireframeLinewidth),void 0!==t.wireframeLinecap&&(i.wireframeLinecap=t.wireframeLinecap),void 0!==t.wireframeLinejoin&&(i.wireframeLinejoin=t.wireframeLinejoin),void 0!==t.rotation&&(i.rotation=t.rotation),1!==t.linewidth&&(i.linewidth=t.linewidth),void 0!==t.dashSize&&(i.dashSize=t.dashSize),void 0!==t.gapSize&&(i.gapSize=t.gapSize),void 0!==t.scale&&(i.scale=t.scale),void 0!==t.polygonOffset&&(i.polygonOffset=t.polygonOffset),void 0!==t.polygonOffsetFactor&&(i.polygonOffsetFactor=t.polygonOffsetFactor),void 0!==t.polygonOffsetUnits&&(i.polygonOffsetUnits=t.polygonOffsetUnits),void 0!==t.skinning&&(i.skinning=t.skinning),void 0!==t.morphTargets&&(i.morphTargets=t.morphTargets),void 0!==t.morphNormals&&(i.morphNormals=t.morphNormals),void 0!==t.dithering&&(i.dithering=t.dithering),void 0!==t.vertexTangents&&(i.vertexTangents=t.vertexTangents),void 0!==t.visible&&(i.visible=t.visible),void 0!==t.toneMapped&&(i.toneMapped=t.toneMapped),void 0!==t.userData&&(i.userData=t.userData),void 0!==t.vertexColors&&("number"==typeof t.vertexColors?i.vertexColors=t.vertexColors>0:i.vertexColors=t.vertexColors),void 0!==t.uniforms)for(const e in t.uniforms){const r=t.uniforms[e];switch(i.uniforms[e]={},r.type){case"t":i.uniforms[e].value=n(r.value);break;case"c":i.uniforms[e].value=(new Ft).setHex(r.value);break;case"v2":i.uniforms[e].value=(new l).fromArray(r.value);break;case"v3":i.uniforms[e].value=(new y).fromArray(r.value);break;case"v4":i.uniforms[e].value=(new f).fromArray(r.value);break;case"m3":i.uniforms[e].value=(new c).fromArray(r.value);break;case"m4":i.uniforms[e].value=(new q).fromArray(r.value);break;default:i.uniforms[e].value=r.value}}if(void 0!==t.defines&&(i.defines=t.defines),void 0!==t.vertexShader&&(i.vertexShader=t.vertexShader),void 0!==t.fragmentShader&&(i.fragmentShader=t.fragmentShader),void 0!==t.extensions)for(const e in t.extensions)i.extensions[e]=t.extensions[e];if(void 0!==t.shading&&(i.flatShading=1===t.shading),void 0!==t.size&&(i.size=t.size),void 0!==t.sizeAttenuation&&(i.sizeAttenuation=t.sizeAttenuation),void 0!==t.map&&(i.map=n(t.map)),void 0!==t.matcap&&(i.matcap=n(t.matcap)),void 0!==t.alphaMap&&(i.alphaMap=n(t.alphaMap)),void 0!==t.bumpMap&&(i.bumpMap=n(t.bumpMap)),void 0!==t.bumpScale&&(i.bumpScale=t.bumpScale),void 0!==t.normalMap&&(i.normalMap=n(t.normalMap)),void 0!==t.normalMapType&&(i.normalMapType=t.normalMapType),void 0!==t.normalScale){let e=t.normalScale;!1===Array.isArray(e)&&(e=[e,e]),i.normalScale=(new l).fromArray(e)}return void 0!==t.displacementMap&&(i.displacementMap=n(t.displacementMap)),void 0!==t.displacementScale&&(i.displacementScale=t.displacementScale),void 0!==t.displacementBias&&(i.displacementBias=t.displacementBias),void 0!==t.roughnessMap&&(i.roughnessMap=n(t.roughnessMap)),void 0!==t.metalnessMap&&(i.metalnessMap=n(t.metalnessMap)),void 0!==t.emissiveMap&&(i.emissiveMap=n(t.emissiveMap)),void 0!==t.emissiveIntensity&&(i.emissiveIntensity=t.emissiveIntensity),void 0!==t.specularMap&&(i.specularMap=n(t.specularMap)),void 0!==t.envMap&&(i.envMap=n(t.envMap)),void 0!==t.envMapIntensity&&(i.envMapIntensity=t.envMapIntensity),void 0!==t.reflectivity&&(i.reflectivity=t.reflectivity),void 0!==t.refractionRatio&&(i.refractionRatio=t.refractionRatio),void 0!==t.lightMap&&(i.lightMap=n(t.lightMap)),void 0!==t.lightMapIntensity&&(i.lightMapIntensity=t.lightMapIntensity),void 0!==t.aoMap&&(i.aoMap=n(t.aoMap)),void 0!==t.aoMapIntensity&&(i.aoMapIntensity=t.aoMapIntensity),void 0!==t.gradientMap&&(i.gradientMap=n(t.gradientMap)),void 0!==t.clearcoatMap&&(i.clearcoatMap=n(t.clearcoatMap)),void 0!==t.clearcoatRoughnessMap&&(i.clearcoatRoughnessMap=n(t.clearcoatRoughnessMap)),void 0!==t.clearcoatNormalMap&&(i.clearcoatNormalMap=n(t.clearcoatNormalMap)),void 0!==t.clearcoatNormalScale&&(i.clearcoatNormalScale=(new l).fromArray(t.clearcoatNormalScale)),void 0!==t.transmission&&(i.transmission=t.transmission),void 0!==t.transmissionMap&&(i.transmissionMap=n(t.transmissionMap)),i},setTextures:function(t){return this.textures=t,this}});const ha=function(t){const e=t.lastIndexOf("/");return-1===e?"./":t.substr(0,e+1)};function da(){he.call(this),this.type="InstancedBufferGeometry",this.instanceCount=1/0}function pa(t,e,n,i){"number"==typeof n&&(i=n,n=!1,console.error("THREE.InstancedBufferAttribute: The constructor now expects normalized as the third argument.")),qt.call(this,t,e,n),this.meshPerAttribute=i||1}function fa(t){ys.call(this,t)}da.prototype=Object.assign(Object.create(he.prototype),{constructor:da,isInstancedBufferGeometry:!0,copy:function(t){return he.prototype.copy.call(this,t),this.instanceCount=t.instanceCount,this},clone:function(){return(new this.constructor).copy(this)},toJSON:function(){const t=he.prototype.toJSON.call(this);return t.instanceCount=this.instanceCount,t.isInstancedBufferGeometry=!0,t}}),pa.prototype=Object.assign(Object.create(qt.prototype),{constructor:pa,isInstancedBufferAttribute:!0,copy:function(t){return qt.prototype.copy.call(this,t),this.meshPerAttribute=t.meshPerAttribute,this},toJSON:function(){const t=qt.prototype.toJSON.call(this);return t.meshPerAttribute=this.meshPerAttribute,t.isInstancedBufferAttribute=!0,t}}),fa.prototype=Object.assign(Object.create(ys.prototype),{constructor:fa,load:function(t,e,n,i){const r=this,o=new xs(r.manager);o.setPath(r.path),o.setRequestHeader(r.requestHeader),o.setWithCredentials(r.withCredentials),o.load(t,(function(n){try{e(r.parse(JSON.parse(n)))}catch(e){i?i(e):console.error(e),r.manager.itemError(t)}}),n,i)},parse:function(t){const e={},n={};function i(t,i){if(void 0!==e[i])return e[i];const r=t.interleavedBuffers[i],o=function(t,e){if(void 0!==n[e])return n[e];const i=t.arrayBuffers[e],r=new Uint32Array(i).buffer;return n[e]=r,r}(t,r.buffer),s=new nr(new ma[r.type](o),r.stride);return s.uuid=r.uuid,e[i]=s,s}const r=t.isInstancedBufferGeometry?new da:new he,o=t.data.index;if(void 0!==o){const t=new ma[o.type](o.array);r.setIndex(new qt(t,1))}const s=t.data.attributes;for(const e in s){const n=s[e];let o;if(n.isInterleavedBufferAttribute){o=new rr(i(t.data,n.data),n.itemSize,n.offset,n.normalized)}else{const t=new ma[n.type](n.array);o=new(n.isInstancedBufferAttribute?pa:qt)(t,n.itemSize,n.normalized)}void 0!==n.name&&(o.name=n.name),r.setAttribute(e,o)}const a=t.data.morphAttributes;if(a)for(const e in a){const n=a[e],o=[];for(let e=0,r=n.length;e<r;e++){const r=n[e];let s;if(r.isInterleavedBufferAttribute){s=new rr(i(t.data,r.data),r.itemSize,r.offset,r.normalized)}else{s=new qt(new ma[r.type](r.array),r.itemSize,r.normalized)}void 0!==r.name&&(s.name=r.name),o.push(s)}r.morphAttributes[e]=o}t.data.morphTargetsRelative&&(r.morphTargetsRelative=!0);const l=t.data.groups||t.data.drawcalls||t.data.offsets;if(void 0!==l)for(let t=0,e=l.length;t!==e;++t){const e=l[t];r.addGroup(e.start,e.count,e.materialIndex)}const c=t.data.boundingSphere;if(void 0!==c){const t=new y;void 0!==c.center&&t.fromArray(c.center),r.boundingSphere=new k(t,c.radius)}return t.name&&(r.name=t.name),t.userData&&(r.userData=t.userData),r}});const ma={Int8Array:Int8Array,Uint8Array:Uint8Array,Uint8ClampedArray:"undefined"!=typeof Uint8ClampedArray?Uint8ClampedArray:Uint8Array,Int16Array:Int16Array,Uint16Array:Uint16Array,Int32Array:Int32Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array};function ga(t){"undefined"==typeof createImageBitmap&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),"undefined"==typeof fetch&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),ys.call(this,t),this.options={premultiplyAlpha:"none"}}function va(){this.type="ShapePath",this.color=new Ft,this.subPaths=[],this.currentPath=null}function ya(t){this.type="Font",this.data=t}function ba(t,e,n,i,r){const o=r.glyphs[t]||r.glyphs["?"];if(!o)return void console.error('THREE.Font: character "'+t+'" does not exists in font family '+r.familyName+".");const s=new va;let a,l,c,u,h,d,p,f;if(o.o){const t=o._cachedOutline||(o._cachedOutline=o.o.split(" "));for(let r=0,o=t.length;r<o;){switch(t[r++]){case"m":a=t[r++]*e+n,l=t[r++]*e+i,s.moveTo(a,l);break;case"l":a=t[r++]*e+n,l=t[r++]*e+i,s.lineTo(a,l);break;case"q":c=t[r++]*e+n,u=t[r++]*e+i,h=t[r++]*e+n,d=t[r++]*e+i,s.quadraticCurveTo(h,d,c,u);break;case"b":c=t[r++]*e+n,u=t[r++]*e+i,h=t[r++]*e+n,d=t[r++]*e+i,p=t[r++]*e+n,f=t[r++]*e+i,s.bezierCurveTo(h,d,p,f,c,u)}}}return{offsetX:o.ha*e,path:s}}function xa(t){ys.call(this,t)}let wa;ga.prototype=Object.assign(Object.create(ys.prototype),{constructor:ga,isImageBitmapLoader:!0,setOptions:function(t){return this.options=t,this},load:function(t,e,n,i){void 0===t&&(t=""),void 0!==this.path&&(t=this.path+t),t=this.manager.resolveURL(t);const r=this,o=ms.get(t);if(void 0!==o)return r.manager.itemStart(t),setTimeout((function(){e&&e(o),r.manager.itemEnd(t)}),0),o;const s={};s.credentials="anonymous"===this.crossOrigin?"same-origin":"include",fetch(t,s).then((function(t){return t.blob()})).then((function(t){return createImageBitmap(t,r.options)})).then((function(n){ms.add(t,n),e&&e(n),r.manager.itemEnd(t)})).catch((function(e){i&&i(e),r.manager.itemError(t),r.manager.itemEnd(t)})),r.manager.itemStart(t)}}),Object.assign(va.prototype,{moveTo:function(t,e){return this.currentPath=new Ys,this.subPaths.push(this.currentPath),this.currentPath.moveTo(t,e),this},lineTo:function(t,e){return this.currentPath.lineTo(t,e),this},quadraticCurveTo:function(t,e,n,i){return this.currentPath.quadraticCurveTo(t,e,n,i),this},bezierCurveTo:function(t,e,n,i,r,o){return this.currentPath.bezierCurveTo(t,e,n,i,r,o),this},splineThru:function(t){return this.currentPath.splineThru(t),this},toShapes:function(t,e){function n(t){const e=[];for(let n=0,i=t.length;n<i;n++){const i=t[n],r=new Zs;r.curves=i.curves,e.push(r)}return e}function i(t,e){const n=e.length;let i=!1;for(let r=n-1,o=0;o<n;r=o++){let n=e[r],s=e[o],a=s.x-n.x,l=s.y-n.y;if(Math.abs(l)>Number.EPSILON){if(l<0&&(n=e[o],a=-a,s=e[r],l=-l),t.y<n.y||t.y>s.y)continue;if(t.y===n.y){if(t.x===n.x)return!0}else{const e=l*(t.x-n.x)-a*(t.y-n.y);if(0===e)return!0;if(e<0)continue;i=!i}}else{if(t.y!==n.y)continue;if(s.x<=t.x&&t.x<=n.x||n.x<=t.x&&t.x<=s.x)return!0}}return i}const r=Io.isClockWise,o=this.subPaths;if(0===o.length)return[];if(!0===e)return n(o);let s,a,l;const c=[];if(1===o.length)return a=o[0],l=new Zs,l.curves=a.curves,c.push(l),c;let u=!r(o[0].getPoints());u=t?!u:u;const h=[],d=[];let p,f,m=[],g=0;d[g]=void 0,m[g]=[];for(let e=0,n=o.length;e<n;e++)a=o[e],p=a.getPoints(),s=r(p),s=t?!s:s,s?(!u&&d[g]&&g++,d[g]={s:new Zs,p:p},d[g].s.curves=a.curves,u&&g++,m[g]=[]):m[g].push({h:a,p:p[0]});if(!d[0])return n(o);if(d.length>1){let t=!1;const e=[];for(let t=0,e=d.length;t<e;t++)h[t]=[];for(let n=0,r=d.length;n<r;n++){const r=m[n];for(let o=0;o<r.length;o++){const s=r[o];let a=!0;for(let r=0;r<d.length;r++)i(s.p,d[r].p)&&(n!==r&&e.push({froms:n,tos:r,hole:o}),a?(a=!1,h[r].push(s)):t=!0);a&&h[n].push(s)}}e.length>0&&(t||(m=h))}for(let t=0,e=d.length;t<e;t++){l=d[t].s,c.push(l),f=m[t];for(let t=0,e=f.length;t<e;t++)l.holes.push(f[t].h)}return c}}),Object.assign(ya.prototype,{isFont:!0,generateShapes:function(t,e){void 0===e&&(e=100);const n=[],i=function(t,e,n){const i=Array.from?Array.from(t):String(t).split(""),r=e/n.resolution,o=(n.boundingBox.yMax-n.boundingBox.yMin+n.underlineThickness)*r,s=[];let a=0,l=0;for(let t=0;t<i.length;t++){const e=i[t];if("\n"===e)a=0,l-=o;else{const t=ba(e,r,a,l,n);a+=t.offsetX,s.push(t.path)}}return s}(t,e,this.data);for(let t=0,e=i.length;t<e;t++)Array.prototype.push.apply(n,i[t].toShapes());return n}}),xa.prototype=Object.assign(Object.create(ys.prototype),{constructor:xa,load:function(t,e,n,i){const r=this,o=new xs(this.manager);o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(r.withCredentials),o.load(t,(function(t){let n;try{n=JSON.parse(t)}catch(e){console.warn("THREE.FontLoader: typeface.js support is being deprecated. Use typeface.json instead."),n=JSON.parse(t.substring(65,t.length-2))}const i=r.parse(n);e&&e(i)}),n,i)},parse:function(t){return new ya(t)}});const _a=function(){return void 0===wa&&(wa=new(window.AudioContext||window.webkitAudioContext)),wa};function Sa(t){ys.call(this,t)}function Ma(t,e,n){ca.call(this,void 0,n);const i=(new Ft).set(t),r=(new Ft).set(e),o=new y(i.r,i.g,i.b),s=new y(r.r,r.g,r.b),a=Math.sqrt(Math.PI),l=a*Math.sqrt(.75);this.sh.coefficients[0].copy(o).add(s).multiplyScalar(a),this.sh.coefficients[1].copy(o).sub(s).multiplyScalar(l)}function Ea(t,e){ca.call(this,void 0,e);const n=(new Ft).set(t);this.sh.coefficients[0].set(n.r,n.g,n.b).multiplyScalar(2*Math.sqrt(Math.PI))}Sa.prototype=Object.assign(Object.create(ys.prototype),{constructor:Sa,load:function(t,e,n,i){const r=this,o=new xs(r.manager);o.setResponseType("arraybuffer"),o.setPath(r.path),o.setRequestHeader(r.requestHeader),o.setWithCredentials(r.withCredentials),o.load(t,(function(n){try{const t=n.slice(0);_a().decodeAudioData(t,(function(t){e(t)}))}catch(e){i?i(e):console.error(e),r.manager.itemError(t)}}),n,i)}}),Ma.prototype=Object.assign(Object.create(ca.prototype),{constructor:Ma,isHemisphereLightProbe:!0,copy:function(t){return ca.prototype.copy.call(this,t),this},toJSON:function(t){return ca.prototype.toJSON.call(this,t)}}),Ea.prototype=Object.assign(Object.create(ca.prototype),{constructor:Ea,isAmbientLightProbe:!0,copy:function(t){return ca.prototype.copy.call(this,t),this},toJSON:function(t){return ca.prototype.toJSON.call(this,t)}});const Ta=new q,Aa=new q;Object.assign(function(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new Be,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new Be,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1,this._cache={focus:null,fov:null,aspect:null,near:null,far:null,zoom:null,eyeSep:null}}.prototype,{update:function(t){const e=this._cache;if(e.focus!==t.focus||e.fov!==t.fov||e.aspect!==t.aspect*this.aspect||e.near!==t.near||e.far!==t.far||e.zoom!==t.zoom||e.eyeSep!==this.eyeSep){e.focus=t.focus,e.fov=t.fov,e.aspect=t.aspect*this.aspect,e.near=t.near,e.far=t.far,e.zoom=t.zoom,e.eyeSep=this.eyeSep;const n=t.projectionMatrix.clone(),i=e.eyeSep/2,r=i*e.near/e.focus,o=e.near*Math.tan(a.DEG2RAD*e.fov*.5)/e.zoom;let s,l;Aa.elements[12]=-i,Ta.elements[12]=i,s=-o*e.aspect+r,l=o*e.aspect+r,n.elements[0]=2*e.near/(l-s),n.elements[8]=(l+s)/(l-s),this.cameraL.projectionMatrix.copy(n),s=-o*e.aspect-r,l=o*e.aspect-r,n.elements[0]=2*e.near/(l-s),n.elements[8]=(l+s)/(l-s),this.cameraR.projectionMatrix.copy(n)}this.cameraL.matrixWorld.copy(t.matrixWorld).multiply(Aa),this.cameraR.matrixWorld.copy(t.matrixWorld).multiply(Ta)}});class La extends vt{constructor(t){super(),this.type="Audio",this.listener=t,this.context=t.context,this.gain=this.context.createGain(),this.gain.connect(t.getInput()),this.autoplay=!1,this.buffer=null,this.detune=0,this.loop=!1,this.loopStart=0,this.loopEnd=0,this.offset=0,this.duration=void 0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.source=null,this.sourceType="empty",this._startedAt=0,this._progress=0,this._connected=!1,this.filters=[]}getOutput(){return this.gain}setNodeSource(t){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=t,this.connect(),this}setMediaElementSource(t){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(t),this.connect(),this}setMediaStreamSource(t){return this.hasPlaybackControl=!1,this.sourceType="mediaStreamNode",this.source=this.context.createMediaStreamSource(t),this.connect(),this}setBuffer(t){return this.buffer=t,this.sourceType="buffer",this.autoplay&&this.play(),this}play(t){if(void 0===t&&(t=0),!0===this.isPlaying)return void console.warn("THREE.Audio: Audio is already playing.");if(!1===this.hasPlaybackControl)return void console.warn("THREE.Audio: this Audio has no playback control.");this._startedAt=this.context.currentTime+t;const e=this.context.createBufferSource();return e.buffer=this.buffer,e.loop=this.loop,e.loopStart=this.loopStart,e.loopEnd=this.loopEnd,e.onended=this.onEnded.bind(this),e.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=e,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()}pause(){if(!1!==this.hasPlaybackControl)return!0===this.isPlaying&&(this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate,!0===this.loop&&(this._progress=this._progress%(this.duration||this.buffer.duration)),this.source.stop(),this.source.onended=null,this.isPlaying=!1),this;console.warn("THREE.Audio: this Audio has no playback control.")}stop(){if(!1!==this.hasPlaybackControl)return this._progress=0,this.source.stop(),this.source.onended=null,this.isPlaying=!1,this;console.warn("THREE.Audio: this Audio has no playback control.")}connect(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(let t=1,e=this.filters.length;t<e;t++)this.filters[t-1].connect(this.filters[t]);this.filters[this.filters.length-1].connect(this.getOutput())}else this.source.connect(this.getOutput());return this._connected=!0,this}disconnect(){if(this.filters.length>0){this.source.disconnect(this.filters[0]);for(let t=1,e=this.filters.length;t<e;t++)this.filters[t-1].disconnect(this.filters[t]);this.filters[this.filters.length-1].disconnect(this.getOutput())}else this.source.disconnect(this.getOutput());return this._connected=!1,this}getFilters(){return this.filters}setFilters(t){return t||(t=[]),!0===this._connected?(this.disconnect(),this.filters=t.slice(),this.connect()):this.filters=t.slice(),this}setDetune(t){if(this.detune=t,void 0!==this.source.detune)return!0===this.isPlaying&&this.source.detune.setTargetAtTime(this.detune,this.context.currentTime,.01),this}getDetune(){return this.detune}getFilter(){return this.getFilters()[0]}setFilter(t){return this.setFilters(t?[t]:[])}setPlaybackRate(t){if(!1!==this.hasPlaybackControl)return this.playbackRate=t,!0===this.isPlaying&&this.source.playbackRate.setTargetAtTime(this.playbackRate,this.context.currentTime,.01),this;console.warn("THREE.Audio: this Audio has no playback control.")}getPlaybackRate(){return this.playbackRate}onEnded(){this.isPlaying=!1}getLoop(){return!1===this.hasPlaybackControl?(console.warn("THREE.Audio: this Audio has no playback control."),!1):this.loop}setLoop(t){if(!1!==this.hasPlaybackControl)return this.loop=t,!0===this.isPlaying&&(this.source.loop=this.loop),this;console.warn("THREE.Audio: this Audio has no playback control.")}setLoopStart(t){return this.loopStart=t,this}setLoopEnd(t){return this.loopEnd=t,this}getVolume(){return this.gain.gain.value}setVolume(t){return this.gain.gain.setTargetAtTime(t,this.context.currentTime,.01),this}}function Pa(t,e,n){let i,r,o;switch(this.binding=t,this.valueSize=n,e){case"quaternion":i=this._slerp,r=this._slerpAdditive,o=this._setAdditiveIdentityQuaternion,this.buffer=new Float64Array(6*n),this._workIndex=5;break;case"string":case"bool":i=this._select,r=this._select,o=this._setAdditiveIdentityOther,this.buffer=new Array(5*n);break;default:i=this._lerp,r=this._lerpAdditive,o=this._setAdditiveIdentityNumeric,this.buffer=new Float64Array(5*n)}this._mixBufferRegion=i,this._mixBufferRegionAdditive=r,this._setIdentity=o,this._origIndex=3,this._addIndex=4,this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,this.useCount=0,this.referenceCount=0}Object.assign(Pa.prototype,{accumulate:function(t,e){const n=this.buffer,i=this.valueSize,r=t*i+i;let o=this.cumulativeWeight;if(0===o){for(let t=0;t!==i;++t)n[r+t]=n[t];o=e}else{o+=e;const t=e/o;this._mixBufferRegion(n,r,0,t,i)}this.cumulativeWeight=o},accumulateAdditive:function(t){const e=this.buffer,n=this.valueSize,i=n*this._addIndex;0===this.cumulativeWeightAdditive&&this._setIdentity(),this._mixBufferRegionAdditive(e,i,0,t,n),this.cumulativeWeightAdditive+=t},apply:function(t){const e=this.valueSize,n=this.buffer,i=t*e+e,r=this.cumulativeWeight,o=this.cumulativeWeightAdditive,s=this.binding;if(this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,r<1){const t=e*this._origIndex;this._mixBufferRegion(n,i,t,1-r,e)}o>0&&this._mixBufferRegionAdditive(n,i,this._addIndex*e,1,e);for(let t=e,r=e+e;t!==r;++t)if(n[t]!==n[t+e]){s.setValue(n,i);break}},saveOriginalState:function(){const t=this.binding,e=this.buffer,n=this.valueSize,i=n*this._origIndex;t.getValue(e,i);for(let t=n,r=i;t!==r;++t)e[t]=e[i+t%n];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0},restoreOriginalState:function(){const t=3*this.valueSize;this.binding.setValue(this.buffer,t)},_setAdditiveIdentityNumeric:function(){const t=this._addIndex*this.valueSize,e=t+this.valueSize;for(let n=t;n<e;n++)this.buffer[n]=0},_setAdditiveIdentityQuaternion:function(){this._setAdditiveIdentityNumeric(),this.buffer[this._addIndex*this.valueSize+3]=1},_setAdditiveIdentityOther:function(){const t=this._origIndex*this.valueSize,e=this._addIndex*this.valueSize;for(let n=0;n<this.valueSize;n++)this.buffer[e+n]=this.buffer[t+n]},_select:function(t,e,n,i,r){if(i>=.5)for(let i=0;i!==r;++i)t[e+i]=t[n+i]},_slerp:function(t,e,n,i){v.slerpFlat(t,e,t,e,t,n,i)},_slerpAdditive:function(t,e,n,i,r){const o=this._workIndex*r;v.multiplyQuaternionsFlat(t,o,t,e,t,n),v.slerpFlat(t,e,t,e,t,o,i)},_lerp:function(t,e,n,i,r){const o=1-i;for(let s=0;s!==r;++s){const r=e+s;t[r]=t[r]*o+t[n+s]*i}},_lerpAdditive:function(t,e,n,i,r){for(let o=0;o!==r;++o){const r=e+o;t[r]=t[r]+t[n+o]*i}}});const Ca=new RegExp("[\\[\\]\\.:\\/]","g"),Ra="[^"+"\\[\\]\\.:\\/".replace("\\.","")+"]",Oa=/((?:WC+[\/:])*)/.source.replace("WC","[^\\[\\]\\.:\\/]"),Ia=/(WCOD+)?/.source.replace("WCOD",Ra),Na=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC","[^\\[\\]\\.:\\/]"),Da=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC","[^\\[\\]\\.:\\/]"),za=new RegExp("^"+Oa+Ia+Na+Da+"$"),ka=["material","materials","bones"];function Ba(t,e,n){const i=n||Fa.parseTrackName(e);this._targetGroup=t,this._bindings=t.subscribe_(e,i)}function Fa(t,e,n){this.path=e,this.parsedPath=n||Fa.parseTrackName(e),this.node=Fa.findNode(t,this.parsedPath.nodeName)||t,this.rootNode=t}Object.assign(Ba.prototype,{getValue:function(t,e){this.bind();const n=this._targetGroup.nCachedObjects_,i=this._bindings[n];void 0!==i&&i.getValue(t,e)},setValue:function(t,e){const n=this._bindings;for(let i=this._targetGroup.nCachedObjects_,r=n.length;i!==r;++i)n[i].setValue(t,e)},bind:function(){const t=this._bindings;for(let e=this._targetGroup.nCachedObjects_,n=t.length;e!==n;++e)t[e].bind()},unbind:function(){const t=this._bindings;for(let e=this._targetGroup.nCachedObjects_,n=t.length;e!==n;++e)t[e].unbind()}}),Object.assign(Fa,{Composite:Ba,create:function(t,e,n){return t&&t.isAnimationObjectGroup?new Fa.Composite(t,e,n):new Fa(t,e,n)},sanitizeNodeName:function(t){return t.replace(/\s/g,"_").replace(Ca,"")},parseTrackName:function(t){const e=za.exec(t);if(!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!==ka.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},findNode:function(t,e){if(!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 o=n(r.children);if(o)return o}return null},i=n(t.children);if(i)return i}return null}}),Object.assign(Fa.prototype,{_getValue_unavailable:function(){},_setValue_unavailable:function(){},BindingType:{Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},Versioning:{None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},GetterByBindingType:[function(t,e){t[e]=this.node[this.propertyName]},function(t,e){const n=this.resolvedProperty;for(let i=0,r=n.length;i!==r;++i)t[e++]=n[i]},function(t,e){t[e]=this.resolvedProperty[this.propertyIndex]},function(t,e){this.resolvedProperty.toArray(t,e)}],SetterByBindingTypeAndVersioning:[[function(t,e){this.targetObject[this.propertyName]=t[e]},function(t,e){this.targetObject[this.propertyName]=t[e],this.targetObject.needsUpdate=!0},function(t,e){this.targetObject[this.propertyName]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}],[function(t,e){const n=this.resolvedProperty;for(let i=0,r=n.length;i!==r;++i)n[i]=t[e++]},function(t,e){const n=this.resolvedProperty;for(let i=0,r=n.length;i!==r;++i)n[i]=t[e++];this.targetObject.needsUpdate=!0},function(t,e){const n=this.resolvedProperty;for(let i=0,r=n.length;i!==r;++i)n[i]=t[e++];this.targetObject.matrixWorldNeedsUpdate=!0}],[function(t,e){this.resolvedProperty[this.propertyIndex]=t[e]},function(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.needsUpdate=!0},function(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}],[function(t,e){this.resolvedProperty.fromArray(t,e)},function(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.needsUpdate=!0},function(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.matrixWorldNeedsUpdate=!0}]],getValue:function(t,e){this.bind(),this.getValue(t,e)},setValue:function(t,e){this.bind(),this.setValue(t,e)},bind:function(){let t=this.node;const e=this.parsedPath,n=e.objectName,i=e.propertyName;let r=e.propertyIndex;if(t||(t=Fa.findNode(this.rootNode,e.nodeName)||this.rootNode,this.node=t),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,!t)return void console.error("THREE.PropertyBinding: Trying to update node for track: "+this.path+" but it wasn't found.");if(n){let i=e.objectIndex;switch(n){case"materials":if(!t.material)return void console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);if(!t.material.materials)return void console.error("THREE.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 console.error("THREE.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;default:if(void 0===t[n])return void console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);t=t[n]}if(void 0!==i){if(void 0===t[i])return void console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,t);t=t[i]}}const o=t[i];if(void 0===o){const n=e.nodeName;return void console.error("THREE.PropertyBinding: Trying to update property for track: "+n+"."+i+" but it wasn't found.",t)}let s=this.Versioning.None;this.targetObject=t,void 0!==t.needsUpdate?s=this.Versioning.NeedsUpdate:void 0!==t.matrixWorldNeedsUpdate&&(s=this.Versioning.MatrixWorldNeedsUpdate);let a=this.BindingType.Direct;if(void 0!==r){if("morphTargetInfluences"===i){if(!t.geometry)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);if(!t.geometry.isBufferGeometry)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences on THREE.Geometry. Use THREE.BufferGeometry instead.",this);if(!t.geometry.morphAttributes)return void console.error("THREE.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=o,this.propertyIndex=r}else void 0!==o.fromArray&&void 0!==o.toArray?(a=this.BindingType.HasFromToArray,this.resolvedProperty=o):Array.isArray(o)?(a=this.BindingType.EntireArray,this.resolvedProperty=o):this.propertyName=i;this.getValue=this.GetterByBindingType[a],this.setValue=this.SetterByBindingTypeAndVersioning[a][s]},unbind:function(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}),Object.assign(Fa.prototype,{_getValue_unbound:Fa.prototype.getValue,_setValue_unbound:Fa.prototype.setValue}),Object.assign(function(){this.uuid=a.generateUUID(),this._objects=Array.prototype.slice.call(arguments),this.nCachedObjects_=0;const t={};this._indicesByUUID=t;for(let e=0,n=arguments.length;e!==n;++e)t[arguments[e].uuid]=e;this._paths=[],this._parsedPaths=[],this._bindings=[],this._bindingsIndicesByPath={};const e=this;this.stats={objects:{get total(){return e._objects.length},get inUse(){return this.total-e.nCachedObjects_}},get bindingsPerObject(){return e._bindings.length}}}.prototype,{isAnimationObjectGroup:!0,add:function(){const t=this._objects,e=this._indicesByUUID,n=this._paths,i=this._parsedPaths,r=this._bindings,o=r.length;let s=void 0,a=t.length,l=this.nCachedObjects_;for(let c=0,u=arguments.length;c!==u;++c){const u=arguments[c],h=u.uuid;let d=e[h];if(void 0===d){d=a++,e[h]=d,t.push(u);for(let t=0,e=o;t!==e;++t)r[t].push(new Fa(u,n[t],i[t]))}else if(d<l){s=t[d];const a=--l,c=t[a];e[c.uuid]=d,t[d]=c,e[h]=a,t[a]=u;for(let t=0,e=o;t!==e;++t){const e=r[t],o=e[a];let s=e[d];e[d]=o,void 0===s&&(s=new Fa(u,n[t],i[t])),e[a]=s}}else t[d]!==s&&console.error("THREE.AnimationObjectGroup: Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes.")}this.nCachedObjects_=l},remove:function(){const t=this._objects,e=this._indicesByUUID,n=this._bindings,i=n.length;let r=this.nCachedObjects_;for(let o=0,s=arguments.length;o!==s;++o){const s=arguments[o],a=s.uuid,l=e[a];if(void 0!==l&&l>=r){const o=r++,c=t[o];e[c.uuid]=l,t[l]=c,e[a]=o,t[o]=s;for(let t=0,e=i;t!==e;++t){const e=n[t],i=e[o],r=e[l];e[l]=i,e[o]=r}}}this.nCachedObjects_=r},uncache:function(){const t=this._objects,e=this._indicesByUUID,n=this._bindings,i=n.length;let r=this.nCachedObjects_,o=t.length;for(let s=0,a=arguments.length;s!==a;++s){const a=arguments[s].uuid,l=e[a];if(void 0!==l)if(delete e[a],l<r){const s=--r,a=t[s],c=--o,u=t[c];e[a.uuid]=l,t[l]=a,e[u.uuid]=s,t[s]=u,t.pop();for(let t=0,e=i;t!==e;++t){const e=n[t],i=e[s],r=e[c];e[l]=i,e[s]=r,e.pop()}}else{const r=--o,s=t[r];r>0&&(e[s.uuid]=l),t[l]=s,t.pop();for(let t=0,e=i;t!==e;++t){const e=n[t];e[l]=e[r],e.pop()}}}this.nCachedObjects_=r},subscribe_:function(t,e){const n=this._bindingsIndicesByPath;let i=n[t];const r=this._bindings;if(void 0!==i)return r[i];const o=this._paths,s=this._parsedPaths,a=this._objects,l=a.length,c=this.nCachedObjects_,u=new Array(l);i=r.length,n[t]=i,o.push(t),s.push(e),r.push(u);for(let n=c,i=a.length;n!==i;++n){const i=a[n];u[n]=new Fa(i,t,e)}return u},unsubscribe_:function(t){const e=this._bindingsIndicesByPath,n=e[t];if(void 0!==n){const i=this._paths,r=this._parsedPaths,o=this._bindings,s=o.length-1,a=o[s];e[t[s]]=n,o[n]=a,o.pop(),r[n]=r[s],r.pop(),i[n]=i[s],i.pop()}}});class Ua{constructor(t,e,n,i){this._mixer=t,this._clip=e,this._localRoot=n||null,this.blendMode=i||e.blendMode;const r=e.tracks,o=r.length,s=new Array(o),a={endingStart:2400,endingEnd:2400};for(let t=0;t!==o;++t){const e=r[t].createInterpolant(null);s[t]=e,e.settings=a}this._interpolantSettings=a,this._interpolants=s,this._propertyBindings=new Array(o),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=2201,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}play(){return this._mixer._activateAction(this),this}stop(){return this._mixer._deactivateAction(this),this.reset()}reset(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&0!==this.timeScale&&null===this._startTime&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(t){return this._startTime=t,this}setLoop(t,e){return this.loop=t,this.repetitions=e,this}setEffectiveWeight(t){return this.weight=t,this._effectiveWeight=this.enabled?t:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(t){return this._scheduleFading(t,0,1)}fadeOut(t){return this._scheduleFading(t,1,0)}crossFadeFrom(t,e,n){if(t.fadeOut(e),this.fadeIn(e),n){const n=this._clip.duration,i=t._clip.duration,r=i/n,o=n/i;t.warp(1,r,e),this.warp(o,1,e)}return this}crossFadeTo(t,e,n){return t.crossFadeFrom(this,e,n)}stopFading(){const t=this._weightInterpolant;return null!==t&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this}setEffectiveTimeScale(t){return this.timeScale=t,this._effectiveTimeScale=this.paused?0:t,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(t){return this.timeScale=this._clip.duration/t,this.stopWarping()}syncWith(t){return this.time=t.time,this.timeScale=t.timeScale,this.stopWarping()}halt(t){return this.warp(this._effectiveTimeScale,0,t)}warp(t,e,n){const i=this._mixer,r=i.time,o=this.timeScale;let s=this._timeScaleInterpolant;null===s&&(s=i._lendControlInterpolant(),this._timeScaleInterpolant=s);const a=s.parameterPositions,l=s.sampleValues;return a[0]=r,a[1]=r+n,l[0]=t/o,l[1]=e/o,this}stopWarping(){const t=this._timeScaleInterpolant;return null!==t&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(t,e,n,i){if(!this.enabled)return void this._updateWeight(t);const r=this._startTime;if(null!==r){const i=(t-r)*n;if(i<0||0===n)return;this._startTime=null,e=n*i}e*=this._updateTimeScale(t);const o=this._updateTime(e),s=this._updateWeight(t);if(s>0){const t=this._interpolants,e=this._propertyBindings;switch(this.blendMode){case 2501:for(let n=0,i=t.length;n!==i;++n)t[n].evaluate(o),e[n].accumulateAdditive(s);break;case 2500:default:for(let n=0,r=t.length;n!==r;++n)t[n].evaluate(o),e[n].accumulate(i,s)}}}_updateWeight(t){let e=0;if(this.enabled){e=this.weight;const n=this._weightInterpolant;if(null!==n){const i=n.evaluate(t)[0];e*=i,t>n.parameterPositions[1]&&(this.stopFading(),0===i&&(this.enabled=!1))}}return this._effectiveWeight=e,e}_updateTimeScale(t){let e=0;if(!this.paused){e=this.timeScale;const n=this._timeScaleInterpolant;if(null!==n){e*=n.evaluate(t)[0],t>n.parameterPositions[1]&&(this.stopWarping(),0===e?this.paused=!0:this.timeScale=e)}}return this._effectiveTimeScale=e,e}_updateTime(t){const e=this._clip.duration,n=this.loop;let i=this.time+t,r=this._loopCount;const o=2202===n;if(0===t)return-1===r?i:o&&1==(1&r)?e-i:i;if(2200===n){-1===r&&(this._loopCount=0,this._setEndings(!0,!0,!1));t:{if(i>=e)i=e;else{if(!(i<0)){this.time=i;break t}i=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=i,this._mixer.dispatchEvent({type:"finished",action:this,direction:t<0?-1:1})}}else{if(-1===r&&(t>=0?(r=0,this._setEndings(!0,0===this.repetitions,o)):this._setEndings(0===this.repetitions,!0,o)),i>=e||i<0){const n=Math.floor(i/e);i-=e*n,r+=Math.abs(n);const s=this.repetitions-r;if(s<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,i=t>0?e:0,this.time=i,this._mixer.dispatchEvent({type:"finished",action:this,direction:t>0?1:-1});else{if(1===s){const e=t<0;this._setEndings(e,!e,o)}else this._setEndings(!1,!1,o);this._loopCount=r,this.time=i,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:n})}}else this.time=i;if(o&&1==(1&r))return e-i}return i}_setEndings(t,e,n){const i=this._interpolantSettings;n?(i.endingStart=2401,i.endingEnd=2401):(i.endingStart=t?this.zeroSlopeAtStart?2401:2400:2402,i.endingEnd=e?this.zeroSlopeAtEnd?2401:2400:2402)}_scheduleFading(t,e,n){const i=this._mixer,r=i.time;let o=this._weightInterpolant;null===o&&(o=i._lendControlInterpolant(),this._weightInterpolant=o);const s=o.parameterPositions,a=o.sampleValues;return s[0]=r,a[0]=e,s[1]=r+t,a[1]=n,this}}function ja(t){this._root=t,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}ja.prototype=Object.assign(Object.create(r.prototype),{constructor:ja,_bindAction:function(t,e){const n=t._localRoot||this._root,i=t._clip.tracks,r=i.length,o=t._propertyBindings,s=t._interpolants,a=n.uuid,l=this._bindingsByRootAndName;let c=l[a];void 0===c&&(c={},l[a]=c);for(let t=0;t!==r;++t){const r=i[t],l=r.name;let u=c[l];if(void 0!==u)o[t]=u;else{if(u=o[t],void 0!==u){null===u._cacheIndex&&(++u.referenceCount,this._addInactiveBinding(u,a,l));continue}const i=e&&e._propertyBindings[t].binding.parsedPath;u=new Pa(Fa.create(n,l,i),r.ValueTypeName,r.getValueSize()),++u.referenceCount,this._addInactiveBinding(u,a,l),o[t]=u}s[t].resultBuffer=u.buffer}},_activateAction:function(t){if(!this._isActiveAction(t)){if(null===t._cacheIndex){const e=(t._localRoot||this._root).uuid,n=t._clip.uuid,i=this._actionsByClip[n];this._bindAction(t,i&&i.knownActions[0]),this._addInactiveAction(t,n,e)}const e=t._propertyBindings;for(let t=0,n=e.length;t!==n;++t){const n=e[t];0==n.useCount++&&(this._lendBinding(n),n.saveOriginalState())}this._lendAction(t)}},_deactivateAction:function(t){if(this._isActiveAction(t)){const e=t._propertyBindings;for(let t=0,n=e.length;t!==n;++t){const n=e[t];0==--n.useCount&&(n.restoreOriginalState(),this._takeBackBinding(n))}this._takeBackAction(t)}},_initMemoryManager:function(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;const t=this;this.stats={actions:{get total(){return t._actions.length},get inUse(){return t._nActiveActions}},bindings:{get total(){return t._bindings.length},get inUse(){return t._nActiveBindings}},controlInterpolants:{get total(){return t._controlInterpolants.length},get inUse(){return t._nActiveControlInterpolants}}}},_isActiveAction:function(t){const e=t._cacheIndex;return null!==e&&e<this._nActiveActions},_addInactiveAction:function(t,e,n){const i=this._actions,r=this._actionsByClip;let o=r[e];if(void 0===o)o={knownActions:[t],actionByRoot:{}},t._byClipCacheIndex=0,r[e]=o;else{const e=o.knownActions;t._byClipCacheIndex=e.length,e.push(t)}t._cacheIndex=i.length,i.push(t),o.actionByRoot[n]=t},_removeInactiveAction:function(t){const e=this._actions,n=e[e.length-1],i=t._cacheIndex;n._cacheIndex=i,e[i]=n,e.pop(),t._cacheIndex=null;const r=t._clip.uuid,o=this._actionsByClip,s=o[r],a=s.knownActions,l=a[a.length-1],c=t._byClipCacheIndex;l._byClipCacheIndex=c,a[c]=l,a.pop(),t._byClipCacheIndex=null;delete s.actionByRoot[(t._localRoot||this._root).uuid],0===a.length&&delete o[r],this._removeInactiveBindingsForAction(t)},_removeInactiveBindingsForAction:function(t){const e=t._propertyBindings;for(let t=0,n=e.length;t!==n;++t){const n=e[t];0==--n.referenceCount&&this._removeInactiveBinding(n)}},_lendAction:function(t){const e=this._actions,n=t._cacheIndex,i=this._nActiveActions++,r=e[i];t._cacheIndex=i,e[i]=t,r._cacheIndex=n,e[n]=r},_takeBackAction:function(t){const e=this._actions,n=t._cacheIndex,i=--this._nActiveActions,r=e[i];t._cacheIndex=i,e[i]=t,r._cacheIndex=n,e[n]=r},_addInactiveBinding:function(t,e,n){const i=this._bindingsByRootAndName,r=this._bindings;let o=i[e];void 0===o&&(o={},i[e]=o),o[n]=t,t._cacheIndex=r.length,r.push(t)},_removeInactiveBinding:function(t){const e=this._bindings,n=t.binding,i=n.rootNode.uuid,r=n.path,o=this._bindingsByRootAndName,s=o[i],a=e[e.length-1],l=t._cacheIndex;a._cacheIndex=l,e[l]=a,e.pop(),delete s[r],0===Object.keys(s).length&&delete o[i]},_lendBinding:function(t){const e=this._bindings,n=t._cacheIndex,i=this._nActiveBindings++,r=e[i];t._cacheIndex=i,e[i]=t,r._cacheIndex=n,e[n]=r},_takeBackBinding:function(t){const e=this._bindings,n=t._cacheIndex,i=--this._nActiveBindings,r=e[i];t._cacheIndex=i,e[i]=t,r._cacheIndex=n,e[n]=r},_lendControlInterpolant:function(){const t=this._controlInterpolants,e=this._nActiveControlInterpolants++;let n=t[e];return void 0===n&&(n=new is(new Float32Array(2),new Float32Array(2),1,this._controlInterpolantsResultBuffer),n.__cacheIndex=e,t[e]=n),n},_takeBackControlInterpolant:function(t){const e=this._controlInterpolants,n=t.__cacheIndex,i=--this._nActiveControlInterpolants,r=e[i];t.__cacheIndex=i,e[i]=t,r.__cacheIndex=n,e[n]=r},_controlInterpolantsResultBuffer:new Float32Array(1),clipAction:function(t,e,n){const i=e||this._root,r=i.uuid;let o="string"==typeof t?ps.findByName(i,t):t;const s=null!==o?o.uuid:t,a=this._actionsByClip[s];let l=null;if(void 0===n&&(n=null!==o?o.blendMode:2500),void 0!==a){const t=a.actionByRoot[r];if(void 0!==t&&t.blendMode===n)return t;l=a.knownActions[0],null===o&&(o=l._clip)}if(null===o)return null;const c=new Ua(this,o,e,n);return this._bindAction(c,l),this._addInactiveAction(c,s,r),c},existingAction:function(t,e){const n=e||this._root,i=n.uuid,r="string"==typeof t?ps.findByName(n,t):t,o=r?r.uuid:t,s=this._actionsByClip[o];return void 0!==s&&s.actionByRoot[i]||null},stopAllAction:function(){const t=this._actions;for(let e=this._nActiveActions-1;e>=0;--e)t[e].stop();return this},update:function(t){t*=this.timeScale;const e=this._actions,n=this._nActiveActions,i=this.time+=t,r=Math.sign(t),o=this._accuIndex^=1;for(let s=0;s!==n;++s){e[s]._update(i,t,r,o)}const s=this._bindings,a=this._nActiveBindings;for(let t=0;t!==a;++t)s[t].apply(o);return this},setTime:function(t){this.time=0;for(let t=0;t<this._actions.length;t++)this._actions[t].time=0;return this.update(t)},getRoot:function(){return this._root},uncacheClip:function(t){const e=this._actions,n=t.uuid,i=this._actionsByClip,r=i[n];if(void 0!==r){const t=r.knownActions;for(let n=0,i=t.length;n!==i;++n){const i=t[n];this._deactivateAction(i);const r=i._cacheIndex,o=e[e.length-1];i._cacheIndex=null,i._byClipCacheIndex=null,o._cacheIndex=r,e[r]=o,e.pop(),this._removeInactiveBindingsForAction(i)}delete i[n]}},uncacheRoot:function(t){const e=t.uuid,n=this._actionsByClip;for(const t in n){const i=n[t].actionByRoot[e];void 0!==i&&(this._deactivateAction(i),this._removeInactiveAction(i))}const i=this._bindingsByRootAndName[e];if(void 0!==i)for(const t in i){const e=i[t];e.restoreOriginalState(),this._removeInactiveBinding(e)}},uncacheAction:function(t,e){const n=this.existingAction(t,e);null!==n&&(this._deactivateAction(n),this._removeInactiveAction(n))}});class Ha{constructor(t){"string"==typeof t&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),t=arguments[1]),this.value=t}clone(){return new Ha(void 0===this.value.clone?this.value:this.value.clone())}}function Ga(t,e,n){nr.call(this,t,e),this.meshPerAttribute=n||1}function Va(t,e,n,i,r){this.buffer=t,this.type=e,this.itemSize=n,this.elementSize=i,this.count=r,this.version=0}function Wa(t,e,n,i){this.ray=new W(t,e),this.near=n||0,this.far=i||1/0,this.camera=null,this.layers=new it,this.params={Mesh:{},Line:{threshold:1},LOD:{},Points:{threshold:1},Sprite:{}},Object.defineProperties(this.params,{PointCloud:{get:function(){return console.warn("THREE.Raycaster: params.PointCloud has been renamed to params.Points."),this.Points}}})}function qa(t,e){return t.distance-e.distance}function Xa(t,e,n,i){if(t.layers.test(e.layers)&&t.raycast(e,n),!0===i){const i=t.children;for(let t=0,r=i.length;t<r;t++)Xa(i[t],e,n,!0)}}Ga.prototype=Object.assign(Object.create(nr.prototype),{constructor:Ga,isInstancedInterleavedBuffer:!0,copy:function(t){return nr.prototype.copy.call(this,t),this.meshPerAttribute=t.meshPerAttribute,this},clone:function(t){const e=nr.prototype.clone.call(this,t);return e.meshPerAttribute=this.meshPerAttribute,e},toJSON:function(t){const e=nr.prototype.toJSON.call(this,t);return e.isInstancedInterleavedBuffer=!0,e.meshPerAttribute=this.meshPerAttribute,e}}),Object.defineProperty(Va.prototype,"needsUpdate",{set:function(t){!0===t&&this.version++}}),Object.assign(Va.prototype,{isGLBufferAttribute:!0,setBuffer:function(t){return this.buffer=t,this},setType:function(t,e){return this.type=t,this.elementSize=e,this},setItemSize:function(t){return this.itemSize=t,this},setCount:function(t){return this.count=t,this}}),Object.assign(Wa.prototype,{set:function(t,e){this.ray.set(t,e)},setFromCamera:function(t,e){e&&e.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(e.matrixWorld),this.ray.direction.set(t.x,t.y,.5).unproject(e).sub(this.ray.origin).normalize(),this.camera=e):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):console.error("THREE.Raycaster: Unsupported camera type.")},intersectObject:function(t,e,n){const i=n||[];return Xa(t,this,i,e),i.sort(qa),i},intersectObjects:function(t,e,n){const i=n||[];if(!1===Array.isArray(t))return console.warn("THREE.Raycaster.intersectObjects: objects is not an Array."),i;for(let n=0,r=t.length;n<r;n++)Xa(t[n],this,i,e);return i.sort(qa),i}});const Ya=new l;const Za=new y,Ja=new y;function Ka(t){vt.call(this),this.material=t,this.render=function(){},this.hasPositions=!1,this.hasNormals=!1,this.hasColors=!1,this.hasUvs=!1,this.positionArray=null,this.normalArray=null,this.colorArray=null,this.uvArray=null,this.count=0}Ka.prototype=Object.create(vt.prototype),Ka.prototype.constructor=Ka,Ka.prototype.isImmediateRenderObject=!0;const $a=new y,Qa=new q,tl=new q;Math.pow(2,8);const el=[.125,.215,.35,.446,.526,.582],nl=5+el.length,{_lodPlanes:il,_sizeLods:rl,_sigmas:ol}=sl();Math.sqrt(5);function sl(){const t=[],e=[],n=[];let i=8;for(let r=0;r<nl;r++){const o=Math.pow(2,i);e.push(o);let s=1/o;r>4?s=el[r-8+4-1]:0==r&&(s=0),n.push(s);const a=1/(o-1),l=-a/2,c=1+a/2,u=[l,l,c,l,c,c,l,l,c,c,l,c],h=6,d=6,p=3,f=2,m=1,g=new Float32Array(p*d*h),v=new Float32Array(f*d*h),y=new Float32Array(m*d*h);for(let t=0;t<h;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];g.set(i,p*d*t),v.set(u,f*d*t);const r=[t,t,t,t,t,t];y.set(r,m*d*t)}const b=new he;b.setAttribute("position",new qt(g,p)),b.setAttribute("uv",new qt(v,f)),b.setAttribute("faceIndex",new qt(y,m)),t.push(b),i>4&&i--}return{_lodPlanes:t,_sizeLods:e,_sigmas:n}}function al(t){console.warn("THREE.Spline has been removed. Use THREE.CatmullRomCurve3 instead."),Ds.call(this,t),this.type="catmullrom"}As.create=function(t,e){return console.log("THREE.Curve.create() has been deprecated"),t.prototype=Object.create(As.prototype),t.prototype.constructor=t,t.prototype.getPoint=e,t},Object.assign(Xs.prototype,{createPointsGeometry:function(t){console.warn("THREE.CurvePath: .createPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");const e=this.getPoints(t);return this.createGeometry(e)},createSpacedPointsGeometry:function(t){console.warn("THREE.CurvePath: .createSpacedPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");const e=this.getSpacedPoints(t);return this.createGeometry(e)},createGeometry:function(t){console.warn("THREE.CurvePath: .createGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");const e=new so;for(let n=0,i=t.length;n<i;n++){const i=t[n];e.vertices.push(new y(i.x,i.y,i.z||0))}return e}}),Object.assign(Ys.prototype,{fromPoints:function(t){return console.warn("THREE.Path: .fromPoints() has been renamed to .setFromPoints()."),this.setFromPoints(t)}}),Object.create(Ds.prototype),Object.create(Ds.prototype),al.prototype=Object.create(Ds.prototype),Object.assign(al.prototype,{initFromArray:function(){console.error("THREE.Spline: .initFromArray() has been removed.")},getControlPointsArray:function(){console.error("THREE.Spline: .getControlPointsArray() has been removed.")},reparametrizeByArcLength:function(){console.error("THREE.Spline: .reparametrizeByArcLength() has been removed.")}}),class extends Gr{constructor(t,e,n,i){t=t||10,e=e||10,n=new Ft(void 0!==n?n:4473924),i=new Ft(void 0!==i?i:8947848);const r=e/2,o=t/e,s=t/2,a=[],l=[];for(let t=0,c=0,u=-s;t<=e;t++,u+=o){a.push(-s,0,u,s,0,u),a.push(u,0,-s,u,0,s);const e=t===r?n:i;e.toArray(l,c),c+=3,e.toArray(l,c),c+=3,e.toArray(l,c),c+=3,e.toArray(l,c),c+=3}const c=new he;c.setAttribute("position",new te(a,3)),c.setAttribute("color",new te(l,3));super(c,new Nr({vertexColors:!0,toneMapped:!1})),this.type="GridHelper"}}.prototype.setColors=function(){console.error("THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.")},class extends Gr{constructor(t){const e=function t(e){const n=[];e&&e.isBone&&n.push(e);for(let i=0;i<e.children.length;i++)n.push.apply(n,t(e.children[i]));return n}(t),n=new he,i=[],r=[],o=new Ft(0,0,1),s=new Ft(0,1,0);for(let t=0;t<e.length;t++){const n=e[t];n.parent&&n.parent.isBone&&(i.push(0,0,0),i.push(0,0,0),r.push(o.r,o.g,o.b),r.push(s.r,s.g,s.b))}n.setAttribute("position",new te(i,3)),n.setAttribute("color",new te(r,3));super(n,new Nr({vertexColors:!0,depthTest:!1,depthWrite:!1,toneMapped:!1,transparent:!0})),this.type="SkeletonHelper",this.isSkeletonHelper=!0,this.root=t,this.bones=e,this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1}updateMatrixWorld(t){const e=this.bones,n=this.geometry,i=n.getAttribute("position");tl.getInverse(this.root.matrixWorld);for(let t=0,n=0;t<e.length;t++){const r=e[t];r.parent&&r.parent.isBone&&(Qa.multiplyMatrices(tl,r.matrixWorld),$a.setFromMatrixPosition(Qa),i.setXYZ(n,$a.x,$a.y,$a.z),Qa.multiplyMatrices(tl,r.parent.matrixWorld),$a.setFromMatrixPosition(Qa),i.setXYZ(n+1,$a.x,$a.y,$a.z),n+=2)}n.getAttribute("position").needsUpdate=!0,super.updateMatrixWorld(t)}}.prototype.update=function(){console.error("THREE.SkeletonHelper: update() no longer needs to be called.")},Object.assign(ys.prototype,{extractUrlBase:function(t){return console.warn("THREE.Loader: .extractUrlBase() has been deprecated. Use THREE.LoaderUtils.extractUrlBase() instead."),ha(t)}}),ys.Handlers={add:function(){console.error("THREE.Loader: Handlers.add() has been removed. Use LoadingManager.addHandler() instead.")},get:function(){console.error("THREE.Loader: Handlers.get() has been removed. Use LoadingManager.getHandler() instead.")}},Object.assign(class{constructor(t,e){Object.defineProperty(this,"isBox2",{value:!0}),this.min=void 0!==t?t:new l(1/0,1/0),this.max=void 0!==e?e:new l(-1/0,-1/0)}set(t,e){return this.min.copy(t),this.max.copy(e),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=Ya.copy(e).multiplyScalar(.5);return this.min.copy(t).sub(n),this.max.copy(t).add(n),this}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=1/0,this.max.x=this.max.y=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y}getCenter(t){return void 0===t&&(console.warn("THREE.Box2: .getCenter() target is now required"),t=new l),this.isEmpty()?t.set(0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(t){return void 0===t&&(console.warn("THREE.Box2: .getSize() target is now required"),t=new l),this.isEmpty()?t.set(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}containsPoint(t){return!(t.x<this.min.x||t.x>this.max.x||t.y<this.min.y||t.y>this.max.y)}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}getParameter(t,e){return void 0===e&&(console.warn("THREE.Box2: .getParameter() target is now required"),e=new l),e.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(t){return!(t.max.x<this.min.x||t.min.x>this.max.x||t.max.y<this.min.y||t.min.y>this.max.y)}clampPoint(t,e){return void 0===e&&(console.warn("THREE.Box2: .clampPoint() target is now required"),e=new l),e.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return Ya.copy(t).clamp(this.min,this.max).sub(t).length()}intersect(t){return this.min.max(t.min),this.max.min(t.max),this}union(t){return this.min.min(t.min),this.max.max(t.max),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)}}.prototype,{center:function(t){return console.warn("THREE.Box2: .center() has been renamed to .getCenter()."),this.getCenter(t)},empty:function(){return console.warn("THREE.Box2: .empty() has been renamed to .isEmpty()."),this.isEmpty()},isIntersectionBox:function(t){return console.warn("THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},size:function(t){return console.warn("THREE.Box2: .size() has been renamed to .getSize()."),this.getSize(t)}}),Object.assign(w.prototype,{center:function(t){return console.warn("THREE.Box3: .center() has been renamed to .getCenter()."),this.getCenter(t)},empty:function(){return console.warn("THREE.Box3: .empty() has been renamed to .isEmpty()."),this.isEmpty()},isIntersectionBox:function(t){return console.warn("THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},isIntersectionSphere:function(t){return console.warn("THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(t)},size:function(t){return console.warn("THREE.Box3: .size() has been renamed to .getSize()."),this.getSize(t)}}),Object.assign(k.prototype,{empty:function(){return console.warn("THREE.Sphere: .empty() has been renamed to .isEmpty()."),this.isEmpty()}}),We.prototype.setFromMatrix=function(t){return console.warn("THREE.Frustum: .setFromMatrix() has been renamed to .setFromProjectionMatrix()."),this.setFromProjectionMatrix(t)},class{constructor(t,e){this.start=void 0!==t?t:new y,this.end=void 0!==e?e:new y}set(t,e){return this.start.copy(t),this.end.copy(e),this}clone(){return(new this.constructor).copy(this)}copy(t){return this.start.copy(t.start),this.end.copy(t.end),this}getCenter(t){return void 0===t&&(console.warn("THREE.Line3: .getCenter() target is now required"),t=new y),t.addVectors(this.start,this.end).multiplyScalar(.5)}delta(t){return void 0===t&&(console.warn("THREE.Line3: .delta() target is now required"),t=new y),t.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(t,e){return void 0===e&&(console.warn("THREE.Line3: .at() target is now required"),e=new y),this.delta(e).multiplyScalar(t).add(this.start)}closestPointToPointParameter(t,e){Za.subVectors(t,this.start),Ja.subVectors(this.end,this.start);const n=Ja.dot(Ja);let i=Ja.dot(Za)/n;return e&&(i=a.clamp(i,0,1)),i}closestPointToPoint(t,e,n){const i=this.closestPointToPointParameter(t,e);return void 0===n&&(console.warn("THREE.Line3: .closestPointToPoint() target is now required"),n=new y),this.delta(n).multiplyScalar(i).add(this.start)}applyMatrix4(t){return this.start.applyMatrix4(t),this.end.applyMatrix4(t),this}equals(t){return t.start.equals(this.start)&&t.end.equals(this.end)}}.prototype.center=function(t){return console.warn("THREE.Line3: .center() has been renamed to .getCenter()."),this.getCenter(t)},Object.assign(a,{random16:function(){return console.warn("THREE.Math: .random16() has been deprecated. Use Math.random() instead."),Math.random()},nearestPowerOfTwo:function(t){return console.warn("THREE.Math: .nearestPowerOfTwo() has been renamed to .floorPowerOfTwo()."),a.floorPowerOfTwo(t)},nextPowerOfTwo:function(t){return console.warn("THREE.Math: .nextPowerOfTwo() has been renamed to .ceilPowerOfTwo()."),a.ceilPowerOfTwo(t)}}),Object.assign(c.prototype,{flattenToArrayOffset:function(t,e){return console.warn("THREE.Matrix3: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(t,e)},multiplyVector3:function(t){return console.warn("THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead."),t.applyMatrix3(this)},multiplyVector3Array:function(){console.error("THREE.Matrix3: .multiplyVector3Array() has been removed.")},applyToBufferAttribute:function(t){return console.warn("THREE.Matrix3: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix3( matrix ) instead."),t.applyMatrix3(this)},applyToVector3Array:function(){console.error("THREE.Matrix3: .applyToVector3Array() has been removed.")}}),Object.assign(q.prototype,{extractPosition:function(t){return console.warn("THREE.Matrix4: .extractPosition() has been renamed to .copyPosition()."),this.copyPosition(t)},flattenToArrayOffset:function(t,e){return console.warn("THREE.Matrix4: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(t,e)},getPosition:function(){return console.warn("THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead."),(new y).setFromMatrixColumn(this,3)},setRotationFromQuaternion:function(t){return console.warn("THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion()."),this.makeRotationFromQuaternion(t)},multiplyToArray:function(){console.warn("THREE.Matrix4: .multiplyToArray() has been removed.")},multiplyVector3:function(t){return console.warn("THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) instead."),t.applyMatrix4(this)},multiplyVector4:function(t){return console.warn("THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead."),t.applyMatrix4(this)},multiplyVector3Array:function(){console.error("THREE.Matrix4: .multiplyVector3Array() has been removed.")},rotateAxis:function(t){console.warn("THREE.Matrix4: .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead."),t.transformDirection(this)},crossVector:function(t){return console.warn("THREE.Matrix4: .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead."),t.applyMatrix4(this)},translate:function(){console.error("THREE.Matrix4: .translate() has been removed.")},rotateX:function(){console.error("THREE.Matrix4: .rotateX() has been removed.")},rotateY:function(){console.error("THREE.Matrix4: .rotateY() has been removed.")},rotateZ:function(){console.error("THREE.Matrix4: .rotateZ() has been removed.")},rotateByAxis:function(){console.error("THREE.Matrix4: .rotateByAxis() has been removed.")},applyToBufferAttribute:function(t){return console.warn("THREE.Matrix4: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix4( matrix ) instead."),t.applyMatrix4(this)},applyToVector3Array:function(){console.error("THREE.Matrix4: .applyToVector3Array() has been removed.")},makeFrustum:function(t,e,n,i,r,o){return console.warn("THREE.Matrix4: .makeFrustum() has been removed. Use .makePerspective( left, right, top, bottom, near, far ) instead."),this.makePerspective(t,e,i,n,r,o)}}),wt.prototype.isIntersectionLine=function(t){return console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine()."),this.intersectsLine(t)},v.prototype.multiplyVector3=function(t){return console.warn("THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead."),t.applyQuaternion(this)},Object.assign(W.prototype,{isIntersectionBox:function(t){return console.warn("THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},isIntersectionPlane:function(t){return console.warn("THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane()."),this.intersectsPlane(t)},isIntersectionSphere:function(t){return console.warn("THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(t)}}),Object.assign(Ot.prototype,{area:function(){return console.warn("THREE.Triangle: .area() has been renamed to .getArea()."),this.getArea()},barycoordFromPoint:function(t,e){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),this.getBarycoord(t,e)},midpoint:function(t){return console.warn("THREE.Triangle: .midpoint() has been renamed to .getMidpoint()."),this.getMidpoint(t)},normal:function(t){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),this.getNormal(t)},plane:function(t){return console.warn("THREE.Triangle: .plane() has been renamed to .getPlane()."),this.getPlane(t)}}),Object.assign(Ot,{barycoordFromPoint:function(t,e,n,i,r){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),Ot.getBarycoord(t,e,n,i,r)},normal:function(t,e,n,i){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),Ot.getNormal(t,e,n,i)}}),Object.assign(Zs.prototype,{extractAllPoints:function(t){return console.warn("THREE.Shape: .extractAllPoints() has been removed. Use .extractPoints() instead."),this.extractPoints(t)},extrude:function(t){return console.warn("THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead."),new Bo(this,t)},makeGeometry:function(t){return console.warn("THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead."),new Ho(this,t)}}),Object.assign(l.prototype,{fromAttribute:function(t,e,n){return console.warn("THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,n)},distanceToManhattan:function(t){return console.warn("THREE.Vector2: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(t)},lengthManhattan:function(){return console.warn("THREE.Vector2: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(y.prototype,{setEulerFromRotationMatrix:function(){console.error("THREE.Vector3: .setEulerFromRotationMatrix() has been removed. Use Euler.setFromRotationMatrix() instead.")},setEulerFromQuaternion:function(){console.error("THREE.Vector3: .setEulerFromQuaternion() has been removed. Use Euler.setFromQuaternion() instead.")},getPositionFromMatrix:function(t){return console.warn("THREE.Vector3: .getPositionFromMatrix() has been renamed to .setFromMatrixPosition()."),this.setFromMatrixPosition(t)},getScaleFromMatrix:function(t){return console.warn("THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale()."),this.setFromMatrixScale(t)},getColumnFromMatrix:function(t,e){return console.warn("THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn()."),this.setFromMatrixColumn(e,t)},applyProjection:function(t){return console.warn("THREE.Vector3: .applyProjection() has been removed. Use .applyMatrix4( m ) instead."),this.applyMatrix4(t)},fromAttribute:function(t,e,n){return console.warn("THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,n)},distanceToManhattan:function(t){return console.warn("THREE.Vector3: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(t)},lengthManhattan:function(){return console.warn("THREE.Vector3: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(f.prototype,{fromAttribute:function(t,e,n){return console.warn("THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,n)},lengthManhattan:function(){return console.warn("THREE.Vector4: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(so.prototype,{computeTangents:function(){console.error("THREE.Geometry: .computeTangents() has been removed.")},computeLineDistances:function(){console.error("THREE.Geometry: .computeLineDistances() has been removed. Use THREE.Line.computeLineDistances() instead.")},applyMatrix:function(t){return console.warn("THREE.Geometry: .applyMatrix() has been renamed to .applyMatrix4()."),this.applyMatrix4(t)}}),Object.assign(vt.prototype,{getChildByName:function(t){return console.warn("THREE.Object3D: .getChildByName() has been renamed to .getObjectByName()."),this.getObjectByName(t)},renderDepth:function(){console.warn("THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.")},translate:function(t,e){return console.warn("THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead."),this.translateOnAxis(e,t)},getWorldRotation:function(){console.error("THREE.Object3D: .getWorldRotation() has been removed. Use THREE.Object3D.getWorldQuaternion( target ) instead.")},applyMatrix:function(t){return console.warn("THREE.Object3D: .applyMatrix() has been renamed to .applyMatrix4()."),this.applyMatrix4(t)}}),Object.defineProperties(vt.prototype,{eulerOrder:{get:function(){return console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order},set:function(t){console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order=t}},useQuaternion:{get:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")},set:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")}}}),Object.assign(Pe.prototype,{setDrawMode:function(){console.error("THREE.Mesh: .setDrawMode() has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.")}}),Object.defineProperties(Pe.prototype,{drawMode:{get:function(){return console.error("THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode."),0},set:function(){console.error("THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.")}}}),Object.defineProperties(Sr.prototype,{objects:{get:function(){return console.warn("THREE.LOD: .objects has been renamed to .levels."),this.levels}}}),Object.defineProperty(Ar.prototype,"useVertexTexture",{get:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")},set:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")}}),Mr.prototype.initBones=function(){console.error("THREE.SkinnedMesh: initBones() has been removed.")},Object.defineProperty(As.prototype,"__arcLengthDivisions",{get:function(){return console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions."),this.arcLengthDivisions},set:function(t){console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions."),this.arcLengthDivisions=t}}),Be.prototype.setLens=function(t,e){console.warn("THREE.PerspectiveCamera.setLens is deprecated. Use .setFocalLength and .filmGauge for a photographic setup."),void 0!==e&&(this.filmGauge=e),this.setFocalLength(t)},Object.defineProperties(Js.prototype,{onlyShadow:{set:function(){console.warn("THREE.Light: .onlyShadow has been removed.")}},shadowCameraFov:{set:function(t){console.warn("THREE.Light: .shadowCameraFov is now .shadow.camera.fov."),this.shadow.camera.fov=t}},shadowCameraLeft:{set:function(t){console.warn("THREE.Light: .shadowCameraLeft is now .shadow.camera.left."),this.shadow.camera.left=t}},shadowCameraRight:{set:function(t){console.warn("THREE.Light: .shadowCameraRight is now .shadow.camera.right."),this.shadow.camera.right=t}},shadowCameraTop:{set:function(t){console.warn("THREE.Light: .shadowCameraTop is now .shadow.camera.top."),this.shadow.camera.top=t}},shadowCameraBottom:{set:function(t){console.warn("THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom."),this.shadow.camera.bottom=t}},shadowCameraNear:{set:function(t){console.warn("THREE.Light: .shadowCameraNear is now .shadow.camera.near."),this.shadow.camera.near=t}},shadowCameraFar:{set:function(t){console.warn("THREE.Light: .shadowCameraFar is now .shadow.camera.far."),this.shadow.camera.far=t}},shadowCameraVisible:{set:function(){console.warn("THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead.")}},shadowBias:{set:function(t){console.warn("THREE.Light: .shadowBias is now .shadow.bias."),this.shadow.bias=t}},shadowDarkness:{set:function(){console.warn("THREE.Light: .shadowDarkness has been removed.")}},shadowMapWidth:{set:function(t){console.warn("THREE.Light: .shadowMapWidth is now .shadow.mapSize.width."),this.shadow.mapSize.width=t}},shadowMapHeight:{set:function(t){console.warn("THREE.Light: .shadowMapHeight is now .shadow.mapSize.height."),this.shadow.mapSize.height=t}}}),Object.defineProperties(qt.prototype,{length:{get:function(){return console.warn("THREE.BufferAttribute: .length has been deprecated. Use .count instead."),this.array.length}},dynamic:{get:function(){return console.warn("THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead."),35048===this.usage},set:function(){console.warn("THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead."),this.setUsage(35048)}}}),Object.assign(qt.prototype,{setDynamic:function(t){return console.warn("THREE.BufferAttribute: .setDynamic() has been deprecated. Use .setUsage() instead."),this.setUsage(!0===t?35048:35044),this},copyIndicesArray:function(){console.error("THREE.BufferAttribute: .copyIndicesArray() has been removed.")},setArray:function(){console.error("THREE.BufferAttribute: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers")}}),Object.assign(he.prototype,{addIndex:function(t){console.warn("THREE.BufferGeometry: .addIndex() has been renamed to .setIndex()."),this.setIndex(t)},addAttribute:function(t,e){return console.warn("THREE.BufferGeometry: .addAttribute() has been renamed to .setAttribute()."),e&&e.isBufferAttribute||e&&e.isInterleavedBufferAttribute?"index"===t?(console.warn("THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute."),this.setIndex(e),this):this.setAttribute(t,e):(console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."),this.setAttribute(t,new qt(arguments[1],arguments[2])))},addDrawCall:function(t,e,n){void 0!==n&&console.warn("THREE.BufferGeometry: .addDrawCall() no longer supports indexOffset."),console.warn("THREE.BufferGeometry: .addDrawCall() is now .addGroup()."),this.addGroup(t,e)},clearDrawCalls:function(){console.warn("THREE.BufferGeometry: .clearDrawCalls() is now .clearGroups()."),this.clearGroups()},computeTangents:function(){console.warn("THREE.BufferGeometry: .computeTangents() has been removed.")},computeOffsets:function(){console.warn("THREE.BufferGeometry: .computeOffsets() has been removed.")},removeAttribute:function(t){return console.warn("THREE.BufferGeometry: .removeAttribute() has been renamed to .deleteAttribute()."),this.deleteAttribute(t)},applyMatrix:function(t){return console.warn("THREE.BufferGeometry: .applyMatrix() has been renamed to .applyMatrix4()."),this.applyMatrix4(t)}}),Object.defineProperties(he.prototype,{drawcalls:{get:function(){return console.error("THREE.BufferGeometry: .drawcalls has been renamed to .groups."),this.groups}},offsets:{get:function(){return console.warn("THREE.BufferGeometry: .offsets has been renamed to .groups."),this.groups}}}),Object.defineProperties(da.prototype,{maxInstancedCount:{get:function(){return console.warn("THREE.InstancedBufferGeometry: .maxInstancedCount has been renamed to .instanceCount."),this.instanceCount},set:function(t){console.warn("THREE.InstancedBufferGeometry: .maxInstancedCount has been renamed to .instanceCount."),this.instanceCount=t}}}),Object.defineProperties(Wa.prototype,{linePrecision:{get:function(){return console.warn("THREE.Raycaster: .linePrecision has been deprecated. Use .params.Line.threshold instead."),this.params.Line.threshold},set:function(t){console.warn("THREE.Raycaster: .linePrecision has been deprecated. Use .params.Line.threshold instead."),this.params.Line.threshold=t}}}),Object.defineProperties(nr.prototype,{dynamic:{get:function(){return console.warn("THREE.InterleavedBuffer: .length has been deprecated. Use .usage instead."),35048===this.usage},set:function(t){console.warn("THREE.InterleavedBuffer: .length has been deprecated. Use .usage instead."),this.setUsage(t)}}}),Object.assign(nr.prototype,{setDynamic:function(t){return console.warn("THREE.InterleavedBuffer: .setDynamic() has been deprecated. Use .setUsage() instead."),this.setUsage(!0===t?35048:35044),this},setArray:function(){console.error("THREE.InterleavedBuffer: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers")}}),Object.assign(zo.prototype,{getArrays:function(){console.error("THREE.ExtrudeBufferGeometry: .getArrays() has been removed.")},addShapeList:function(){console.error("THREE.ExtrudeBufferGeometry: .addShapeList() has been removed.")},addShape:function(){console.error("THREE.ExtrudeBufferGeometry: .addShape() has been removed.")}}),Object.assign(er.prototype,{dispose:function(){console.error("THREE.Scene: .dispose() has been removed.")}}),Object.defineProperties(Ha.prototype,{dynamic:{set:function(){console.warn("THREE.Uniform: .dynamic has been removed. Use object.onBeforeRender() instead.")}},onUpdate:{value:function(){return console.warn("THREE.Uniform: .onUpdate() has been removed. Use object.onBeforeRender() instead."),this}}}),Object.defineProperties(Ht.prototype,{wrapAround:{get:function(){console.warn("THREE.Material: .wrapAround has been removed.")},set:function(){console.warn("THREE.Material: .wrapAround has been removed.")}},overdraw:{get:function(){console.warn("THREE.Material: .overdraw has been removed.")},set:function(){console.warn("THREE.Material: .overdraw has been removed.")}},wrapRGB:{get:function(){return console.warn("THREE.Material: .wrapRGB has been removed."),new Ft}},shading:{get:function(){console.error("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead.")},set:function(t){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=1===t}},stencilMask:{get:function(){return console.warn("THREE."+this.type+": .stencilMask has been removed. Use .stencilFuncMask instead."),this.stencilFuncMask},set:function(t){console.warn("THREE."+this.type+": .stencilMask has been removed. Use .stencilFuncMask instead."),this.stencilFuncMask=t}}}),Object.defineProperties(Xo.prototype,{metal:{get:function(){return console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead."),!1},set:function(){console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead")}}}),Object.defineProperties(qo.prototype,{transparency:{get:function(){return console.warn("THREE.MeshPhysicalMaterial: .transparency has been renamed to .transmission."),this.transmission},set:function(t){console.warn("THREE.MeshPhysicalMaterial: .transparency has been renamed to .transmission."),this.transmission=t}}}),Object.defineProperties(ze.prototype,{derivatives:{get:function(){return console.warn("THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives},set:function(t){console.warn("THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives=t}}}),Object.assign(Qi.prototype,{clearTarget:function(t,e,n,i){console.warn("THREE.WebGLRenderer: .clearTarget() has been deprecated. Use .setRenderTarget() and .clear() instead."),this.setRenderTarget(t),this.clear(e,n,i)},animate:function(t){console.warn("THREE.WebGLRenderer: .animate() is now .setAnimationLoop()."),this.setAnimationLoop(t)},getCurrentRenderTarget:function(){return console.warn("THREE.WebGLRenderer: .getCurrentRenderTarget() is now .getRenderTarget()."),this.getRenderTarget()},getMaxAnisotropy:function(){return console.warn("THREE.WebGLRenderer: .getMaxAnisotropy() is now .capabilities.getMaxAnisotropy()."),this.capabilities.getMaxAnisotropy()},getPrecision:function(){return console.warn("THREE.WebGLRenderer: .getPrecision() is now .capabilities.precision."),this.capabilities.precision},resetGLState:function(){return console.warn("THREE.WebGLRenderer: .resetGLState() is now .state.reset()."),this.state.reset()},supportsFloatTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( 'OES_texture_float' )."),this.extensions.get("OES_texture_float")},supportsHalfFloatTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( 'OES_texture_half_float' )."),this.extensions.get("OES_texture_half_float")},supportsStandardDerivatives:function(){return console.warn("THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( 'OES_standard_derivatives' )."),this.extensions.get("OES_standard_derivatives")},supportsCompressedTextureS3TC:function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( 'WEBGL_compressed_texture_s3tc' )."),this.extensions.get("WEBGL_compressed_texture_s3tc")},supportsCompressedTexturePVRTC:function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( 'WEBGL_compressed_texture_pvrtc' )."),this.extensions.get("WEBGL_compressed_texture_pvrtc")},supportsBlendMinMax:function(){return console.warn("THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( 'EXT_blend_minmax' )."),this.extensions.get("EXT_blend_minmax")},supportsVertexTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsVertexTextures() is now .capabilities.vertexTextures."),this.capabilities.vertexTextures},supportsInstancedArrays:function(){return console.warn("THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( 'ANGLE_instanced_arrays' )."),this.extensions.get("ANGLE_instanced_arrays")},enableScissorTest:function(t){console.warn("THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest()."),this.setScissorTest(t)},initMaterial:function(){console.warn("THREE.WebGLRenderer: .initMaterial() has been removed.")},addPrePlugin:function(){console.warn("THREE.WebGLRenderer: .addPrePlugin() has been removed.")},addPostPlugin:function(){console.warn("THREE.WebGLRenderer: .addPostPlugin() has been removed.")},updateShadowMap:function(){console.warn("THREE.WebGLRenderer: .updateShadowMap() has been removed.")},setFaceCulling:function(){console.warn("THREE.WebGLRenderer: .setFaceCulling() has been removed.")},allocTextureUnit:function(){console.warn("THREE.WebGLRenderer: .allocTextureUnit() has been removed.")},setTexture:function(){console.warn("THREE.WebGLRenderer: .setTexture() has been removed.")},setTexture2D:function(){console.warn("THREE.WebGLRenderer: .setTexture2D() has been removed.")},setTextureCube:function(){console.warn("THREE.WebGLRenderer: .setTextureCube() has been removed.")},getActiveMipMapLevel:function(){return console.warn("THREE.WebGLRenderer: .getActiveMipMapLevel() is now .getActiveMipmapLevel()."),this.getActiveMipmapLevel()}}),Object.defineProperties(Qi.prototype,{shadowMapEnabled:{get:function(){return this.shadowMap.enabled},set:function(t){console.warn("THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled."),this.shadowMap.enabled=t}},shadowMapType:{get:function(){return this.shadowMap.type},set:function(t){console.warn("THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type."),this.shadowMap.type=t}},shadowMapCullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")}},context:{get:function(){return console.warn("THREE.WebGLRenderer: .context has been removed. Use .getContext() instead."),this.getContext()}},vr:{get:function(){return console.warn("THREE.WebGLRenderer: .vr has been renamed to .xr"),this.xr}},gammaInput:{get:function(){return console.warn("THREE.WebGLRenderer: .gammaInput has been removed. Set the encoding for textures via Texture.encoding instead."),!1},set:function(){console.warn("THREE.WebGLRenderer: .gammaInput has been removed. Set the encoding for textures via Texture.encoding instead.")}},gammaOutput:{get:function(){return console.warn("THREE.WebGLRenderer: .gammaOutput has been removed. Set WebGLRenderer.outputEncoding instead."),!1},set:function(t){console.warn("THREE.WebGLRenderer: .gammaOutput has been removed. Set WebGLRenderer.outputEncoding instead."),this.outputEncoding=!0===t?3001:3e3}},toneMappingWhitePoint:{get:function(){return console.warn("THREE.WebGLRenderer: .toneMappingWhitePoint has been removed."),1},set:function(){console.warn("THREE.WebGLRenderer: .toneMappingWhitePoint has been removed.")}}}),Object.defineProperties(Vi.prototype,{cullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")}},renderReverseSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")}},renderSingleSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")}}}),Object.defineProperties(m.prototype,{wrapS:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS},set:function(t){console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS=t}},wrapT:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT},set:function(t){console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT=t}},magFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter},set:function(t){console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter=t}},minFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter},set:function(t){console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter=t}},anisotropy:{get:function(){return console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy},set:function(t){console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy=t}},offset:{get:function(){return console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset},set:function(t){console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset=t}},repeat:{get:function(){return console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat},set:function(t){console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat=t}},format:{get:function(){return console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format},set:function(t){console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format=t}},type:{get:function(){return console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type},set:function(t){console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type=t}},generateMipmaps:{get:function(){return console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps},set:function(t){console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps=t}}}),Object.defineProperties(La.prototype,{load:{value:function(t){console.warn("THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.");const e=this;return(new Sa).load(t,(function(t){e.setBuffer(t)})),this}},startTime:{set:function(){console.warn("THREE.Audio: .startTime is now .play( delay ).")}}}),class{constructor(t,e){this.analyser=t.context.createAnalyser(),this.analyser.fftSize=void 0!==e?e:2048,this.data=new Uint8Array(this.analyser.frequencyBinCount),t.getOutput().connect(this.analyser)}getFrequencyData(){return this.analyser.getByteFrequencyData(this.data),this.data}getAverageFrequency(){let t=0;const e=this.getFrequencyData();for(let n=0;n<e.length;n++)t+=e[n];return t/e.length}}.prototype.getData=function(){return console.warn("THREE.AudioAnalyser: .getData() is now .getFrequencyData()."),this.getFrequencyData()},Fe.prototype.updateCubeMap=function(t,e){return console.warn("THREE.CubeCamera: .updateCubeMap() is now .update()."),this.update(t,e)},Fe.prototype.clear=function(t,e,n,i){return console.warn("THREE.CubeCamera: .clear() is now .renderTarget.clear()."),this.renderTarget.clear(t,e,n,i)};h.crossOrigin=void 0,h.loadTexture=function(t,e,n,i){console.warn("THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.");const r=new Ts;r.setCrossOrigin(this.crossOrigin);const o=r.load(t,n,void 0,i);return e&&(o.mapping=e),o},h.loadTextureCube=function(t,e,n,i){console.warn("THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.");const r=new Ms;r.setCrossOrigin(this.crossOrigin);const o=r.load(t,n,void 0,i);return e&&(o.mapping=e),o},h.loadCompressedTexture=function(){console.error("THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.")},h.loadCompressedTextureCube=function(){console.error("THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead.")};"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:"122"}}))},Wr5T:function(t,e){!function(){"use strict";if("object"==typeof window)if("IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype)"isIntersecting"in window.IntersectionObserverEntry.prototype||Object.defineProperty(window.IntersectionObserverEntry.prototype,"isIntersecting",{get:function(){return this.intersectionRatio>0}});else{var t=function(t){for(var e=window.document,n=r(e);n;)n=r(e=n.ownerDocument);return e}(),e=[],n=null,i=null;s.prototype.THROTTLE_TIMEOUT=100,s.prototype.POLL_INTERVAL=null,s.prototype.USE_MUTATION_OBSERVER=!0,s._setupCrossOriginUpdater=function(){return n||(n=function(t,n){i=t&&n?h(t,n):{top:0,bottom:0,left:0,right:0,width:0,height:0},e.forEach((function(t){t._checkForIntersections()}))}),n},s._resetCrossOriginUpdater=function(){n=null,i=null},s.prototype.observe=function(t){if(!this._observationTargets.some((function(e){return e.element==t}))){if(!t||1!=t.nodeType)throw new Error("target must be an Element");this._registerInstance(),this._observationTargets.push({element:t,entry:null}),this._monitorIntersections(t.ownerDocument),this._checkForIntersections()}},s.prototype.unobserve=function(t){this._observationTargets=this._observationTargets.filter((function(e){return e.element!=t})),this._unmonitorIntersections(t.ownerDocument),0==this._observationTargets.length&&this._unregisterInstance()},s.prototype.disconnect=function(){this._observationTargets=[],this._unmonitorAllIntersections(),this._unregisterInstance()},s.prototype.takeRecords=function(){var t=this._queuedEntries.slice();return this._queuedEntries=[],t},s.prototype._initThresholds=function(t){var e=t||[0];return Array.isArray(e)||(e=[e]),e.sort().filter((function(t,e,n){if("number"!=typeof t||isNaN(t)||t<0||t>1)throw new Error("threshold must be a number between 0 and 1 inclusively");return t!==n[e-1]}))},s.prototype._parseRootMargin=function(t){var e=(t||"0px").split(/\s+/).map((function(t){var e=/^(-?\d*\.?\d+)(px|%)$/.exec(t);if(!e)throw new Error("rootMargin must be specified in pixels or percent");return{value:parseFloat(e[1]),unit:e[2]}}));return e[1]=e[1]||e[0],e[2]=e[2]||e[0],e[3]=e[3]||e[1],e},s.prototype._monitorIntersections=function(e){var n=e.defaultView;if(n&&-1==this._monitoringDocuments.indexOf(e)){var i=this._checkForIntersections,o=null,s=null;if(this.POLL_INTERVAL?o=n.setInterval(i,this.POLL_INTERVAL):(a(n,"resize",i,!0),a(e,"scroll",i,!0),this.USE_MUTATION_OBSERVER&&"MutationObserver"in n&&(s=new n.MutationObserver(i)).observe(e,{attributes:!0,childList:!0,characterData:!0,subtree:!0})),this._monitoringDocuments.push(e),this._monitoringUnsubscribes.push((function(){var t=e.defaultView;t&&(o&&t.clearInterval(o),l(t,"resize",i,!0)),l(e,"scroll",i,!0),s&&s.disconnect()})),e!=(this.root&&this.root.ownerDocument||t)){var c=r(e);c&&this._monitorIntersections(c.ownerDocument)}}},s.prototype._unmonitorIntersections=function(e){var n=this._monitoringDocuments.indexOf(e);if(-1!=n){var i=this.root&&this.root.ownerDocument||t;if(!this._observationTargets.some((function(t){var n=t.element.ownerDocument;if(n==e)return!0;for(;n&&n!=i;){var o=r(n);if((n=o&&o.ownerDocument)==e)return!0}return!1}))){var o=this._monitoringUnsubscribes[n];if(this._monitoringDocuments.splice(n,1),this._monitoringUnsubscribes.splice(n,1),o(),e!=i){var s=r(e);s&&this._unmonitorIntersections(s.ownerDocument)}}}},s.prototype._unmonitorAllIntersections=function(){var t=this._monitoringUnsubscribes.slice(0);this._monitoringDocuments.length=0,this._monitoringUnsubscribes.length=0;for(var e=0;e<t.length;e++)t[e]()},s.prototype._checkForIntersections=function(){if(this.root||!n||i){var t=this._rootIsInDom(),e=t?this._getRootRect():{top:0,bottom:0,left:0,right:0,width:0,height:0};this._observationTargets.forEach((function(i){var r=i.element,s=c(r),a=this._rootContainsTarget(r),l=i.entry,u=t&&a&&this._computeTargetAndRootIntersection(r,s,e),h=i.entry=new o({time:window.performance&&performance.now&&performance.now(),target:r,boundingClientRect:s,rootBounds:n&&!this.root?null:e,intersectionRect:u});l?t&&a?this._hasCrossedThreshold(l,h)&&this._queuedEntries.push(h):l&&l.isIntersecting&&this._queuedEntries.push(h):this._queuedEntries.push(h)}),this),this._queuedEntries.length&&this._callback(this.takeRecords(),this)}},s.prototype._computeTargetAndRootIntersection=function(e,r,o){if("none"!=window.getComputedStyle(e).display){for(var s,a,l,u,d,f,m,g,v=r,y=p(e),b=!1;!b&&y;){var x=null,w=1==y.nodeType?window.getComputedStyle(y):{};if("none"==w.display)return null;if(y==this.root||9==y.nodeType)if(b=!0,y==this.root||y==t)n&&!this.root?!i||0==i.width&&0==i.height?(y=null,x=null,v=null):x=i:x=o;else{var _=p(y),S=_&&c(_),M=_&&this._computeTargetAndRootIntersection(_,S,o);S&&M?(y=_,x=h(S,M)):(y=null,v=null)}else{var E=y.ownerDocument;y!=E.body&&y!=E.documentElement&&"visible"!=w.overflow&&(x=c(y))}if(x&&(s=x,a=v,l=void 0,u=void 0,d=void 0,f=void 0,m=void 0,g=void 0,l=Math.max(s.top,a.top),u=Math.min(s.bottom,a.bottom),d=Math.max(s.left,a.left),f=Math.min(s.right,a.right),g=u-l,v=(m=f-d)>=0&&g>=0&&{top:l,bottom:u,left:d,right:f,width:m,height:g}||null),!v)break;y=y&&p(y)}return v}},s.prototype._getRootRect=function(){var e;if(this.root)e=c(this.root);else{var n=t.documentElement,i=t.body;e={top:0,left:0,right:n.clientWidth||i.clientWidth,width:n.clientWidth||i.clientWidth,bottom:n.clientHeight||i.clientHeight,height:n.clientHeight||i.clientHeight}}return this._expandRectByRootMargin(e)},s.prototype._expandRectByRootMargin=function(t){var e=this._rootMarginValues.map((function(e,n){return"px"==e.unit?e.value:e.value*(n%2?t.width:t.height)/100})),n={top:t.top-e[0],right:t.right+e[1],bottom:t.bottom+e[2],left:t.left-e[3]};return n.width=n.right-n.left,n.height=n.bottom-n.top,n},s.prototype._hasCrossedThreshold=function(t,e){var n=t&&t.isIntersecting?t.intersectionRatio||0:-1,i=e.isIntersecting?e.intersectionRatio||0:-1;if(n!==i)for(var r=0;r<this.thresholds.length;r++){var o=this.thresholds[r];if(o==n||o==i||o<n!=o<i)return!0}},s.prototype._rootIsInDom=function(){return!this.root||d(t,this.root)},s.prototype._rootContainsTarget=function(e){return d(this.root||t,e)&&(!this.root||this.root.ownerDocument==e.ownerDocument)},s.prototype._registerInstance=function(){e.indexOf(this)<0&&e.push(this)},s.prototype._unregisterInstance=function(){var t=e.indexOf(this);-1!=t&&e.splice(t,1)},window.IntersectionObserver=s,window.IntersectionObserverEntry=o}function r(t){try{return t.defaultView&&t.defaultView.frameElement||null}catch(t){return null}}function o(t){this.time=t.time,this.target=t.target,this.rootBounds=u(t.rootBounds),this.boundingClientRect=u(t.boundingClientRect),this.intersectionRect=u(t.intersectionRect||{top:0,bottom:0,left:0,right:0,width:0,height:0}),this.isIntersecting=!!t.intersectionRect;var e=this.boundingClientRect,n=e.width*e.height,i=this.intersectionRect,r=i.width*i.height;this.intersectionRatio=n?Number((r/n).toFixed(4)):this.isIntersecting?1:0}function s(t,e){var n,i,r,o=e||{};if("function"!=typeof t)throw new Error("callback must be a function");if(o.root&&1!=o.root.nodeType)throw new Error("root must be an Element");this._checkForIntersections=(n=this._checkForIntersections.bind(this),i=this.THROTTLE_TIMEOUT,r=null,function(){r||(r=setTimeout((function(){n(),r=null}),i))}),this._callback=t,this._observationTargets=[],this._queuedEntries=[],this._rootMarginValues=this._parseRootMargin(o.rootMargin),this.thresholds=this._initThresholds(o.threshold),this.root=o.root||null,this.rootMargin=this._rootMarginValues.map((function(t){return t.value+t.unit})).join(" "),this._monitoringDocuments=[],this._monitoringUnsubscribes=[]}function a(t,e,n,i){"function"==typeof t.addEventListener?t.addEventListener(e,n,i||!1):"function"==typeof t.attachEvent&&t.attachEvent("on"+e,n)}function l(t,e,n,i){"function"==typeof t.removeEventListener?t.removeEventListener(e,n,i||!1):"function"==typeof t.detatchEvent&&t.detatchEvent("on"+e,n)}function c(t){var e;try{e=t.getBoundingClientRect()}catch(t){}return e?(e.width&&e.height||(e={top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.right-e.left,height:e.bottom-e.top}),e):{top:0,bottom:0,left:0,right:0,width:0,height:0}}function u(t){return!t||"x"in t?t:{top:t.top,y:t.top,bottom:t.bottom,left:t.left,x:t.left,right:t.right,width:t.width,height:t.height}}function h(t,e){var n=e.top-t.top,i=e.left-t.left;return{top:n,left:i,height:e.height,width:e.width,bottom:n+e.height,right:i+e.width}}function d(t,e){for(var n=e;n;){if(n==t)return!0;n=p(n)}return!1}function p(e){var n=e.parentNode;return 9==e.nodeType&&e!=t?r(e):n&&11==n.nodeType&&n.host?n.host:n&&n.assignedSlot?n.assignedSlot.parentNode:n}}()},XKFU:function(t,e,n){var i=n("dyZX"),r=n("g3g5"),o=n("Mukb"),s=n("KroJ"),a=n("m0Pp"),l=function(t,e,n){var c,u,h,d,p=t&l.F,f=t&l.G,m=t&l.S,g=t&l.P,v=t&l.B,y=f?i:m?i[e]||(i[e]={}):(i[e]||{}).prototype,b=f?r:r[e]||(r[e]={}),x=b.prototype||(b.prototype={});for(c in f&&(n=e),n)h=((u=!p&&y&&void 0!==y[c])?y:n)[c],d=v&&u?a(h,i):g&&"function"==typeof h?a(Function.call,h):h,y&&s(y,c,h,t&l.U),b[c]!=h&&o(b,c,d),g&&x[c]!=h&&(x[c]=h)};i.core=r,l.F=1,l.G=2,l.S=4,l.P=8,l.B=16,l.W=32,l.U=64,l.R=128,t.exports=l},XMVh:function(t,e,n){var i=n("K0xU")("iterator"),r=!1;try{var o=[7][i]();o.return=function(){r=!0},Array.from(o,(function(){throw 2}))}catch(t){}t.exports=function(t,e){if(!e&&!r)return!1;var n=!1;try{var o=[7],s=o[i]();s.next=function(){return{done:n=!0}},o[i]=function(){return s},t(o)}catch(t){}return n}},Xbzi:function(t,e,n){var i=n("0/R4"),r=n("i5dc").set;t.exports=function(t,e,n){var o,s=e.constructor;return s!==n&&"function"==typeof s&&(o=s.prototype)!==n.prototype&&i(o)&&r&&r(t,o),t}},XfO3:function(t,e,n){"use strict";var i=n("AvRE")(!0);n("Afnz")(String,"String",(function(t){this._t=String(t),this._i=0}),(function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=i(e,n),this._i+=t.length,{value:t,done:!1})}))},Xtr8:function(t,e,n){var i=n("XKFU"),r=n("g3g5"),o=n("eeVq");t.exports=function(t,e){var n=(r.Object||{})[t]||Object[t],s={};s[t]=e(n),i(i.S+i.F*o((function(){n(1)})),"Object",s)}},Xxuz:function(t,e,n){"use strict";var i=n("I8a+"),r=RegExp.prototype.exec;t.exports=function(t,e){var n=t.exec;if("function"==typeof n){var o=n.call(t,e);if("object"!=typeof o)throw new TypeError("RegExp exec method returned something other than an Object or null");return o}if("RegExp"!==i(t))throw new TypeError("RegExp#exec called on incompatible receiver");return r.call(t,e)}},Y9lz:function(t,e,n){n("7DDg")("Float32",4,(function(t){return function(e,n,i){return t(this,e,n,i)}}))},YTvA:function(t,e,n){var i=n("VTer")("keys"),r=n("ylqs");t.exports=function(t){return i[t]||(i[t]=r(t))}},Ymqv:function(t,e,n){var i=n("LZWt");t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==i(t)?t.split(""):Object(t)}},Z2Ku:function(t,e,n){"use strict";var i=n("XKFU"),r=n("w2a5")(!0);i(i.P,"Array",{includes:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}}),n("nGyu")("includes")},Z6vF:function(t,e,n){var i=n("ylqs")("meta"),r=n("0/R4"),o=n("aagx"),s=n("hswa").f,a=0,l=Object.isExtensible||function(){return!0},c=!n("eeVq")((function(){return l(Object.preventExtensions({}))})),u=function(t){s(t,i,{value:{i:"O"+ ++a,w:{}}})},h=t.exports={KEY:i,NEED:!1,fastKey:function(t,e){if(!r(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!o(t,i)){if(!l(t))return"F";if(!e)return"E";u(t)}return t[i].i},getWeak:function(t,e){if(!o(t,i)){if(!l(t))return!0;if(!e)return!1;u(t)}return t[i].w},onFreeze:function(t){return c&&h.NEED&&l(t)&&!o(t,i)&&u(t),t}}},a1Th:function(t,e,n){"use strict";n("OEbY");var i=n("y3w9"),r=n("C/va"),o=n("nh4g"),s=/./.toString,a=function(t){n("KroJ")(RegExp.prototype,"toString",t,!0)};n("eeVq")((function(){return"/a/b"!=s.call({source:"a",flags:"b"})}))?a((function(){var t=i(this);return"/".concat(t.source,"/","flags"in t?t.flags:!o&&t instanceof RegExp?r.call(t):void 0)})):"toString"!=s.name&&a((function(){return s.call(this)}))},aCFj:function(t,e,n){var i=n("Ymqv"),r=n("vhPU");t.exports=function(t){return i(r(t))}},aTL9:function(t,e){},aagx:function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},apmT:function(t,e,n){var i=n("0/R4");t.exports=function(t,e){if(!i(t))return t;var n,r;if(e&&"function"==typeof(n=t.toString)&&!i(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!i(r=n.call(t)))return r;if(!e&&"function"==typeof(n=t.toString)&&!i(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")}},bdgK:function(t,e,n){"use strict";(function(t){var n=function(){if("undefined"!=typeof Map)return Map;function t(t,e){var n=-1;return t.some((function(t,i){return t[0]===e&&(n=i,!0)})),n}return function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(e){var n=t(this.__entries__,e),i=this.__entries__[n];return i&&i[1]},e.prototype.set=function(e,n){var i=t(this.__entries__,e);~i?this.__entries__[i][1]=n:this.__entries__.push([e,n])},e.prototype.delete=function(e){var n=this.__entries__,i=t(n,e);~i&&n.splice(i,1)},e.prototype.has=function(e){return!!~t(this.__entries__,e)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(t,e){void 0===e&&(e=null);for(var n=0,i=this.__entries__;n<i.length;n++){var r=i[n];t.call(e,r[1],r[0])}},e}()}(),i="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,r=void 0!==t&&t.Math===Math?t:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),o="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(r):function(t){return setTimeout((function(){return t(Date.now())}),1e3/60)};var s=["top","right","bottom","left","width","height","size","weight"],a="undefined"!=typeof MutationObserver,l=function(){function t(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(t,e){var n=!1,i=!1,r=0;function s(){n&&(n=!1,t()),i&&l()}function a(){o(s)}function l(){var t=Date.now();if(n){if(t-r<2)return;i=!0}else n=!0,i=!1,setTimeout(a,e);r=t}return l}(this.refresh.bind(this),20)}return t.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},t.prototype.removeObserver=function(t){var e=this.observers_,n=e.indexOf(t);~n&&e.splice(n,1),!e.length&&this.connected_&&this.disconnect_()},t.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},t.prototype.updateObservers_=function(){var t=this.observers_.filter((function(t){return t.gatherActive(),t.hasActive()}));return t.forEach((function(t){return t.broadcastActive()})),t.length>0},t.prototype.connect_=function(){i&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),a?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){i&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(t){var e=t.propertyName,n=void 0===e?"":e;s.some((function(t){return!!~n.indexOf(t)}))&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),c=function(t,e){for(var n=0,i=Object.keys(e);n<i.length;n++){var r=i[n];Object.defineProperty(t,r,{value:e[r],enumerable:!1,writable:!1,configurable:!0})}return t},u=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||r},h=v(0,0,0,0);function d(t){return parseFloat(t)||0}function p(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return e.reduce((function(e,n){return e+d(t["border-"+n+"-width"])}),0)}function f(t){var e=t.clientWidth,n=t.clientHeight;if(!e&&!n)return h;var i=u(t).getComputedStyle(t),r=function(t){for(var e={},n=0,i=["top","right","bottom","left"];n<i.length;n++){var r=i[n],o=t["padding-"+r];e[r]=d(o)}return e}(i),o=r.left+r.right,s=r.top+r.bottom,a=d(i.width),l=d(i.height);if("border-box"===i.boxSizing&&(Math.round(a+o)!==e&&(a-=p(i,"left","right")+o),Math.round(l+s)!==n&&(l-=p(i,"top","bottom")+s)),!function(t){return t===u(t).document.documentElement}(t)){var c=Math.round(a+o)-e,f=Math.round(l+s)-n;1!==Math.abs(c)&&(a-=c),1!==Math.abs(f)&&(l-=f)}return v(r.left,r.top,a,l)}var m="undefined"!=typeof SVGGraphicsElement?function(t){return t instanceof u(t).SVGGraphicsElement}:function(t){return t instanceof u(t).SVGElement&&"function"==typeof t.getBBox};function g(t){return i?m(t)?function(t){var e=t.getBBox();return v(0,0,e.width,e.height)}(t):f(t):h}function v(t,e,n,i){return{x:t,y:e,width:n,height:i}}var y=function(){function t(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=v(0,0,0,0),this.target=t}return t.prototype.isActive=function(){var t=g(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},t.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},t}(),b=function(t,e){var n,i,r,o,s,a,l,u=(i=(n=e).x,r=n.y,o=n.width,s=n.height,a="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,l=Object.create(a.prototype),c(l,{x:i,y:r,width:o,height:s,top:r,right:i+o,bottom:s+r,left:i}),l);c(this,{target:t,contentRect:u})},x=function(){function t(t,e,i){if(this.activeObservations_=[],this.observations_=new n,"function"!=typeof t)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=e,this.callbackCtx_=i}return t.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof u(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)||(e.set(t,new y(t)),this.controller_.addObserver(this),this.controller_.refresh())}},t.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof u(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)&&(e.delete(t),e.size||this.controller_.removeObserver(this))}},t.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},t.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach((function(e){e.isActive()&&t.activeObservations_.push(e)}))},t.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,e=this.activeObservations_.map((function(t){return new b(t.target,t.broadcastRect())}));this.callback_.call(t,e,t),this.clearActive()}},t.prototype.clearActive=function(){this.activeObservations_.splice(0)},t.prototype.hasActive=function(){return this.activeObservations_.length>0},t}(),w="undefined"!=typeof WeakMap?new WeakMap:new n,_=function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=l.getInstance(),i=new x(e,n,this);w.set(this,i)};["observe","unobserve","disconnect"].forEach((function(t){_.prototype[t]=function(){var e;return(e=w.get(this))[t].apply(e,arguments)}}));var S=void 0!==r.ResizeObserver?r.ResizeObserver:_;e.a=S}).call(this,n("yLpj"))},bh9V:function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n("Womt"),r=n("k0mU"),o=function(t){var e=new i.k,n=document.querySelector(".price__canvas").dataset.snowImage01,o=document.querySelector(".price__canvas").dataset.snowImage02,s={uTexture01:{value:e.load(n)},uTexture02:{value:e.load(o)}};return new r.a(t,{meshNum:3,instanceNum:80,particleWidth:80,particleHeight:80,fallSpeed:{max:.05,min:.02},rotateSpeed:{max:.03,min:.01},shrinkRate:{max:1,min:.08},positionRangeRatio:.2,color:new i.a(16777215),vertexShader:"\n  attribute vec3 offsetPosition;\n  attribute vec3 initialRotate; // 回転の初期値\n  attribute float fallSpeed;\n  attribute float rotateSpeed;\n  attribute float shrinkRate;\n  \n  varying vec2 vUv;\n  varying float vShrinkRate;\n  \n  uniform float uTime;\n  uniform vec2 windowSize;\n  \n  highp mat2 rotate(float rad){\n      return mat2(cos(rad),sin(rad),-sin(rad),cos(rad));\n  }\n  \n  void main() {\n      vUv = uv;\n      vShrinkRate = shrinkRate;\n  \n      vec3 originPos = position * shrinkRate; // 大きさをばらつかせる\n      vec3 offsetPos = offsetPosition;\n  \n      // 回転角に初期値を足しておくことで開始角をずらす\n      float angleX = initialRotate.x + uTime * rotateSpeed;\n      float angleY = initialRotate.y + uTime * rotateSpeed;\n      float angleZ = initialRotate.z + uTime * rotateSpeed;\n  \n      // 回転\n      originPos.xy *= rotate(angleY);\n      \n      // 下降\n      float visibleAreaY = windowSize.y * 2.0; // パーティクルは画面高さの2倍まで表示、超えたら消えて反対から出てくる\n      float initialPercent = offsetPosition.y / visibleAreaY; // 初期位置の画面内での割合\n      float currentPercent = (uTime / 100.0) * fallSpeed + initialPercent;\n      offsetPos.y = -(fract(currentPercent) - 0.5) * visibleAreaY; // fractの結果を-0.5~0.5にして表示エリアの分拡大\n      \n      vec4 mvPosition = modelViewMatrix * vec4(originPos + offsetPos, 1.0);\n      gl_Position = projectionMatrix * mvPosition;\n  }\n    ",fragmentShader:"\n  uniform vec3 uColor;\n  uniform sampler2D uTexture01;\n  uniform sampler2D uTexture02;\n  \n  varying vec2 vUv;\n  varying float vShrinkRate;\n  \n  float maxBrightness = 2.0;\n  float textureShrinkRate = 0.7; // この閾値以上だとテクスチャを持つ\n  float bigTextureShrinkRate = 0.92;\n  \n  void main() {\n      vec2 uv = vUv;\n      vec3 color = uColor;\n  \n  \n      // 中心からぼやかすようなグラデ\n      float brightness  = (1.0 - vShrinkRate) * maxBrightness; // 小さいものほど濃くなるよう調整\n      float value = brightness - distance(uv, vec2(0.5)) * (brightness * 2.0) ;\n  \n      // 円形の雪とテクスチャを使った結晶の雪を用意し、パーティクルの大きさからどちらを使うか決定\n      // 円形な方のパーティクル\n      vec4 simpleSnowColor = vec4(color, value);\n      // テクスチャ（2つのどちらを使うかを決める）\n      vec4 textrueSnowColor = (vShrinkRate > bigTextureShrinkRate) ? vec4(texture2D( uTexture02, uv )) : vec4(texture2D( uTexture01, uv )); \n  \n      vec4 fragColor = (vShrinkRate > textureShrinkRate) ? textrueSnowColor : simpleSnowColor;\n  \n      gl_FragColor = vec4(fragColor);\n  }\n    ",optionalUniforms:s,optionalMaterialParam:{transparent:!0}})}},"d/Gc":function(t,e,n){var i=n("RYi7"),r=Math.max,o=Math.min;t.exports=function(t,e){return(t=i(t))<0?r(t+e,0):o(t,e)}},dIo1:function(t,e){},dr3B:function(t,e,n){"use strict";n.d(e,"a",(function(){return o})),n.d(e,"c",(function(){return s})),n.d(e,"b",(function(){return a}));n("f3/d"),n("a1Th"),n("Btvt"),n("XfO3"),n("HEwt"),n("rGqo"),n("rE2o"),n("ioFf");function i(t){return function(t){if(Array.isArray(t))return r(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return r(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return r(t,e)}(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 r(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}var o=function(t){for(var e=[],n=i(t.querySelectorAll('[data-accordion="header"]')),r=0;r<n.length;r++){var o=n[r].getAttribute("aria-controls"),s=t.querySelector("#".concat(o));e.push({header:n[r],content:s})}return e},s=function(t){var e=t.header,n=t.content;if("true"===n.getAttribute("aria-hidden"))e.setAttribute("aria-expanded","true"),n.setAttribute("aria-hidden","false"),n.style.height=n.scrollHeight+"px";else{e.setAttribute("aria-expanded","false"),n.setAttribute("aria-hidden","true");var i=n.dataset.height?n.dataset.height:0;n.style.height=i+"px"}},a=function(t){if("true"!==t.getAttribute("aria-hidden")){for(var e=t.children,n=0,i=0;i<e.length;i++)n+=e[i].scrollHeight;t.style.height=n+"px"}}},dwco:function(t,e,n){!function(){"use strict";t.exports={polyfill:function(){var t=window,e=document;if(!("scrollBehavior"in e.documentElement.style)||!0===t.__forceSmoothScrollPolyfill__){var n,i=t.HTMLElement||t.Element,r={scroll:t.scroll||t.scrollTo,scrollBy:t.scrollBy,elementScroll:i.prototype.scroll||a,scrollIntoView:i.prototype.scrollIntoView},o=t.performance&&t.performance.now?t.performance.now.bind(t.performance):Date.now,s=(n=t.navigator.userAgent,new RegExp(["MSIE ","Trident/","Edge/"].join("|")).test(n)?1:0);t.scroll=t.scrollTo=function(){void 0!==arguments[0]&&(!0!==l(arguments[0])?f.call(t,e.body,void 0!==arguments[0].left?~~arguments[0].left:t.scrollX||t.pageXOffset,void 0!==arguments[0].top?~~arguments[0].top:t.scrollY||t.pageYOffset):r.scroll.call(t,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:t.scrollX||t.pageXOffset,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:t.scrollY||t.pageYOffset))},t.scrollBy=function(){void 0!==arguments[0]&&(l(arguments[0])?r.scrollBy.call(t,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:0,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:0):f.call(t,e.body,~~arguments[0].left+(t.scrollX||t.pageXOffset),~~arguments[0].top+(t.scrollY||t.pageYOffset)))},i.prototype.scroll=i.prototype.scrollTo=function(){if(void 0!==arguments[0])if(!0!==l(arguments[0])){var t=arguments[0].left,e=arguments[0].top;f.call(this,this,void 0===t?this.scrollLeft:~~t,void 0===e?this.scrollTop:~~e)}else{if("number"==typeof arguments[0]&&void 0===arguments[1])throw new SyntaxError("Value could not be converted");r.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left:"object"!=typeof arguments[0]?~~arguments[0]:this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top:void 0!==arguments[1]?~~arguments[1]:this.scrollTop)}},i.prototype.scrollBy=function(){void 0!==arguments[0]&&(!0!==l(arguments[0])?this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior}):r.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop))},i.prototype.scrollIntoView=function(){if(!0!==l(arguments[0])){var n=d(this),i=n.getBoundingClientRect(),o=this.getBoundingClientRect();n!==e.body?(f.call(this,n,n.scrollLeft+o.left-i.left,n.scrollTop+o.top-i.top),"fixed"!==t.getComputedStyle(n).position&&t.scrollBy({left:i.left,top:i.top,behavior:"smooth"})):t.scrollBy({left:o.left,top:o.top,behavior:"smooth"})}else r.scrollIntoView.call(this,void 0===arguments[0]||arguments[0])}}function a(t,e){this.scrollLeft=t,this.scrollTop=e}function l(t){if(null===t||"object"!=typeof t||void 0===t.behavior||"auto"===t.behavior||"instant"===t.behavior)return!0;if("object"==typeof t&&"smooth"===t.behavior)return!1;throw new TypeError("behavior member of ScrollOptions "+t.behavior+" is not a valid value for enumeration ScrollBehavior.")}function c(t,e){return"Y"===e?t.clientHeight+s<t.scrollHeight:"X"===e?t.clientWidth+s<t.scrollWidth:void 0}function u(e,n){var i=t.getComputedStyle(e,null)["overflow"+n];return"auto"===i||"scroll"===i}function h(t){var e=c(t,"Y")&&u(t,"Y"),n=c(t,"X")&&u(t,"X");return e||n}function d(t){for(;t!==e.body&&!1===h(t);)t=t.parentNode||t.host;return t}function p(e){var n,i,r,s,a=(o()-e.startTime)/468;s=a=a>1?1:a,n=.5*(1-Math.cos(Math.PI*s)),i=e.startX+(e.x-e.startX)*n,r=e.startY+(e.y-e.startY)*n,e.method.call(e.scrollable,i,r),i===e.x&&r===e.y||t.requestAnimationFrame(p.bind(t,e))}function f(n,i,s){var l,c,u,h,d=o();n===e.body?(l=t,c=t.scrollX||t.pageXOffset,u=t.scrollY||t.pageYOffset,h=r.scroll):(l=n,c=n.scrollLeft,u=n.scrollTop,h=a),p({scrollable:l,method:h,startTime:d,startX:c,startY:u,x:i,y:s})}}}}()},dyZX:function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},e7yV:function(t,e,n){var i=n("aCFj"),r=n("kJMx").f,o={}.toString,s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return s&&"[object Window]"==o.call(t)?function(t){try{return r(t)}catch(t){return s.slice()}}(t):r(i(t))}},eeVq:function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},elZq:function(t,e,n){"use strict";var i=n("dyZX"),r=n("hswa"),o=n("nh4g"),s=n("K0xU")("species");t.exports=function(t){var e=i[t];o&&e&&!e[s]&&r.f(e,s,{configurable:!0,get:function(){return this}})}},"f3/d":function(t,e,n){var i=n("hswa").f,r=Function.prototype,o=/^\s*function ([^ (]*)/;"name"in r||n("nh4g")&&i(r,"name",{configurable:!0,get:function(){try{return(""+this).match(o)[1]}catch(t){return""}}})},fyDq:function(t,e,n){var i=n("hswa").f,r=n("aagx"),o=n("K0xU")("toStringTag");t.exports=function(t,e,n){t&&!r(t=n?t:t.prototype,o)&&i(t,o,{configurable:!0,value:e})}},g3g5:function(t,e){var n=t.exports={version:"2.6.11"};"number"==typeof __e&&(__e=n)},g6HL:function(t,e){t.exports=Object.is||function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}},hNct:function(t,e){},hPIQ:function(t,e){t.exports={}},hswa:function(t,e,n){var i=n("y3w9"),r=n("xpql"),o=n("apmT"),s=Object.defineProperty;e.f=n("nh4g")?Object.defineProperty:function(t,e,n){if(i(t),e=o(e,!0),i(n),r)try{return s(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},i5dc:function(t,e,n){var i=n("0/R4"),r=n("y3w9"),o=function(t,e){if(r(t),!i(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,i){try{(i=n("m0Pp")(Function.call,n("EemH").f(Object.prototype,"__proto__").set,2))(t,[]),e=!(t instanceof Array)}catch(t){e=!0}return function(t,n){return o(t,n),e?t.__proto__=n:i(t,n),t}}({},!1):void 0),check:o}},iF46:function(t,e){},ioFf:function(t,e,n){"use strict";var i=n("dyZX"),r=n("aagx"),o=n("nh4g"),s=n("XKFU"),a=n("KroJ"),l=n("Z6vF").KEY,c=n("eeVq"),u=n("VTer"),h=n("fyDq"),d=n("ylqs"),p=n("K0xU"),f=n("N8g3"),m=n("OnI7"),g=n("1MBn"),v=n("EWmC"),y=n("y3w9"),b=n("0/R4"),x=n("S/j/"),w=n("aCFj"),_=n("apmT"),S=n("RjD/"),M=n("Kuth"),E=n("e7yV"),T=n("EemH"),A=n("JiEa"),L=n("hswa"),P=n("DVgA"),C=T.f,R=L.f,O=E.f,I=i.Symbol,N=i.JSON,D=N&&N.stringify,z=p("_hidden"),k=p("toPrimitive"),B={}.propertyIsEnumerable,F=u("symbol-registry"),U=u("symbols"),j=u("op-symbols"),H=Object.prototype,G="function"==typeof I&&!!A.f,V=i.QObject,W=!V||!V.prototype||!V.prototype.findChild,q=o&&c((function(){return 7!=M(R({},"a",{get:function(){return R(this,"a",{value:7}).a}})).a}))?function(t,e,n){var i=C(H,e);i&&delete H[e],R(t,e,n),i&&t!==H&&R(H,e,i)}:R,X=function(t){var e=U[t]=M(I.prototype);return e._k=t,e},Y=G&&"symbol"==typeof I.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof I},Z=function(t,e,n){return t===H&&Z(j,e,n),y(t),e=_(e,!0),y(n),r(U,e)?(n.enumerable?(r(t,z)&&t[z][e]&&(t[z][e]=!1),n=M(n,{enumerable:S(0,!1)})):(r(t,z)||R(t,z,S(1,{})),t[z][e]=!0),q(t,e,n)):R(t,e,n)},J=function(t,e){y(t);for(var n,i=g(e=w(e)),r=0,o=i.length;o>r;)Z(t,n=i[r++],e[n]);return t},K=function(t){var e=B.call(this,t=_(t,!0));return!(this===H&&r(U,t)&&!r(j,t))&&(!(e||!r(this,t)||!r(U,t)||r(this,z)&&this[z][t])||e)},$=function(t,e){if(t=w(t),e=_(e,!0),t!==H||!r(U,e)||r(j,e)){var n=C(t,e);return!n||!r(U,e)||r(t,z)&&t[z][e]||(n.enumerable=!0),n}},Q=function(t){for(var e,n=O(w(t)),i=[],o=0;n.length>o;)r(U,e=n[o++])||e==z||e==l||i.push(e);return i},tt=function(t){for(var e,n=t===H,i=O(n?j:w(t)),o=[],s=0;i.length>s;)!r(U,e=i[s++])||n&&!r(H,e)||o.push(U[e]);return o};G||(a((I=function(){if(this instanceof I)throw TypeError("Symbol is not a constructor!");var t=d(arguments.length>0?arguments[0]:void 0),e=function(n){this===H&&e.call(j,n),r(this,z)&&r(this[z],t)&&(this[z][t]=!1),q(this,t,S(1,n))};return o&&W&&q(H,t,{configurable:!0,set:e}),X(t)}).prototype,"toString",(function(){return this._k})),T.f=$,L.f=Z,n("kJMx").f=E.f=Q,n("UqcF").f=K,A.f=tt,o&&!n("LQAc")&&a(H,"propertyIsEnumerable",K,!0),f.f=function(t){return X(p(t))}),s(s.G+s.W+s.F*!G,{Symbol:I});for(var et="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),nt=0;et.length>nt;)p(et[nt++]);for(var it=P(p.store),rt=0;it.length>rt;)m(it[rt++]);s(s.S+s.F*!G,"Symbol",{for:function(t){return r(F,t+="")?F[t]:F[t]=I(t)},keyFor:function(t){if(!Y(t))throw TypeError(t+" is not a symbol!");for(var e in F)if(F[e]===t)return e},useSetter:function(){W=!0},useSimple:function(){W=!1}}),s(s.S+s.F*!G,"Object",{create:function(t,e){return void 0===e?M(t):J(M(t),e)},defineProperty:Z,defineProperties:J,getOwnPropertyDescriptor:$,getOwnPropertyNames:Q,getOwnPropertySymbols:tt});var ot=c((function(){A.f(1)}));s(s.S+s.F*ot,"Object",{getOwnPropertySymbols:function(t){return A.f(x(t))}}),N&&s(s.S+s.F*(!G||c((function(){var t=I();return"[null]"!=D([t])||"{}"!=D({a:t})||"{}"!=D(Object(t))}))),"JSON",{stringify:function(t){for(var e,n,i=[t],r=1;arguments.length>r;)i.push(arguments[r++]);if(n=e=i[1],(b(e)||void 0!==t)&&!Y(t))return v(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!Y(e))return e}),i[1]=e,D.apply(N,i)}}),I.prototype[k]||n("Mukb")(I.prototype,k,I.prototype.valueOf),h(I,"Symbol"),h(Math,"Math",!0),h(i.JSON,"JSON",!0)},jm62:function(t,e,n){var i=n("XKFU"),r=n("mQtv"),o=n("aCFj"),s=n("EemH"),a=n("8a7r");i(i.S,"Object",{getOwnPropertyDescriptors:function(t){for(var e,n,i=o(t),l=s.f,c=r(i),u={},h=0;c.length>h;)void 0!==(n=l(i,e=c[h++]))&&a(u,e,n);return u}})},k0mU:function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));n("jm62"),n("ioFf"),n("rGqo"),n("yt8O"),n("Btvt"),n("RW0V"),n("Y9lz");var i=n("Womt");function r(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 o(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?r(Object(n),!0).forEach((function(e){s(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return 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 a(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)}}var l=function(t,e){return Math.random()*(e-t)+t},c=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.instanceNum=n.instanceNum,this.fallSpeed={max:n.fallSpeed.max,min:n.fallSpeed.min},this.rotateSpeed={max:n.rotateSpeed.max,min:n.rotateSpeed.min},this.shrinkRate={max:n.shrinkRate.max,min:n.shrinkRate.min},this.positionRangeRatio=n.positionRangeRatio,this.offsetArray=[],this.initialRotateArray=[],this.rotateSpeedArray=[],this.fallSpeedArray=[],this.shrinkRateArray=[],this.uniforms=null,this.geometry=null,this.material=null,this.meshArray=[],this.geometry=new i.d;var r=new i.h(n.particleWidth,n.particleHeight,32,32),s=r.attributes.position.clone();this.geometry.setAttribute("position",s);var a=r.attributes.normal.clone();this.geometry.setAttribute("normals",a);var l=r.attributes.uv.clone();this.geometry.setAttribute("uv",l);var c=r.index.clone();this.geometry.setIndex(c),this.createOptionalAttribute(e),this.setOptionalAttribute(),this.uniforms=o({uTime:{value:0},uColor:{value:n.color},windowSize:{value:new i.l(e.canvasSize.w,e.canvasSize.h)}},n.optionalUniforms),this.material=new i.j(o({uniforms:this.uniforms,vertexShader:n.vertexShader,fragmentShader:n.fragmentShader,side:i.b},n.optionalMaterialParam));for(var u=0;u<n.meshNum;u++)this.meshArray.push(new i.e(this.geometry,this.material))}var e,n,r;return e=t,(n=[{key:"createOptionalAttribute",value:function(t){var e,n,i,r,s,a=[],c=[],u=[],h=[],d=[],p=o({},this.fallSpeed),f=o({},this.rotateSpeed),m=o({},this.shrinkRate);window.innerWidth<768&&(p.max*=.6,p.min*=.6,f.max*=.6,f.min*=.6,m.max*=.6,m.min*=.6);for(var g=0;g<this.instanceNum;g++)a.push((e=t.canvasSize.w,n=this.positionRangeRatio,i=void 0,r=void 0,s=void 0,i=1.1*e,r=Math.random()*(i/2-i/2*n)+i/2*n,s=Math.random()-.5,r*(s/Math.abs(s))),2*Math.random()*t.canvasSize.h-t.canvasSize.h,0),c.push(360*Math.random(),360*Math.random(),360*Math.random()),h.push(l(p.min,p.max)),u.push(l(f.min,f.max)),d.push(l(m.min,m.max));this.offsetArray=a,this.initialRotateArray=c,this.rotateSpeedArray=u,this.fallSpeedArray=h,this.shrinkRateArray=d}},{key:"setOptionalAttribute",value:function(){this.geometry.setAttribute("offsetPosition",new i.c(new Float32Array(this.offsetArray),3)),this.geometry.setAttribute("initialRotate",new i.c(new Float32Array(this.initialRotateArray),3)),this.geometry.setAttribute("fallSpeed",new i.c(new Float32Array(this.fallSpeedArray),1)),this.geometry.setAttribute("rotateSpeed",new i.c(new Float32Array(this.rotateSpeedArray),1)),this.geometry.setAttribute("shrinkRate",new i.c(new Float32Array(this.shrinkRateArray),1))}},{key:"loop",value:function(){this.uniforms.uTime.value++}},{key:"resize",value:function(t){this.createOptionalAttribute(t),this.setOptionalAttribute()}}])&&a(e.prototype,n),r&&a(e,r),t}()},kJMx:function(t,e,n){var i=n("zhAb"),r=n("4R4u").concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return i(t,r)}},m0Pp:function(t,e,n){var i=n("2OiF");t.exports=function(t,e,n){if(i(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,i){return t.call(e,n,i)};case 3:return function(n,i,r){return t.call(e,n,i,r)}}return function(){return t.apply(e,arguments)}}},mQtv:function(t,e,n){var i=n("kJMx"),r=n("JiEa"),o=n("y3w9"),s=n("dyZX").Reflect;t.exports=s&&s.ownKeys||function(t){var e=i.f(o(t)),n=r.f;return n?e.concat(n(t)):e}},nGyu:function(t,e,n){var i=n("K0xU")("unscopables"),r=Array.prototype;null==r[i]&&n("Mukb")(r,i,{}),t.exports=function(t){r[i][t]=!0}},ne8i:function(t,e,n){var i=n("RYi7"),r=Math.min;t.exports=function(t){return t>0?r(i(t),9007199254740991):0}},nh4g:function(t,e,n){t.exports=!n("eeVq")((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},o3iA:function(t,e){},pIFo:function(t,e,n){"use strict";var i=n("y3w9"),r=n("S/j/"),o=n("ne8i"),s=n("RYi7"),a=n("A5AN"),l=n("Xxuz"),c=Math.max,u=Math.min,h=Math.floor,d=/\$([$&`']|\d\d?|<[^>]*>)/g,p=/\$([$&`']|\d\d?)/g;n("IU+Z")("replace",2,(function(t,e,n,f){return[function(i,r){var o=t(this),s=null==i?void 0:i[e];return void 0!==s?s.call(i,o,r):n.call(String(o),i,r)},function(t,e){var r=f(n,t,this,e);if(r.done)return r.value;var h=i(t),d=String(this),p="function"==typeof e;p||(e=String(e));var g=h.global;if(g){var v=h.unicode;h.lastIndex=0}for(var y=[];;){var b=l(h,d);if(null===b)break;if(y.push(b),!g)break;""===String(b[0])&&(h.lastIndex=a(d,o(h.lastIndex),v))}for(var x,w="",_=0,S=0;S<y.length;S++){b=y[S];for(var M=String(b[0]),E=c(u(s(b.index),d.length),0),T=[],A=1;A<b.length;A++)T.push(void 0===(x=b[A])?x:String(x));var L=b.groups;if(p){var P=[M].concat(T,E,d);void 0!==L&&P.push(L);var C=String(e.apply(void 0,P))}else C=m(M,d,E,T,L,e);E>=_&&(w+=d.slice(_,E)+C,_=E+M.length)}return w+d.slice(_)}];function m(t,e,i,o,s,a){var l=i+t.length,c=o.length,u=p;return void 0!==s&&(s=r(s),u=d),n.call(a,u,(function(n,r){var a;switch(r.charAt(0)){case"$":return"$";case"&":return t;case"`":return e.slice(0,i);case"'":return e.slice(l);case"<":a=s[r.slice(1,-1)];break;default:var u=+r;if(0===u)return n;if(u>c){var d=h(u/10);return 0===d?n:d<=c?void 0===o[d-1]?r.charAt(1):o[d-1]+r.charAt(1):n}a=o[u-1]}return void 0===a?"":a}))}}))},quPj:function(t,e,n){var i=n("0/R4"),r=n("LZWt"),o=n("K0xU")("match");t.exports=function(t){var e;return i(t)&&(void 0!==(e=t[o])?!!e:"RegExp"==r(t))}},rE2o:function(t,e,n){n("OnI7")("asyncIterator")},rGqo:function(t,e,n){for(var i=n("yt8O"),r=n("DVgA"),o=n("KroJ"),s=n("dyZX"),a=n("Mukb"),l=n("hPIQ"),c=n("K0xU"),u=c("iterator"),h=c("toStringTag"),d=l.Array,p={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},f=r(p),m=0;m<f.length;m++){var g,v=f[m],y=p[v],b=s[v],x=b&&b.prototype;if(x&&(x[u]||a(x,u,d),x[h]||a(x,h,v),l[v]=d,y))for(g in i)x[g]||o(x,g,i[g],!0)}},sMXx:function(t,e,n){"use strict";var i=n("Ugos");n("XKFU")({target:"RegExp",proto:!0,forced:i!==/./.exec},{exec:i})},sqCL:function(t,e){},"tzf/":function(t,e,n){var i,r,o;"undefined"!=typeof self&&self,r=[],void 0===(o="function"==typeof(i=function(){"use strict";var t;return(t=function(t){if(this.minWidth=this.maxWidth=null,"number"==typeof t)this.minWidth=t;else{if("object"!=typeof t)throw new Error("ViewportExtra requires an argument that is number or object");if("number"==typeof t.minWidth&&(this.minWidth=t.minWidth),"number"==typeof t.maxWidth&&(this.maxWidth=t.maxWidth),"number"==typeof this.minWidth&&"number"==typeof this.maxWidth&&this.minWidth>this.maxWidth)throw new Error("ViewportExtra requires that maxWidth is not less than minWidth")}this.applyToElement()}).prototype.applyToElement=function(){if("undefined"!=typeof window){var e=t.createContent(this,window);e&&t.element.setAttribute("content",e)}},t.createContent=function(t,e){var n,i,r,o;return n=i="",r=[],o=e.document.documentElement.clientWidth,null!=t.minWidth&&t.minWidth===t.maxWidth||null!=t.minWidth&&o<t.minWidth?(n="width="+t.minWidth,i="initial-scale="+o/t.minWidth):null!=t.maxWidth&&o>t.maxWidth&&(n="width="+t.maxWidth,i="initial-scale="+o/t.maxWidth),[n,i].forEach((function(t){t&&r.push(t)})),r.join(",")},t.createElement=function(){var t=document.createElement("meta");return t.setAttribute("name","viewport"),t.setAttribute("content","width=device-width,initial-scale=1"),document.head.insertBefore(t,null),t},t.element="undefined"==typeof window?null:document.querySelector('[name="viewport"]')||t.createElement(),t})?i.apply(e,r):i)||(t.exports=o)},upKx:function(t,e,n){"use strict";var i=n("S/j/"),r=n("d/Gc"),o=n("ne8i");t.exports=[].copyWithin||function(t,e){var n=i(this),s=o(n.length),a=r(t,s),l=r(e,s),c=arguments.length>2?arguments[2]:void 0,u=Math.min((void 0===c?s:r(c,s))-l,s-a),h=1;for(l<a&&a<l+u&&(h=-1,l+=u-1,a+=u-1);u-- >0;)l in n?n[a]=n[l]:delete n[a],a+=h,l+=h;return n}},uvZ8:function(t,e,n){t.exports=function(){function t(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 e(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}function n(){return(n=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(this,arguments)}function i(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}function r(t){return(r=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function o(t,e){return(o=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function s(t,e,n){return(s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}()?Reflect.construct:function(t,e,n){var i=[null];i.push.apply(i,e);var r=new(Function.bind.apply(t,i));return n&&o(r,n.prototype),r}).apply(null,arguments)}function a(t){var e="function"==typeof Map?new Map:void 0;return(a=function(t){if(null===t||-1===Function.toString.call(t).indexOf("[native code]"))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return s(t,arguments,r(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),o(n,t)})(t)}function l(t,e){try{var n=t()}catch(t){return e(t)}return n&&n.then?n.then(void 0,e):n}var c;"undefined"!=typeof Symbol&&(Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator"))),"undefined"!=typeof Symbol&&(Symbol.asyncIterator||(Symbol.asyncIterator=Symbol("Symbol.asyncIterator"))),function(t){t[t.off=0]="off",t[t.error=1]="error",t[t.warning=2]="warning",t[t.info=3]="info",t[t.debug=4]="debug"}(c||(c={}));var u=c.off,h=function(){function t(t){this.t=t}t.getLevel=function(){return u},t.setLevel=function(t){return u=c[t]};var e=t.prototype;return e.error=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];this.i(console.error,c.error,e)},e.warn=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];this.i(console.warn,c.warning,e)},e.info=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];this.i(console.info,c.info,e)},e.debug=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];this.i(console.log,c.debug,e)},e.i=function(e,n,i){n<=t.getLevel()&&e.apply(console,["["+this.t+"] "].concat(i))},t}(),d=E,p=b,f=y,m=x,g=M,v=new RegExp(["(\\\\.)","(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?"].join("|"),"g");function y(t,e){for(var n,i=[],r=0,o=0,s="",a=e&&e.delimiter||"/",l=e&&e.whitelist||void 0,c=!1;null!==(n=v.exec(t));){var u=n[0],h=n[1],d=n.index;if(s+=t.slice(o,d),o=d+u.length,h)s+=h[1],c=!0;else{var p="",f=n[2],m=n[3],g=n[4],y=n[5];if(!c&&s.length){var b=s.length-1,x=s[b];(!l||l.indexOf(x)>-1)&&(p=x,s=s.slice(0,b))}s&&(i.push(s),s="",c=!1);var S=m||g,M=p||a;i.push({name:f||r++,prefix:p,delimiter:M,optional:"?"===y||"*"===y,repeat:"+"===y||"*"===y,pattern:S?_(S):"[^"+w(M===a?M:M+a)+"]+?"})}}return(s||o<t.length)&&i.push(s+t.substr(o)),i}function b(t,e){return function(n,i){var r=t.exec(n);if(!r)return!1;for(var o=r[0],s=r.index,a={},l=i&&i.decode||decodeURIComponent,c=1;c<r.length;c++)if(void 0!==r[c]){var u=e[c-1];a[u.name]=u.repeat?r[c].split(u.delimiter).map((function(t){return l(t,u)})):l(r[c],u)}return{path:o,index:s,params:a}}}function x(t,e){for(var n=new Array(t.length),i=0;i<t.length;i++)"object"==typeof t[i]&&(n[i]=new RegExp("^(?:"+t[i].pattern+")$",S(e)));return function(e,i){for(var r="",o=i&&i.encode||encodeURIComponent,s=!i||!1!==i.validate,a=0;a<t.length;a++){var l=t[a];if("string"!=typeof l){var c,u=e?e[l.name]:void 0;if(Array.isArray(u)){if(!l.repeat)throw new TypeError('Expected "'+l.name+'" to not repeat, but got array');if(0===u.length){if(l.optional)continue;throw new TypeError('Expected "'+l.name+'" to not be empty')}for(var h=0;h<u.length;h++){if(c=o(u[h],l),s&&!n[a].test(c))throw new TypeError('Expected all "'+l.name+'" to match "'+l.pattern+'"');r+=(0===h?l.prefix:l.delimiter)+c}}else if("string"!=typeof u&&"number"!=typeof u&&"boolean"!=typeof u){if(!l.optional)throw new TypeError('Expected "'+l.name+'" to be '+(l.repeat?"an array":"a string"))}else{if(c=o(String(u),l),s&&!n[a].test(c))throw new TypeError('Expected "'+l.name+'" to match "'+l.pattern+'", but got "'+c+'"');r+=l.prefix+c}}else r+=l}return r}}function w(t){return t.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function _(t){return t.replace(/([=!:$/()])/g,"\\$1")}function S(t){return t&&t.sensitive?"":"i"}function M(t,e,n){for(var i=(n=n||{}).strict,r=!1!==n.start,o=!1!==n.end,s=n.delimiter||"/",a=[].concat(n.endsWith||[]).map(w).concat("$").join("|"),l=r?"^":"",c=0;c<t.length;c++){var u=t[c];if("string"==typeof u)l+=w(u);else{var h=u.repeat?"(?:"+u.pattern+")(?:"+w(u.delimiter)+"(?:"+u.pattern+"))*":u.pattern;e&&e.push(u),l+=u.optional?u.prefix?"(?:"+w(u.prefix)+"("+h+"))?":"("+h+")?":w(u.prefix)+"("+h+")"}}if(o)i||(l+="(?:"+w(s)+")?"),l+="$"===a?"$":"(?="+a+")";else{var d=t[t.length-1],p="string"==typeof d?d[d.length-1]===s:void 0===d;i||(l+="(?:"+w(s)+"(?="+a+"))?"),p||(l+="(?="+w(s)+"|"+a+")")}return new RegExp(l,S(n))}function E(t,e,n){return t instanceof RegExp?function(t,e){if(!e)return t;var n=t.source.match(/\((?!\?)/g);if(n)for(var i=0;i<n.length;i++)e.push({name:i,prefix:null,delimiter:null,optional:!1,repeat:!1,pattern:null});return t}(t,e):Array.isArray(t)?function(t,e,n){for(var i=[],r=0;r<t.length;r++)i.push(E(t[r],e,n).source);return new RegExp("(?:"+i.join("|")+")",S(n))}(t,e,n):function(t,e,n){return M(y(t,n),e,n)}(t,e,n)}d.match=function(t,e){var n=[];return b(E(t,n,e),n)},d.regexpToFunction=p,d.parse=f,d.compile=function(t,e){return x(y(t,e),e)},d.tokensToFunction=m,d.tokensToRegExp=g;var T={container:"container",history:"history",namespace:"namespace",prefix:"data-barba",prevent:"prevent",wrapper:"wrapper"},A=new(function(){function t(){this.o=T,this.u=new DOMParser}var e=t.prototype;return e.toString=function(t){return t.outerHTML},e.toDocument=function(t){return this.u.parseFromString(t,"text/html")},e.toElement=function(t){var e=document.createElement("div");return e.innerHTML=t,e},e.getHtml=function(t){return void 0===t&&(t=document),this.toString(t.documentElement)},e.getWrapper=function(t){return void 0===t&&(t=document),t.querySelector("["+this.o.prefix+'="'+this.o.wrapper+'"]')},e.getContainer=function(t){return void 0===t&&(t=document),t.querySelector("["+this.o.prefix+'="'+this.o.container+'"]')},e.removeContainer=function(t){document.body.contains(t)&&t.parentNode.removeChild(t)},e.addContainer=function(t,e){var n=this.getContainer();n?this.s(t,n):e.appendChild(t)},e.getNamespace=function(t){void 0===t&&(t=document);var e=t.querySelector("["+this.o.prefix+"-"+this.o.namespace+"]");return e?e.getAttribute(this.o.prefix+"-"+this.o.namespace):null},e.getHref=function(t){if(t.tagName&&"a"===t.tagName.toLowerCase()){if("string"==typeof t.href)return t.href;var e=t.getAttribute("href")||t.getAttribute("xlink:href");if(e)return this.resolveUrl(e.baseVal||e)}return null},e.resolveUrl=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var i=e.length;if(0===i)throw new Error("resolveUrl requires at least one argument; got none.");var r=document.createElement("base");if(r.href=arguments[0],1===i)return r.href;var o=document.getElementsByTagName("head")[0];o.insertBefore(r,o.firstChild);for(var s,a=document.createElement("a"),l=1;l<i;l++)a.href=arguments[l],r.href=s=a.href;return o.removeChild(r),s},e.s=function(t,e){e.parentNode.insertBefore(t,e.nextSibling)},t}()),L=new(function(){function t(){this.h=[],this.v=-1}var i=t.prototype;return i.init=function(t,e){this.l="barba";var n={ns:e,scroll:{x:window.scrollX,y:window.scrollY},url:t};this.h.push(n),this.v=0;var i={from:this.l,index:0,states:[].concat(this.h)};window.history&&window.history.replaceState(i,"",t)},i.change=function(t,e,n){if(n&&n.state){var i=n.state,r=i.index;e=this.m(this.v-r),this.replace(i.states),this.v=r}else this.add(t,e);return e},i.add=function(t,e){var n=this.size,i=this.p(e),r={ns:"tmp",scroll:{x:window.scrollX,y:window.scrollY},url:t};this.h.push(r),this.v=n;var o={from:this.l,index:n,states:[].concat(this.h)};switch(i){case"push":window.history&&window.history.pushState(o,"",t);break;case"replace":window.history&&window.history.replaceState(o,"",t)}},i.update=function(t,e){var i=e||this.v,r=n({},this.get(i),{},t);this.set(i,r)},i.remove=function(t){t?this.h.splice(t,1):this.h.pop(),this.v--},i.clear=function(){this.h=[],this.v=-1},i.replace=function(t){this.h=t},i.get=function(t){return this.h[t]},i.set=function(t,e){return this.h[t]=e},i.p=function(t){var e="push",n=t,i=T.prefix+"-"+T.history;return n.hasAttribute&&n.hasAttribute(i)&&(e=n.getAttribute(i)),e},i.m=function(t){return Math.abs(t)>1?t>0?"forward":"back":0===t?"popstate":t>0?"back":"forward"},e(t,[{key:"current",get:function(){return this.h[this.v]}},{key:"state",get:function(){return this.h[this.h.length-1]}},{key:"previous",get:function(){return this.v<1?null:this.h[this.v-1]}},{key:"size",get:function(){return this.h.length}}]),t}()),P=function(t,e){try{var n=function(){if(!e.next.html)return Promise.resolve(t).then((function(t){var n=e.next;if(t){var i=A.toElement(t);n.namespace=A.getNamespace(i),n.container=A.getContainer(i),n.html=t,L.update({ns:n.namespace});var r=A.toDocument(t);document.title=r.title}}))}();return Promise.resolve(n&&n.then?n.then((function(){})):void 0)}catch(t){return Promise.reject(t)}},C=d,R={__proto__:null,update:P,nextTick:function(){return new Promise((function(t){window.requestAnimationFrame(t)}))},pathToRegexp:C},O=function(){return window.location.origin},I=function(t){return void 0===t&&(t=window.location.href),N(t).port},N=function(t){var e,n=t.match(/:\d+/);if(null===n)/^http/.test(t)&&(e=80),/^https/.test(t)&&(e=443);else{var i=n[0].substring(1);e=parseInt(i,10)}var r,o=t.replace(O(),""),s={},a=o.indexOf("#");a>=0&&(r=o.slice(a+1),o=o.slice(0,a));var l=o.indexOf("?");return l>=0&&(s=D(o.slice(l+1)),o=o.slice(0,l)),{hash:r,path:o,port:e,query:s}},D=function(t){return t.split("&").reduce((function(t,e){var n=e.split("=");return t[n[0]]=n[1],t}),{})},z=function(t){return void 0===t&&(t=window.location.href),t.replace(/(\/#.*|\/|#.*)$/,"")},k={__proto__:null,getHref:function(){return window.location.href},getOrigin:O,getPort:I,getPath:function(t){return void 0===t&&(t=window.location.href),N(t).path},parse:N,parseQuery:D,clean:z};function B(t,e,n){return void 0===e&&(e=2e3),new Promise((function(i,r){var o=new XMLHttpRequest;o.onreadystatechange=function(){if(o.readyState===XMLHttpRequest.DONE)if(200===o.status)i(o.responseText);else if(o.status){var e={status:o.status,statusText:o.statusText};n(t,e),r(e)}},o.ontimeout=function(){var i=new Error("Timeout error ["+e+"]");n(t,i),r(i)},o.onerror=function(){var e=new Error("Fetch error");n(t,e),r(e)},o.open("GET",t),o.timeout=e,o.setRequestHeader("Accept","text/html,application/xhtml+xml,application/xml"),o.setRequestHeader("x-barba","yes"),o.send()}))}var F=function(t){return!!t&&("object"==typeof t||"function"==typeof t)&&"function"==typeof t.then};function U(t,e){return void 0===e&&(e={}),function(){for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];var o=!1,s=new Promise((function(n,r){e.async=function(){return o=!0,function(t,e){t?r(t):n(e)}};var s=t.apply(e,i);o||(F(s)?s.then(n,r):n(s))}));return s}}var j=new(function(t){function e(){var e;return(e=t.call(this)||this).logger=new h("@barba/core"),e.all=["ready","page","reset","currentAdded","currentRemoved","nextAdded","nextRemoved","beforeOnce","once","afterOnce","before","beforeLeave","leave","afterLeave","beforeEnter","enter","afterEnter","after"],e.registered=new Map,e.init(),e}i(e,t);var n=e.prototype;return n.init=function(){var t=this;this.registered.clear(),this.all.forEach((function(e){t[e]||(t[e]=function(n,i){t.registered.has(e)||t.registered.set(e,new Set),t.registered.get(e).add({ctx:i||{},fn:n})})}))},n.do=function(t){for(var e=this,n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];if(this.registered.has(t)){var o=Promise.resolve();return this.registered.get(t).forEach((function(t){o=o.then((function(){return U(t.fn,t.ctx).apply(void 0,i)}))})),o.catch((function(n){e.logger.debug("Hook error ["+t+"]"),e.logger.error(n)}))}return Promise.resolve()},n.clear=function(){var t=this;this.all.forEach((function(e){delete t[e]})),this.init()},n.help=function(){this.logger.info("Available hooks: "+this.all.join(","));var t=[];this.registered.forEach((function(e,n){return t.push(n)})),this.logger.info("Registered hooks: "+t.join(","))},e}((function(){}))),H=function(){function t(t){if(this.P=[],"boolean"==typeof t)this.g=t;else{var e=Array.isArray(t)?t:[t];this.P=e.map((function(t){return C(t)}))}}return t.prototype.checkHref=function(t){if("boolean"==typeof this.g)return this.g;var e=N(t).path;return this.P.some((function(t){return null!==t.exec(e)}))},t}(),G=function(t){function e(e){var n;return(n=t.call(this,e)||this).k=new Map,n}i(e,t);var r=e.prototype;return r.set=function(t,e,n){return this.k.set(t,{action:n,request:e}),{action:n,request:e}},r.get=function(t){return this.k.get(t)},r.getRequest=function(t){return this.k.get(t).request},r.getAction=function(t){return this.k.get(t).action},r.has=function(t){return!this.checkHref(t)&&this.k.has(t)},r.delete=function(t){return this.k.delete(t)},r.update=function(t,e){var i=n({},this.k.get(t),{},e);return this.k.set(t,i),i},e}(H),V=function(){return!window.history.pushState},W=function(t){return!t.el||!t.href},q=function(t){var e=t.event;return e.which>1||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey},X=function(t){var e=t.el;return e.hasAttribute("target")&&"_blank"===e.target},Y=function(t){var e=t.el;return void 0!==e.protocol&&window.location.protocol!==e.protocol||void 0!==e.hostname&&window.location.hostname!==e.hostname},Z=function(t){var e=t.el;return void 0!==e.port&&I()!==I(e.href)},J=function(t){var e=t.el;return e.getAttribute&&"string"==typeof e.getAttribute("download")},K=function(t){return t.el.hasAttribute(T.prefix+"-"+T.prevent)},$=function(t){return Boolean(t.el.closest("["+T.prefix+"-"+T.prevent+'="all"]'))},Q=function(t){var e=t.href;return z(e)===z()&&I(e)===I()},tt=function(t){function e(e){var n;return(n=t.call(this,e)||this).suite=[],n.tests=new Map,n.init(),n}i(e,t);var n=e.prototype;return n.init=function(){this.add("pushState",V),this.add("exists",W),this.add("newTab",q),this.add("blank",X),this.add("corsDomain",Y),this.add("corsPort",Z),this.add("download",J),this.add("preventSelf",K),this.add("preventAll",$),this.add("sameUrl",Q,!1)},n.add=function(t,e,n){void 0===n&&(n=!0),this.tests.set(t,e),n&&this.suite.push(t)},n.run=function(t,e,n,i){return this.tests.get(t)({el:e,event:n,href:i})},n.checkLink=function(t,e,n){var i=this;return this.suite.some((function(r){return i.run(r,t,e,n)}))},e}(H),et=function(t){function e(n,i){var r;void 0===i&&(i="Barba error");for(var o=arguments.length,s=new Array(o>2?o-2:0),a=2;a<o;a++)s[a-2]=arguments[a];return(r=t.call.apply(t,[this].concat(s))||this).error=n,r.label=i,Error.captureStackTrace&&Error.captureStackTrace(function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(r),e),r.name="BarbaError",r}return i(e,t),e}(a(Error)),nt=function(){function t(t){void 0===t&&(t=[]),this.logger=new h("@barba/core"),this.all=[],this.page=[],this.once=[],this.A=[{name:"namespace",type:"strings"},{name:"custom",type:"function"}],t&&(this.all=this.all.concat(t)),this.update()}var e=t.prototype;return e.add=function(t,e){switch(t){case"rule":this.A.splice(e.position||0,0,e.value);break;case"transition":default:this.all.push(e)}this.update()},e.resolve=function(t,e){var n=this;void 0===e&&(e={});var i=e.once?this.once:this.page;i=i.filter(e.self?function(t){return t.name&&"self"===t.name}:function(t){return!t.name||"self"!==t.name});var r=new Map,o=i.find((function(i){var o=!0,s={};return!(!e.self||"self"!==i.name)||(n.A.reverse().forEach((function(e){o&&(o=n.R(i,e,t,s),i.from&&i.to&&(o=n.R(i,e,t,s,"from")&&n.R(i,e,t,s,"to")),i.from&&!i.to&&(o=n.R(i,e,t,s,"from")),!i.from&&i.to&&(o=n.R(i,e,t,s,"to")))})),r.set(i,s),o)})),s=r.get(o),a=[];if(a.push(e.once?"once":"page"),e.self&&a.push("self"),s){var l,c=[o];Object.keys(s).length>0&&c.push(s),(l=this.logger).info.apply(l,["Transition found ["+a.join(",")+"]"].concat(c))}else this.logger.info("No transition found ["+a.join(",")+"]");return o},e.update=function(){var t=this;this.all=this.all.map((function(e){return t.T(e)})).sort((function(t,e){return t.priority-e.priority})).reverse().map((function(t){return delete t.priority,t})),this.page=this.all.filter((function(t){return void 0!==t.leave||void 0!==t.enter})),this.once=this.all.filter((function(t){return void 0!==t.once}))},e.R=function(t,e,n,i,r){var o=!0,s=!1,a=t,l=e.name,c=l,u=l,h=l,d=r?a[r]:a,p="to"===r?n.next:n.current;if(r?d&&d[l]:d[l]){switch(e.type){case"strings":default:var f=Array.isArray(d[c])?d[c]:[d[c]];p[c]&&-1!==f.indexOf(p[c])&&(s=!0),-1===f.indexOf(p[c])&&(o=!1);break;case"object":var m=Array.isArray(d[u])?d[u]:[d[u]];p[u]?(p[u].name&&-1!==m.indexOf(p[u].name)&&(s=!0),-1===m.indexOf(p[u].name)&&(o=!1)):o=!1;break;case"function":d[h](n)?s=!0:o=!1}s&&(r?(i[r]=i[r]||{},i[r][l]=a[r][l]):i[l]=a[l])}return o},e.O=function(t,e,n){var i=0;return(t[e]||t.from&&t.from[e]||t.to&&t.to[e])&&(i+=Math.pow(10,n),t.from&&t.from[e]&&(i+=1),t.to&&t.to[e]&&(i+=2)),i},e.T=function(t){var e=this;t.priority=0;var n=0;return this.A.forEach((function(i,r){n+=e.O(t,i.name,r+1)})),t.priority=n,t},t}(),it=function(){function t(t){void 0===t&&(t=[]),this.logger=new h("@barba/core"),this.S=!1,this.store=new nt(t)}var n=t.prototype;return n.get=function(t,e){return this.store.resolve(t,e)},n.doOnce=function(t){var e=t.data,n=t.transition;try{var i=function(){r.S=!1},r=this,o=n||{};r.S=!0;var s=l((function(){return Promise.resolve(r.j("beforeOnce",e,o)).then((function(){return Promise.resolve(r.once(e,o)).then((function(){return Promise.resolve(r.j("afterOnce",e,o)).then((function(){}))}))}))}),(function(t){r.S=!1,r.logger.debug("Transition error [before/after/once]"),r.logger.error(t)}));return Promise.resolve(s&&s.then?s.then(i):i())}catch(t){return Promise.reject(t)}},n.doPage=function(t){var e=t.data,n=t.transition,i=t.page,r=t.wrapper;try{var o=function(t){if(s)return t;a.S=!1},s=!1,a=this,c=n||{},u=!0===c.sync||!1;a.S=!0;var h=l((function(){function t(){return Promise.resolve(a.j("before",e,c)).then((function(){function t(t){return Promise.resolve(a.remove(e)).then((function(){return Promise.resolve(a.j("after",e,c)).then((function(){}))}))}var n=function(){if(u)return l((function(){return Promise.resolve(a.add(e,r)).then((function(){return Promise.resolve(a.j("beforeLeave",e,c)).then((function(){return Promise.resolve(a.j("beforeEnter",e,c)).then((function(){return Promise.resolve(Promise.all([a.leave(e,c),a.enter(e,c)])).then((function(){return Promise.resolve(a.j("afterLeave",e,c)).then((function(){return Promise.resolve(a.j("afterEnter",e,c)).then((function(){}))}))}))}))}))}))}),(function(t){if(a.M(t))throw new et(t,"Transition error [sync]")}));var t=function(t){return l((function(){var t=function(){if(!1!==n)return Promise.resolve(a.add(e,r)).then((function(){return Promise.resolve(a.j("beforeEnter",e,c)).then((function(){return Promise.resolve(a.enter(e,c,n)).then((function(){return Promise.resolve(a.j("afterEnter",e,c)).then((function(){}))}))}))}))}();if(t&&t.then)return t.then((function(){}))}),(function(t){if(a.M(t))throw new et(t,"Transition error [before/after/enter]")}))},n=!1,o=l((function(){return Promise.resolve(a.j("beforeLeave",e,c)).then((function(){return Promise.resolve(Promise.all([a.leave(e,c),P(i,e)]).then((function(t){return t[0]}))).then((function(t){return n=t,Promise.resolve(a.j("afterLeave",e,c)).then((function(){}))}))}))}),(function(t){if(a.M(t))throw new et(t,"Transition error [before/after/leave]")}));return o&&o.then?o.then(t):t()}();return n&&n.then?n.then(t):t()}))}var n=function(){if(u)return Promise.resolve(P(i,e)).then((function(){}))}();return n&&n.then?n.then(t):t()}),(function(t){if(a.S=!1,t.name&&"BarbaError"===t.name)throw a.logger.debug(t.label),a.logger.error(t.error),t;throw a.logger.debug("Transition error [page]"),a.logger.error(t),t}));return Promise.resolve(h&&h.then?h.then(o):o(h))}catch(t){return Promise.reject(t)}},n.once=function(t,e){try{return Promise.resolve(j.do("once",t,e)).then((function(){return e.once?U(e.once,e)(t):Promise.resolve()}))}catch(t){return Promise.reject(t)}},n.leave=function(t,e){try{return Promise.resolve(j.do("leave",t,e)).then((function(){return e.leave?U(e.leave,e)(t):Promise.resolve()}))}catch(t){return Promise.reject(t)}},n.enter=function(t,e,n){try{return Promise.resolve(j.do("enter",t,e)).then((function(){return e.enter?U(e.enter,e)(t,n):Promise.resolve()}))}catch(t){return Promise.reject(t)}},n.add=function(t,e){try{return A.addContainer(t.next.container,e),j.do("nextAdded",t),Promise.resolve()}catch(t){return Promise.reject(t)}},n.remove=function(t){try{return A.removeContainer(t.current.container),j.do("currentRemoved",t),Promise.resolve()}catch(t){return Promise.reject(t)}},n.M=function(t){return t.message?!/Timeout error|Fetch error/.test(t.message):!t.status},n.j=function(t,e,n){try{return Promise.resolve(j.do(t,e,n)).then((function(){return n[t]?U(n[t],n)(e):Promise.resolve()}))}catch(t){return Promise.reject(t)}},e(t,[{key:"isRunning",get:function(){return this.S},set:function(t){this.S=t}},{key:"hasOnce",get:function(){return this.store.once.length>0}},{key:"hasSelf",get:function(){return this.store.all.some((function(t){return"self"===t.name}))}},{key:"shouldWait",get:function(){return this.store.all.some((function(t){return t.to&&!t.to.route||t.sync}))}}]),t}(),rt=function(){function t(t){var e=this;this.names=["beforeLeave","afterLeave","beforeEnter","afterEnter"],this.byNamespace=new Map,0!==t.length&&(t.forEach((function(t){e.byNamespace.set(t.namespace,t)})),this.names.forEach((function(t){j[t](e.L(t))})))}return t.prototype.L=function(t){var e=this;return function(n){var i=t.match(/enter/i)?n.next:n.current,r=e.byNamespace.get(i.namespace);return r&&r[t]?U(r[t],r)(n):Promise.resolve()}},t}();Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector),Element.prototype.closest||(Element.prototype.closest=function(t){var e=this;do{if(e.matches(t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null});var ot={container:null,html:"",namespace:"",url:{hash:"",href:"",path:"",port:null,query:{}}};return new(function(){function t(){this.version="2.9.7",this.schemaPage=ot,this.Logger=h,this.logger=new h("@barba/core"),this.plugins=[],this.hooks=j,this.dom=A,this.helpers=R,this.history=L,this.request=B,this.url=k}var i=t.prototype;return i.use=function(t,e){var n=this.plugins;n.indexOf(t)>-1?this.logger.warn("Plugin ["+t.name+"] already installed."):"function"==typeof t.install?(t.install(this,e),n.push(t)):this.logger.warn("Plugin ["+t.name+'] has no "install" method.')},i.init=function(t){var e=void 0===t?{}:t,i=e.transitions,r=void 0===i?[]:i,o=e.views,s=void 0===o?[]:o,a=e.schema,l=void 0===a?T:a,c=e.requestError,u=e.timeout,d=void 0===u?2e3:u,p=e.cacheIgnore,f=void 0!==p&&p,m=e.prefetchIgnore,g=void 0!==m&&m,v=e.preventRunning,y=void 0!==v&&v,b=e.prevent,x=void 0===b?null:b,w=e.debug,_=e.logLevel;if(h.setLevel(!0===(void 0!==w&&w)?"debug":void 0===_?"off":_),this.logger.info(this.version),Object.keys(l).forEach((function(t){T[t]&&(T[t]=l[t])})),this.$=c,this.timeout=d,this.cacheIgnore=f,this.prefetchIgnore=g,this.preventRunning=y,this._=this.dom.getWrapper(),!this._)throw new Error("[@barba/core] No Barba wrapper found");this._.setAttribute("aria-live","polite"),this.q();var S=this.data.current;if(!S.container)throw new Error("[@barba/core] No Barba container found");if(this.cache=new G(f),this.prevent=new tt(g),this.transitions=new it(r),this.views=new rt(s),null!==x){if("function"!=typeof x)throw new Error("[@barba/core] Prevent should be a function");this.prevent.add("preventCustom",x)}this.history.init(S.url.href,S.namespace),this.B=this.B.bind(this),this.U=this.U.bind(this),this.D=this.D.bind(this),this.F(),this.plugins.forEach((function(t){return t.init()}));var M=this.data;M.trigger="barba",M.next=M.current,M.current=n({},this.schemaPage),this.hooks.do("ready",M),this.once(M),this.q()},i.destroy=function(){this.q(),this.H(),this.history.clear(),this.hooks.clear(),this.plugins=[]},i.force=function(t){window.location.assign(t)},i.go=function(t,e,n){var i;if(void 0===e&&(e="barba"),this.transitions.isRunning)this.force(t);else if(!(i="popstate"===e?this.history.current&&this.url.getPath(this.history.current.url)===this.url.getPath(t):this.prevent.run("sameUrl",null,null,t))||this.transitions.hasSelf)return e=this.history.change(t,e,n),n&&(n.stopPropagation(),n.preventDefault()),this.page(t,e,i)},i.once=function(t){try{var e=this;return Promise.resolve(e.hooks.do("beforeEnter",t)).then((function(){function n(){return Promise.resolve(e.hooks.do("afterEnter",t)).then((function(){}))}var i=function(){if(e.transitions.hasOnce){var n=e.transitions.get(t,{once:!0});return Promise.resolve(e.transitions.doOnce({transition:n,data:t})).then((function(){}))}}();return i&&i.then?i.then(n):n()}))}catch(t){return Promise.reject(t)}},i.page=function(t,e,i){try{var r=function(){var t=o.data;return Promise.resolve(o.hooks.do("page",t)).then((function(){var e=l((function(){var e=o.transitions.get(t,{once:!1,self:i});return Promise.resolve(o.transitions.doPage({data:t,page:s,transition:e,wrapper:o._})).then((function(){o.q()}))}),(function(){0===h.getLevel()&&o.force(t.current.url.href)}));if(e&&e.then)return e.then((function(){}))}))},o=this;o.data.next.url=n({href:t},o.url.parse(t)),o.data.trigger=e;var s=o.cache.has(t)?o.cache.update(t,{action:"click"}).request:o.cache.set(t,o.request(t,o.timeout,o.onRequestError.bind(o,e)),"click").request,a=function(){if(o.transitions.shouldWait)return Promise.resolve(P(s,o.data)).then((function(){}))}();return Promise.resolve(a&&a.then?a.then(r):r())}catch(t){return Promise.reject(t)}},i.onRequestError=function(t){this.transitions.isRunning=!1;for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];var r=n[0],o=n[1],s=this.cache.getAction(r);return this.cache.delete(r),!(this.$&&!1===this.$(t,s,r,o)||("click"===s&&this.force(r),1))},i.prefetch=function(t){var e=this;this.cache.has(t)||this.cache.set(t,this.request(t,this.timeout,this.onRequestError.bind(this,"barba")).catch((function(t){e.logger.error(t)})),"prefetch")},i.F=function(){!0!==this.prefetchIgnore&&(document.addEventListener("mouseover",this.B),document.addEventListener("touchstart",this.B)),document.addEventListener("click",this.U),window.addEventListener("popstate",this.D)},i.H=function(){!0!==this.prefetchIgnore&&(document.removeEventListener("mouseover",this.B),document.removeEventListener("touchstart",this.B)),document.removeEventListener("click",this.U),window.removeEventListener("popstate",this.D)},i.B=function(t){var e=this,n=this.I(t);if(n){var i=this.dom.getHref(n);this.prevent.checkHref(i)||this.cache.has(i)||this.cache.set(i,this.request(i,this.timeout,this.onRequestError.bind(this,n)).catch((function(t){e.logger.error(t)})),"enter")}},i.U=function(t){var e=this.I(t);if(e)return this.transitions.isRunning&&this.preventRunning?(t.preventDefault(),void t.stopPropagation()):void this.go(this.dom.getHref(e),e,t)},i.D=function(t){this.go(this.url.getHref(),"popstate",t)},i.I=function(t){for(var e=t.target;e&&!this.dom.getHref(e);)e=e.parentNode;if(e&&!this.prevent.checkLink(e,t,this.dom.getHref(e)))return e},i.q=function(){var t=this.url.getHref(),e={container:this.dom.getContainer(),html:this.dom.getHtml(),namespace:this.dom.getNamespace(),url:n({href:t},this.url.parse(t))};this.C={current:e,next:n({},this.schemaPage),trigger:void 0},this.hooks.do("reset",this.data)},e(t,[{key:"data",get:function(){return this.C}},{key:"wrapper",get:function(){return this._}}]),t}())}()},vX6Q:function(t,e,n){var i,r;!function(o,s){"use strict";i=[n("CUlp")],void 0===(r=function(t){return function(t,e){var n=t.jQuery,i=t.console;function r(t,e){for(var n in e)t[n]=e[n];return t}var o=Array.prototype.slice;function s(t,e,a){if(!(this instanceof s))return new s(t,e,a);var l,c=t;("string"==typeof t&&(c=document.querySelectorAll(t)),c)?(this.elements=(l=c,Array.isArray(l)?l:"object"==typeof l&&"number"==typeof l.length?o.call(l):[l]),this.options=r({},this.options),"function"==typeof e?a=e:r(this.options,e),a&&this.on("always",a),this.getImages(),n&&(this.jqDeferred=new n.Deferred),setTimeout(this.check.bind(this))):i.error("Bad element for imagesLoaded "+(c||t))}s.prototype=Object.create(e.prototype),s.prototype.options={},s.prototype.getImages=function(){this.images=[],this.elements.forEach(this.addElementImages,this)},s.prototype.addElementImages=function(t){"IMG"==t.nodeName&&this.addImage(t),!0===this.options.background&&this.addElementBackgroundImages(t);var e=t.nodeType;if(e&&a[e]){for(var n=t.querySelectorAll("img"),i=0;i<n.length;i++){var r=n[i];this.addImage(r)}if("string"==typeof this.options.background){var o=t.querySelectorAll(this.options.background);for(i=0;i<o.length;i++){var s=o[i];this.addElementBackgroundImages(s)}}}};var a={1:!0,9:!0,11:!0};function l(t){this.img=t}function c(t,e){this.url=t,this.element=e,this.img=new Image}return s.prototype.addElementBackgroundImages=function(t){var e=getComputedStyle(t);if(e)for(var n=/url\((['"])?(.*?)\1\)/gi,i=n.exec(e.backgroundImage);null!==i;){var r=i&&i[2];r&&this.addBackground(r,t),i=n.exec(e.backgroundImage)}},s.prototype.addImage=function(t){var e=new l(t);this.images.push(e)},s.prototype.addBackground=function(t,e){var n=new c(t,e);this.images.push(n)},s.prototype.check=function(){var t=this;function e(e,n,i){setTimeout((function(){t.progress(e,n,i)}))}this.progressedCount=0,this.hasAnyBroken=!1,this.images.length?this.images.forEach((function(t){t.once("progress",e),t.check()})):this.complete()},s.prototype.progress=function(t,e,n){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!t.isLoaded,this.emitEvent("progress",[this,t,e]),this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,t),this.progressedCount==this.images.length&&this.complete(),this.options.debug&&i&&i.log("progress: "+n,t,e)},s.prototype.complete=function(){var t=this.hasAnyBroken?"fail":"done";if(this.isComplete=!0,this.emitEvent(t,[this]),this.emitEvent("always",[this]),this.jqDeferred){var e=this.hasAnyBroken?"reject":"resolve";this.jqDeferred[e](this)}},l.prototype=Object.create(e.prototype),l.prototype.check=function(){this.getIsImageComplete()?this.confirm(0!==this.img.naturalWidth,"naturalWidth"):(this.proxyImage=new Image,this.proxyImage.addEventListener("load",this),this.proxyImage.addEventListener("error",this),this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.proxyImage.src=this.img.src)},l.prototype.getIsImageComplete=function(){return this.img.complete&&this.img.naturalWidth},l.prototype.confirm=function(t,e){this.isLoaded=t,this.emitEvent("progress",[this,this.img,e])},l.prototype.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},l.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},l.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},l.prototype.unbindEvents=function(){this.proxyImage.removeEventListener("load",this),this.proxyImage.removeEventListener("error",this),this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},c.prototype=Object.create(l.prototype),c.prototype.check=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.img.src=this.url,this.getIsImageComplete()&&(this.confirm(0!==this.img.naturalWidth,"naturalWidth"),this.unbindEvents())},c.prototype.unbindEvents=function(){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},c.prototype.confirm=function(t,e){this.isLoaded=t,this.emitEvent("progress",[this,this.element,e])},s.makeJQueryPlugin=function(e){(e=e||t.jQuery)&&((n=e).fn.imagesLoaded=function(t,e){return new s(this,t,e).jqDeferred.promise(n(this))})},s.makeJQueryPlugin(),s}(o,t)}.apply(e,i))||(t.exports=r)}("undefined"!=typeof window?window:this)},vhPU:function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on  "+t);return t}},w2a5:function(t,e,n){var i=n("aCFj"),r=n("ne8i"),o=n("d/Gc");t.exports=function(t){return function(e,n,s){var a,l=i(e),c=r(l.length),u=o(s,c);if(t&&n!=n){for(;c>u;)if((a=l[u++])!=a)return!0}else for(;c>u;u++)if((t||u in l)&&l[u]===n)return t||u||0;return!t&&-1}}},xpql:function(t,e,n){t.exports=!n("nh4g")&&!n("eeVq")((function(){return 7!=Object.defineProperty(n("Iw71")("div"),"a",{get:function(){return 7}}).a}))},y3w9:function(t,e,n){var i=n("0/R4");t.exports=function(t){if(!i(t))throw TypeError(t+" is not an object!");return t}},yLpj:function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},ylqs:function(t,e){var n=0,i=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+i).toString(36))}},yrm9:function(t,e,n){var i;t.exports=(i=window.requestIdleCallback||function(t){var e=Date.now();return setTimeout((function(){t({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-e))}})}),1)},new(function(){function t(){this.name="@barba/prefetch",this.version="2.1.10",this.toPrefetch=new Set}var e=t.prototype;return e.install=function(t,e){var n=void 0===e?{}:e,i=n.root,r=void 0===i?document.body:i,o=n.timeout,s=void 0===o?2e3:o;this.logger=new t.Logger(this.name),this.logger.info(this.version),this.barba=t,this.root=r,this.timeout=s},e.init=function(){var t=this;this.barba.prefetchIgnore?this.logger.warn("barba.prefetchIgnore is enabled"):this.barba.cacheIgnore?this.logger.warn("barba.cacheIgnore is enabled"):(this.observer=new IntersectionObserver((function(e){e.forEach((function(e){if(e.isIntersecting){var n=e.target,i=t.barba.dom.getHref(n);t.toPrefetch.has(i)&&(t.observer.unobserve(n),t.barba.cache.has(i)?t.barba.cache.update(i,{action:"prefetch"}):t.barba.cache.set(i,t.barba.request(i,t.barba.timeout,t.barba.onRequestError.bind(t.barba,"barba")).catch((function(e){t.logger.error(e)})),"prefetch"))}}))})),this.observe(),this.barba.hooks.after(this.observe,this))},e.observe=function(){var t=this;i((function(){t.root.querySelectorAll("a").forEach((function(e){var n=e,i=t.barba.dom.getHref(n);t.barba.cache.has(i)||t.barba.prevent.checkHref(i)||t.barba.prevent.checkLink(n,{},i)||(t.observer.observe(e),t.toPrefetch.add(i))}))}),{timeout:this.timeout})},t}()))},yt8O:function(t,e,n){"use strict";var i=n("nGyu"),r=n("1TsA"),o=n("hPIQ"),s=n("aCFj");t.exports=n("Afnz")(Array,"Array",(function(t,e){this._t=s(t),this._i=0,this._k=e}),(function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,r(1)):r(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])}),"values"),o.Arguments=o.Array,i("keys"),i("values"),i("entries")},"z/Fx":function(t,e,n){"use strict";n("XfO3"),n("HEwt"),n("f3/d"),n("a1Th"),n("Btvt"),n("rGqo"),n("rE2o"),n("ioFf"),n("9VmF");function i(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,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(i=(s=a.next()).done)&&(n.push(s.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{i||null==a.return||a.return()}finally{if(r)throw o}}return n}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return r(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return r(t,e)}(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 r(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}e.a=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.rootAttributeName,o=void 0===r?"data-intersection-root":r,s=n.rootMarginAttributeName,a=void 0===s?"data-intersection-root-margin":s,l=n.thresholdAttributeName,c=void 0===l?"data-intersection-threshold":l,u=n.onceAttributeName,h=void 0===u?"data-intersection-once":u;if(null==t||null==e)return function(){};var d=t.getAttribute(o),p=d?document.querySelector(d):null,f=t.getAttribute(a),m=f||"0px",g=t.getAttribute(c),v=g?g.startsWith("[")?JSON.parse(g):+g:0,y=Array.isArray(v)&&v.length||v>=0&&v<=1?v:0,b=t.hasAttribute(h),x=b?function(n,r){var o=i(n,1)[0];e(o,r),o.isIntersecting&&r.unobserve(t)}:function(t,n){var r=i(t,1)[0];return e(r,n)},w=new IntersectionObserver(x,{root:p,rootMargin:m,threshold:y});return w.observe(t),function(){return w.unobserve(t)}}},zRwo:function(t,e,n){var i=n("6FMO");t.exports=function(t,e){return new(i(t))(e)}},zhAb:function(t,e,n){var i=n("aagx"),r=n("aCFj"),o=n("w2a5")(!1),s=n("YTvA")("IE_PROTO");t.exports=function(t,e){var n,a=r(t),l=0,c=[];for(n in a)n!=s&&i(a,n)&&c.push(n);for(;e.length>l;)i(a,n=e[l++])&&(~o(c,n)||c.push(n));return c}}});