react-floorplanner
Version:
react-floorplanner is a React Component for plans design. Draw a 2D floorplan and navigate it in 3D mode.
16 lines • 720 kB
JavaScript
webpackJsonp([1],{0:function(t,e,n){"use strict";t.exports=n(185)},1:function(t,e,n){"use strict";function r(){}function i(t,e){this.x=t||0,this.y=e||0}function o(t,e,n,r,a,s,u,c,l,h){Object.defineProperty(this,"id",{value:is++}),this.uuid=rs.generateUUID(),this.name="",this.image=void 0!==t?t:o.DEFAULT_IMAGE,this.mipmaps=[],this.mapping=void 0!==e?e:o.DEFAULT_MAPPING,this.wrapS=void 0!==n?n:Qo,this.wrapT=void 0!==r?r:Qo,this.magFilter=void 0!==a?a:ra,this.minFilter=void 0!==s?s:oa,this.anisotropy=void 0!==l?l:1,this.format=void 0!==u?u:ba,this.type=void 0!==c?c:aa,this.offset=new i(0,0),this.repeat=new i(1,1),this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=void 0!==h?h:Xa,this.version=0,this.onUpdate=null}function a(t,e,n,r){this.x=t||0,this.y=e||0,this.z=n||0,this.w=void 0!==r?r:1}function s(t,e,n){this.uuid=rs.generateUUID(),this.width=t,this.height=e,this.scissor=new a(0,0,t,e),this.scissorTest=!1,this.viewport=new a(0,0,t,e),void 0===(n=n||{}).minFilter&&(n.minFilter=ra),this.texture=new o(void 0,void 0,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.encoding),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 u(t,e,n){s.call(this,t,e,n),this.activeCubeFace=0,this.activeMipMapLevel=0}function c(t,e,n,r){this._x=t||0,this._y=e||0,this._z=n||0,this._w=void 0!==r?r:1}function l(t,e,n){this.x=t||0,this.y=e||0,this.z=n||0}function h(){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.")}function p(t,e,n,r,i,a,s,u,c,l,h,p){o.call(this,null,a,s,u,c,l,r,i,h,p),this.image={data:t,width:e,height:n},this.magFilter=void 0!==c?c:ta,this.minFilter=void 0!==l?l:ta,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}function d(t,e,n,r,i,a,s,u,c,l){o.call(this,t=void 0!==t?t:[],e=void 0!==e?e:Vo,n,r,i,a,s,u,c,l),this.flipY=!1}function f(){this.seq=[],this.map={}}function m(t,e,n){var r=t[0];if(r<=0||r>0)return t;var i=e*n,o=ss[i];if(void 0===o&&(o=new Float32Array(i),ss[i]=o),0!==e){r.toArray(o,0);for(var a=1,s=0;a!==e;++a)s+=n,t[a].toArray(o,s)}return o}function v(t,e){var n=us[e];void 0===n&&(n=new Int32Array(e),us[e]=n);for(var r=0;r!==e;++r)n[r]=t.allocTextureUnit();return n}function g(t,e){t.uniform1f(this.addr,e)}function y(t,e){t.uniform1i(this.addr,e)}function _(t,e){void 0===e.x?t.uniform2fv(this.addr,e):t.uniform2f(this.addr,e.x,e.y)}function b(t,e){void 0!==e.x?t.uniform3f(this.addr,e.x,e.y,e.z):void 0!==e.r?t.uniform3f(this.addr,e.r,e.g,e.b):t.uniform3fv(this.addr,e)}function x(t,e){void 0===e.x?t.uniform4fv(this.addr,e):t.uniform4f(this.addr,e.x,e.y,e.z,e.w)}function w(t,e){t.uniformMatrix2fv(this.addr,!1,e.elements||e)}function E(t,e){void 0===e.elements?t.uniformMatrix3fv(this.addr,!1,e):(ls.set(e.elements),t.uniformMatrix3fv(this.addr,!1,ls))}function M(t,e){void 0===e.elements?t.uniformMatrix4fv(this.addr,!1,e):(cs.set(e.elements),t.uniformMatrix4fv(this.addr,!1,cs))}function T(t,e,n){var r=n.allocTextureUnit();t.uniform1i(this.addr,r),n.setTexture2D(e||os,r)}function S(t,e,n){var r=n.allocTextureUnit();t.uniform1i(this.addr,r),n.setTextureCube(e||as,r)}function C(t,e){t.uniform2iv(this.addr,e)}function A(t,e){t.uniform3iv(this.addr,e)}function P(t,e){t.uniform4iv(this.addr,e)}function R(t,e){t.uniform1fv(this.addr,e)}function L(t,e){t.uniform1iv(this.addr,e)}function I(t,e){t.uniform2fv(this.addr,m(e,this.size,2))}function O(t,e){t.uniform3fv(this.addr,m(e,this.size,3))}function N(t,e){t.uniform4fv(this.addr,m(e,this.size,4))}function D(t,e){t.uniformMatrix2fv(this.addr,!1,m(e,this.size,4))}function U(t,e){t.uniformMatrix3fv(this.addr,!1,m(e,this.size,9))}function F(t,e){t.uniformMatrix4fv(this.addr,!1,m(e,this.size,16))}function k(t,e,n){var r=e.length,i=v(n,r);t.uniform1iv(this.addr,i);for(var o=0;o!==r;++o)n.setTexture2D(e[o]||os,i[o])}function z(t,e,n){var r=e.length,i=v(n,r);t.uniform1iv(this.addr,i);for(var o=0;o!==r;++o)n.setTextureCube(e[o]||as,i[o])}function B(t,e,n){this.id=t,this.addr=n,this.setValue=function(t){switch(t){case 5126:return g;case 35664:return _;case 35665:return b;case 35666:return x;case 35674:return w;case 35675:return E;case 35676:return M;case 35678:case 36198:return T;case 35680:return S;case 5124:case 35670:return y;case 35667:case 35671:return C;case 35668:case 35672:return A;case 35669:case 35673:return P}}(e.type)}function H(t,e,n){this.id=t,this.addr=n,this.size=e.size,this.setValue=function(t){switch(t){case 5126:return R;case 35664:return I;case 35665:return O;case 35666:return N;case 35674:return D;case 35675:return U;case 35676:return F;case 35678:return k;case 35680:return z;case 5124:case 35670:return L;case 35667:case 35671:return C;case 35668:case 35672:return A;case 35669:case 35673:return P}}(e.type)}function G(t){this.id=t,f.call(this)}function j(t,e){t.seq.push(e),t.map[e.id]=e}function V(t,e,n){var r=t.name,i=r.length;for(hs.lastIndex=0;;){var o=hs.exec(r),a=hs.lastIndex,s=o[1],u="]"===o[2],c=o[3];if(u&&(s|=0),void 0===c||"["===c&&a+2===i){j(n,void 0===c?new B(s,t,e):new H(s,t,e));break}var l=n.map[s];void 0===l&&j(n,l=new G(s)),n=l}}function W(t,e,n){f.call(this),this.renderer=n;for(var r=t.getProgramParameter(e,t.ACTIVE_UNIFORMS),i=0;i<r;++i){var o=t.getActiveUniform(e,i),a=o.name;V(o,t.getUniformLocation(e,a),this)}}function q(t,e,n){return void 0===e&&void 0===n?this.set(t):this.setRGB(t,e,n)}function X(t,e){this.min=void 0!==t?t:new i(1/0,1/0),this.max=void 0!==e?e:new i(-1/0,-1/0)}function Y(t,e,n,r,o){function a(){var t=new Float32Array([-1,-1,0,0,1,-1,1,0,1,1,1,1,-1,1,0,1]),r=new Uint16Array([0,1,2,0,2,3]);s=e.createBuffer(),u=e.createBuffer(),e.bindBuffer(e.ARRAY_BUFFER,s),e.bufferData(e.ARRAY_BUFFER,t,e.STATIC_DRAW),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,u),e.bufferData(e.ELEMENT_ARRAY_BUFFER,r,e.STATIC_DRAW),f=e.createTexture(),m=e.createTexture(),n.bindTexture(e.TEXTURE_2D,f),e.texImage2D(e.TEXTURE_2D,0,e.RGB,16,16,0,e.RGB,e.UNSIGNED_BYTE,null),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),n.bindTexture(e.TEXTURE_2D,m),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,16,16,0,e.RGBA,e.UNSIGNED_BYTE,null),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),c={vertexShader:["uniform lowp int renderType;","uniform vec3 screenPosition;","uniform vec2 scale;","uniform float rotation;","uniform sampler2D occlusionMap;","attribute vec2 position;","attribute vec2 uv;","varying vec2 vUV;","varying float vVisibility;","void main() {","vUV = uv;","vec2 pos = position;","if ( renderType == 2 ) {","vec4 visibility = texture2D( occlusionMap, vec2( 0.1, 0.1 ) );","visibility += texture2D( occlusionMap, vec2( 0.5, 0.1 ) );","visibility += texture2D( occlusionMap, vec2( 0.9, 0.1 ) );","visibility += texture2D( occlusionMap, vec2( 0.9, 0.5 ) );","visibility += texture2D( occlusionMap, vec2( 0.9, 0.9 ) );","visibility += texture2D( occlusionMap, vec2( 0.5, 0.9 ) );","visibility += texture2D( occlusionMap, vec2( 0.1, 0.9 ) );","visibility += texture2D( occlusionMap, vec2( 0.1, 0.5 ) );","visibility += texture2D( occlusionMap, vec2( 0.5, 0.5 ) );","vVisibility = visibility.r / 9.0;","vVisibility *= 1.0 - visibility.g / 9.0;","vVisibility *= visibility.b / 9.0;","vVisibility *= 1.0 - visibility.a / 9.0;","pos.x = cos( rotation ) * position.x - sin( rotation ) * position.y;","pos.y = sin( rotation ) * position.x + cos( rotation ) * position.y;","}","gl_Position = vec4( ( pos * scale + screenPosition.xy ).xy, screenPosition.z, 1.0 );","}"].join("\n"),fragmentShader:["uniform lowp int renderType;","uniform sampler2D map;","uniform float opacity;","uniform vec3 color;","varying vec2 vUV;","varying float vVisibility;","void main() {","if ( renderType == 0 ) {","gl_FragColor = vec4( 1.0, 0.0, 1.0, 0.0 );","} else if ( renderType == 1 ) {","gl_FragColor = texture2D( map, vUV );","} else {","vec4 texture = texture2D( map, vUV );","texture.a *= opacity * vVisibility;","gl_FragColor = texture;","gl_FragColor.rgb *= color;","}","}"].join("\n")},h=function(t){var n=e.createProgram(),r=e.createShader(e.FRAGMENT_SHADER),i=e.createShader(e.VERTEX_SHADER),a="precision "+o.precision+" float;\n";return e.shaderSource(r,a+t.fragmentShader),e.shaderSource(i,a+t.vertexShader),e.compileShader(r),e.compileShader(i),e.attachShader(n,r),e.attachShader(n,i),e.linkProgram(n),n}(c),p={vertex:e.getAttribLocation(h,"position"),uv:e.getAttribLocation(h,"uv")},d={renderType:e.getUniformLocation(h,"renderType"),map:e.getUniformLocation(h,"map"),occlusionMap:e.getUniformLocation(h,"occlusionMap"),opacity:e.getUniformLocation(h,"opacity"),color:e.getUniformLocation(h,"color"),scale:e.getUniformLocation(h,"scale"),rotation:e.getUniformLocation(h,"rotation"),screenPosition:e.getUniformLocation(h,"screenPosition")}}var s,u,c,h,p,d,f,m;this.render=function(t,o,c,v){if(0!==t.length){var g=new l,y=v.w/v.z,_=.5*v.z,b=.5*v.w,x=16/v.w,w=new i(x*y,x),E=new l(1,1,0),M=new i(1,1),T=new X;T.min.set(v.x,v.y),T.max.set(v.x+(v.z-16),v.y+(v.w-16)),void 0===h&&a(),n.useProgram(h),n.initAttributes(),n.enableAttribute(p.vertex),n.enableAttribute(p.uv),n.disableUnusedAttributes(),e.uniform1i(d.occlusionMap,0),e.uniform1i(d.map,1),e.bindBuffer(e.ARRAY_BUFFER,s),e.vertexAttribPointer(p.vertex,2,e.FLOAT,!1,16,0),e.vertexAttribPointer(p.uv,2,e.FLOAT,!1,16,8),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,u),n.disable(e.CULL_FACE),n.buffers.depth.setMask(!1);for(var S=0,C=t.length;S<C;S++){x=16/v.w,w.set(x*y,x);var A=t[S];if(g.set(A.matrixWorld.elements[12],A.matrixWorld.elements[13],A.matrixWorld.elements[14]),g.applyMatrix4(c.matrixWorldInverse),g.applyMatrix4(c.projectionMatrix),E.copy(g),M.x=v.x+E.x*_+_-8,M.y=v.y+E.y*b+b-8,!0===T.containsPoint(M)){n.activeTexture(e.TEXTURE0),n.bindTexture(e.TEXTURE_2D,null),n.activeTexture(e.TEXTURE1),n.bindTexture(e.TEXTURE_2D,f),e.copyTexImage2D(e.TEXTURE_2D,0,e.RGB,M.x,M.y,16,16,0),e.uniform1i(d.renderType,0),e.uniform2f(d.scale,w.x,w.y),e.uniform3f(d.screenPosition,E.x,E.y,E.z),n.disable(e.BLEND),n.enable(e.DEPTH_TEST),e.drawElements(e.TRIANGLES,6,e.UNSIGNED_SHORT,0),n.activeTexture(e.TEXTURE0),n.bindTexture(e.TEXTURE_2D,m),e.copyTexImage2D(e.TEXTURE_2D,0,e.RGBA,M.x,M.y,16,16,0),e.uniform1i(d.renderType,1),n.disable(e.DEPTH_TEST),n.activeTexture(e.TEXTURE1),n.bindTexture(e.TEXTURE_2D,f),e.drawElements(e.TRIANGLES,6,e.UNSIGNED_SHORT,0),A.positionScreen.copy(E),A.customUpdateCallback?A.customUpdateCallback(A):A.updateLensFlares(),e.uniform1i(d.renderType,2),n.enable(e.BLEND);for(var P=0,R=A.lensFlares.length;P<R;P++){var L=A.lensFlares[P];L.opacity>.001&&L.scale>.001&&(E.x=L.x,E.y=L.y,E.z=L.z,x=L.size*L.scale/v.w,w.x=x*y,w.y=x,e.uniform3f(d.screenPosition,E.x,E.y,E.z),e.uniform2f(d.scale,w.x,w.y),e.uniform1f(d.rotation,L.rotation),e.uniform1f(d.opacity,L.opacity),e.uniform3f(d.color,L.color.r,L.color.g,L.color.b),n.setBlending(L.blending,L.blendEquation,L.blendSrc,L.blendDst),r.setTexture2D(L.texture,1),e.drawElements(e.TRIANGLES,6,e.UNSIGNED_SHORT,0))}}}n.enable(e.CULL_FACE),n.enable(e.DEPTH_TEST),n.buffers.depth.setMask(!0),n.reset()}}}function K(t,e,n,r,i,a,s,u,c){o.call(this,t,e,n,r,i,a,s,u,c),this.needsUpdate=!0}function Z(t,e,n,r,i){function o(){var t=new Float32Array([-.5,-.5,0,0,.5,-.5,1,0,.5,.5,1,1,-.5,.5,0,1]),n=new Uint16Array([0,1,2,0,2,3]);s=e.createBuffer(),u=e.createBuffer(),e.bindBuffer(e.ARRAY_BUFFER,s),e.bufferData(e.ARRAY_BUFFER,t,e.STATIC_DRAW),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,u),e.bufferData(e.ELEMENT_ARRAY_BUFFER,n,e.STATIC_DRAW),h=function(){var t=e.createProgram(),n=e.createShader(e.VERTEX_SHADER),r=e.createShader(e.FRAGMENT_SHADER);return e.shaderSource(n,["precision "+i.precision+" float;","#define SHADER_NAME SpriteMaterial","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform float rotation;","uniform vec2 scale;","uniform vec2 uvOffset;","uniform vec2 uvScale;","attribute vec2 position;","attribute vec2 uv;","varying vec2 vUV;","void main() {","vUV = uvOffset + uv * uvScale;","vec2 alignedPosition = position * scale;","vec2 rotatedPosition;","rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;","rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;","vec4 finalPosition;","finalPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );","finalPosition.xy += rotatedPosition;","finalPosition = projectionMatrix * finalPosition;","gl_Position = finalPosition;","}"].join("\n")),e.shaderSource(r,["precision "+i.precision+" float;","#define SHADER_NAME SpriteMaterial","uniform vec3 color;","uniform sampler2D map;","uniform float opacity;","uniform int fogType;","uniform vec3 fogColor;","uniform float fogDensity;","uniform float fogNear;","uniform float fogFar;","uniform float alphaTest;","varying vec2 vUV;","void main() {","vec4 texture = texture2D( map, vUV );","if ( texture.a < alphaTest ) discard;","gl_FragColor = vec4( color * texture.xyz, texture.a * opacity );","if ( fogType > 0 ) {","float depth = gl_FragCoord.z / gl_FragCoord.w;","float fogFactor = 0.0;","if ( fogType == 1 ) {","fogFactor = smoothstep( fogNear, fogFar, depth );","} else {","const float LOG2 = 1.442695;","fogFactor = exp2( - fogDensity * fogDensity * depth * depth * LOG2 );","fogFactor = 1.0 - clamp( fogFactor, 0.0, 1.0 );","}","gl_FragColor = mix( gl_FragColor, vec4( fogColor, gl_FragColor.w ), fogFactor );","}","}"].join("\n")),e.compileShader(n),e.compileShader(r),e.attachShader(t,n),e.attachShader(t,r),e.linkProgram(t),t}(),p={position:e.getAttribLocation(h,"position"),uv:e.getAttribLocation(h,"uv")},d={uvOffset:e.getUniformLocation(h,"uvOffset"),uvScale:e.getUniformLocation(h,"uvScale"),rotation:e.getUniformLocation(h,"rotation"),scale:e.getUniformLocation(h,"scale"),color:e.getUniformLocation(h,"color"),map:e.getUniformLocation(h,"map"),opacity:e.getUniformLocation(h,"opacity"),modelViewMatrix:e.getUniformLocation(h,"modelViewMatrix"),projectionMatrix:e.getUniformLocation(h,"projectionMatrix"),fogType:e.getUniformLocation(h,"fogType"),fogDensity:e.getUniformLocation(h,"fogDensity"),fogNear:e.getUniformLocation(h,"fogNear"),fogFar:e.getUniformLocation(h,"fogFar"),fogColor:e.getUniformLocation(h,"fogColor"),alphaTest:e.getUniformLocation(h,"alphaTest")};var r=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");r.width=8,r.height=8;var o=r.getContext("2d");o.fillStyle="white",o.fillRect(0,0,8,8),f=new K(r)}function a(t,e){return t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.z!==e.z?e.z-t.z:e.id-t.id}var s,u,h,p,d,f,m=new l,v=new c,g=new l;this.render=function(i,c,l){if(0!==i.length){void 0===h&&o(),n.useProgram(h),n.initAttributes(),n.enableAttribute(p.position),n.enableAttribute(p.uv),n.disableUnusedAttributes(),n.disable(e.CULL_FACE),n.enable(e.BLEND),e.bindBuffer(e.ARRAY_BUFFER,s),e.vertexAttribPointer(p.position,2,e.FLOAT,!1,16,0),e.vertexAttribPointer(p.uv,2,e.FLOAT,!1,16,8),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,u),e.uniformMatrix4fv(d.projectionMatrix,!1,l.projectionMatrix.elements),n.activeTexture(e.TEXTURE0),e.uniform1i(d.map,0);var y=0,_=0,b=c.fog;b?(e.uniform3f(d.fogColor,b.color.r,b.color.g,b.color.b),b.isFog?(e.uniform1f(d.fogNear,b.near),e.uniform1f(d.fogFar,b.far),e.uniform1i(d.fogType,1),y=1,_=1):b.isFogExp2&&(e.uniform1f(d.fogDensity,b.density),e.uniform1i(d.fogType,2),y=2,_=2)):(e.uniform1i(d.fogType,0),y=0,_=0);for(var x=0,w=i.length;x<w;x++){(M=i[x]).modelViewMatrix.multiplyMatrices(l.matrixWorldInverse,M.matrixWorld),M.z=-M.modelViewMatrix.elements[14]}i.sort(a);for(var E=[],x=0,w=i.length;x<w;x++){var M=i[x],T=M.material;if(!1!==T.visible){M.onBeforeRender(t,c,l,void 0,T,void 0),e.uniform1f(d.alphaTest,T.alphaTest),e.uniformMatrix4fv(d.modelViewMatrix,!1,M.modelViewMatrix.elements),M.matrixWorld.decompose(m,v,g),E[0]=g.x,E[1]=g.y;var S=0;c.fog&&T.fog&&(S=_),y!==S&&(e.uniform1i(d.fogType,S),y=S),null!==T.map?(e.uniform2f(d.uvOffset,T.map.offset.x,T.map.offset.y),e.uniform2f(d.uvScale,T.map.repeat.x,T.map.repeat.y)):(e.uniform2f(d.uvOffset,0,0),e.uniform2f(d.uvScale,1,1)),e.uniform1f(d.opacity,T.opacity),e.uniform3f(d.color,T.color.r,T.color.g,T.color.b),e.uniform1f(d.rotation,T.rotation),e.uniform2fv(d.scale,E),n.setBlending(T.blending,T.blendEquation,T.blendSrc,T.blendDst,T.blendEquationAlpha,T.blendSrcAlpha,T.blendDstAlpha,T.premultipliedAlpha),n.buffers.depth.setTest(T.depthTest),n.buffers.depth.setMask(T.depthWrite),r.setTexture2D(T.map||f,0),e.drawElements(e.TRIANGLES,6,e.UNSIGNED_SHORT,0),M.onAfterRender(t,c,l,void 0,T,void 0)}}n.enable(e.CULL_FACE),n.reset()}}}function J(){Object.defineProperty(this,"id",{value:gs++}),this.uuid=rs.generateUUID(),this.name="",this.type="Material",this.fog=!0,this.lights=!0,this.blending=oo,this.side=Zi,this.flatShading=!1,this.vertexColors=eo,this.opacity=1,this.transparent=!1,this.blendSrc=bo,this.blendDst=xo,this.blendEquation=lo,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=Ro,this.depthTest=!0,this.depthWrite=!0,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,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.overdraw=0,this.visible=!0,this.userData={},this.needsUpdate=!0}function Q(t){J.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,void 0!==t&&(void 0!==t.attributes&&console.error("THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead."),this.setValues(t))}function $(t){J.call(this),this.type="MeshDepthMaterial",this.depthPacking=es,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.lights=!1,this.setValues(t)}function tt(t){J.call(this),this.type="MeshDistanceMaterial",this.referencePosition=new l,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.lights=!1,this.setValues(t)}function et(t,e){this.min=void 0!==t?t:new l(1/0,1/0,1/0),this.max=void 0!==e?e:new l(-1/0,-1/0,-1/0)}function nt(t,e){this.center=void 0!==t?t:new l,this.radius=void 0!==e?e:0}function rt(){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.")}function it(t,e){this.normal=void 0!==t?t:new l(1,0,0),this.constant=void 0!==e?e:0}function ot(t,e,n,r,i,o){this.planes=[void 0!==t?t:new it,void 0!==e?e:new it,void 0!==n?n:new it,void 0!==r?r:new it,void 0!==i?i:new it,void 0!==o?o:new it]}function at(t,e,n){function r(e,n,r,i,o,a){var s=e.geometry,u=null,c=_,l=e.customDepthMaterial;if(r&&(c=b,l=e.customDistanceMaterial),l)u=l;else{var h=!1;n.morphTargets&&(s&&s.isBufferGeometry?h=s.morphAttributes&&s.morphAttributes.position&&s.morphAttributes.position.length>0:s&&s.isGeometry&&(h=s.morphTargets&&s.morphTargets.length>0)),e.isSkinnedMesh&&!1===n.skinning&&console.warn("THREE.WebGLShadowMap: THREE.SkinnedMesh with material.skinning set to false:",e);var p=e.isSkinnedMesh&&n.skinning,d=0;h&&(d|=v),p&&(d|=g),u=c[d]}if(t.localClippingEnabled&&!0===n.clipShadows&&0!==n.clippingPlanes.length){var f=u.uuid,m=n.uuid,y=x[f];void 0===y&&(y={},x[f]=y);var w=y[m];void 0===w&&(w=u.clone(),y[m]=w),u=w}u.visible=n.visible,u.wireframe=n.wireframe;var E=n.side;return R.renderSingleSided&&E==Qi&&(E=Zi),R.renderReverseSided&&(E===Zi?E=Ji:E===Ji&&(E=Zi)),u.side=E,u.clipShadows=n.clipShadows,u.clippingPlanes=n.clippingPlanes,u.clipIntersection=n.clipIntersection,u.wireframeLinewidth=n.wireframeLinewidth,u.linewidth=n.linewidth,r&&u.isMeshDistanceMaterial&&(u.referencePosition.copy(i),u.nearDistance=o,u.farDistance=a),u}function o(n,i,a,s){if(!1!==n.visible){if(n.layers.test(i.layers)&&(n.isMesh||n.isLine||n.isPoints)&&n.castShadow&&(!n.frustumCulled||u.intersectsObject(n))){n.modelViewMatrix.multiplyMatrices(a.matrixWorldInverse,n.matrixWorld);var c=e.update(n),l=n.material;if(Array.isArray(l))for(var h=c.groups,p=0,d=h.length;p<d;p++){var f=h[p],v=l[f.materialIndex];if(v&&v.visible){g=r(n,v,s,m,a.near,a.far);t.renderBufferDirect(a,null,c,g,n,f)}}else if(l.visible){var g=r(n,l,s,m,a.near,a.far);t.renderBufferDirect(a,null,c,g,n,null)}}for(var y=n.children,_=0,b=y.length;_<b;_++)o(y[_],i,a,s)}}for(var u=new ot,c=new h,p=new i,d=new i(n,n),f=new l,m=new l,v=1,g=2,y=1+(v|g),_=new Array(y),b=new Array(y),x={},w=[new l(1,0,0),new l(-1,0,0),new l(0,0,1),new l(0,0,-1),new l(0,1,0),new l(0,-1,0)],E=[new l(0,1,0),new l(0,1,0),new l(0,1,0),new l(0,1,0),new l(0,0,1),new l(0,0,-1)],M=[new a,new a,new a,new a,new a,new a],T=0;T!==y;++T){var S=0!=(T&v),C=0!=(T&g),A=new $({depthPacking:ns,morphTargets:S,skinning:C});_[T]=A;var P=new tt({morphTargets:S,skinning:C});b[T]=P}var R=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=Yi,this.renderReverseSided=!0,this.renderSingleSided=!0,this.render=function(e,n,r){if(!1!==R.enabled&&(!1!==R.autoUpdate||!1!==R.needsUpdate)&&0!==e.length){var i=t.context,a=t.state;a.disable(i.BLEND),a.buffers.color.setClear(1,1,1,1),a.buffers.depth.setTest(!0),a.setScissorTest(!1);for(var l,h=0,v=e.length;h<v;h++){var g=e[h],y=g.shadow,_=g&&g.isPointLight;if(void 0!==y){var b=y.camera;if(p.copy(y.mapSize),p.min(d),_){var x=p.x,T=p.y;M[0].set(2*x,T,x,T),M[1].set(0,T,x,T),M[2].set(3*x,T,x,T),M[3].set(x,T,x,T),M[4].set(3*x,0,x,T),M[5].set(x,0,x,T),p.x*=4,p.y*=2}if(null===y.map){var S={minFilter:ta,magFilter:ta,format:ba};y.map=new s(p.x,p.y,S),y.map.texture.name=g.name+".shadowMap",b.updateProjectionMatrix()}y.isSpotLightShadow&&y.update(g);var C=y.map,A=y.matrix;m.setFromMatrixPosition(g.matrixWorld),b.position.copy(m),_?(l=6,A.makeTranslation(-m.x,-m.y,-m.z)):(l=1,f.setFromMatrixPosition(g.target.matrixWorld),b.lookAt(f),b.updateMatrixWorld(),A.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),A.multiply(b.projectionMatrix),A.multiply(b.matrixWorldInverse)),t.setRenderTarget(C),t.clear();for(var P=0;P<l;P++){if(_){f.copy(b.position),f.add(w[P]),b.up.copy(E[P]),b.lookAt(f),b.updateMatrixWorld();var L=M[P];a.viewport(L)}c.multiplyMatrices(b.projectionMatrix,b.matrixWorldInverse),u.setFromMatrix(c),o(n,r,b,_)}}else console.warn("THREE.WebGLShadowMap:",g,"has no shadow.")}R.needsUpdate=!1}}}function st(t){function e(e,r){e.isInterleavedBufferAttribute&&(e=e.data);var i=n[e.uuid];void 0===i?n[e.uuid]=function(e,n){var r=e.array,i=e.dynamic?t.DYNAMIC_DRAW:t.STATIC_DRAW,o=t.createBuffer();t.bindBuffer(n,o),t.bufferData(n,r,i),e.onUploadCallback();var a=t.FLOAT;return r instanceof Float32Array?a=t.FLOAT:r instanceof Float64Array?console.warn("THREE.WebGLAttributes: Unsupported data buffer format: Float64Array."):r instanceof Uint16Array?a=t.UNSIGNED_SHORT:r instanceof Int16Array?a=t.SHORT:r instanceof Uint32Array?a=t.UNSIGNED_INT:r instanceof Int32Array?a=t.INT:r instanceof Int8Array?a=t.BYTE:r instanceof Uint8Array&&(a=t.UNSIGNED_BYTE),{buffer:o,type:a,bytesPerElement:r.BYTES_PER_ELEMENT,version:e.version}}(e,r):i.version<e.version&&(!function(e,n,r){var i=n.array,o=n.updateRange;t.bindBuffer(r,e),!1===n.dynamic?t.bufferData(r,i,t.STATIC_DRAW):-1===o.count?t.bufferSubData(r,0,i):0===o.count?console.error("THREE.WebGLObjects.updateBuffer: dynamic THREE.BufferAttribute marked as needsUpdate but updateRange.count is 0, ensure you are using set methods or updating manually."):(t.bufferSubData(r,o.offset*i.BYTES_PER_ELEMENT,i.subarray(o.offset,o.offset+o.count)),o.count=-1)}(i.buffer,e,r),i.version=e.version)}var n={};return{get:function(t){return t.isInterleavedBufferAttribute&&(t=t.data),n[t.uuid]},remove:function(e){e.isInterleavedBufferAttribute&&(e=e.data);var r=n[e.uuid];r&&(t.deleteBuffer(r.buffer),delete n[e.uuid])},update:e}}function ut(t,e,n,r){this._x=t||0,this._y=e||0,this._z=n||0,this._order=r||ut.DefaultOrder}function ct(){this.mask=1}function lt(){Object.defineProperty(this,"id",{value:ys++}),this.uuid=rs.generateUUID(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=lt.DefaultUp.clone();var t=new l,e=new ut,n=new c,r=new l(1,1,1);e.onChange(function(){n.setFromEuler(e,!1)}),n.onChange(function(){e.setFromQuaternion(n,void 0,!1)}),Object.defineProperties(this,{position:{enumerable:!0,value:t},rotation:{enumerable:!0,value:e},quaternion:{enumerable:!0,value:n},scale:{enumerable:!0,value:r},modelViewMatrix:{value:new h},normalMatrix:{value:new rt}}),this.matrix=new h,this.matrixWorld=new h,this.matrixAutoUpdate=lt.DefaultMatrixAutoUpdate,this.matrixWorldNeedsUpdate=!1,this.layers=new ct,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.userData={}}function ht(){lt.call(this),this.type="Camera",this.matrixWorldInverse=new h,this.projectionMatrix=new h}function pt(t,e,n,r,i,o){ht.call(this),this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=t,this.right=e,this.top=n,this.bottom=r,this.near=void 0!==i?i:.1,this.far=void 0!==o?o:2e3,this.updateProjectionMatrix()}function dt(t,e,n,r){ht.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!==r?r:2e3,this.focus=10,this.aspect=void 0!==e?e:1,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}function ft(t,e,n,r,i,o){this.a=t,this.b=e,this.c=n,this.normal=r&&r.isVector3?r:new l,this.vertexNormals=Array.isArray(r)?r:[],this.color=i&&i.isColor?i:new q,this.vertexColors=Array.isArray(i)?i:[],this.materialIndex=void 0!==o?o:0}function mt(){return _s++}function vt(){Object.defineProperty(this,"id",{value:mt()}),this.uuid=rs.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}function gt(t,e,n){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.uuid=rs.generateUUID(),this.name="",this.array=t,this.itemSize=e,this.count=void 0!==t?t.length/e:0,this.normalized=!0===n,this.dynamic=!1,this.updateRange={offset:0,count:-1},this.onUploadCallback=function(){},this.version=0}function yt(t,e){gt.call(this,new Int8Array(t),e)}function _t(t,e){gt.call(this,new Uint8Array(t),e)}function bt(t,e){gt.call(this,new Uint8ClampedArray(t),e)}function xt(t,e){gt.call(this,new Int16Array(t),e)}function wt(t,e){gt.call(this,new Uint16Array(t),e)}function Et(t,e){gt.call(this,new Int32Array(t),e)}function Mt(t,e){gt.call(this,new Uint32Array(t),e)}function Tt(t,e){gt.call(this,new Float32Array(t),e)}function St(t,e){gt.call(this,new Float64Array(t),e)}function Ct(){this.indices=[],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}function At(t){if(0===t.length)return-1/0;for(var e=t[0],n=1,r=t.length;n<r;++n)t[n]>e&&(e=t[n]);return e}function Pt(){Object.defineProperty(this,"id",{value:mt()}),this.uuid=rs.generateUUID(),this.name="",this.type="BufferGeometry",this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0}}function Rt(t,e,n,r,i,o){vt.call(this),this.type="BoxGeometry",this.parameters={width:t,height:e,depth:n,widthSegments:r,heightSegments:i,depthSegments:o},this.fromBufferGeometry(new Lt(t,e,n,r,i,o)),this.mergeVertices()}function Lt(t,e,n,r,i,o){function a(t,e,n,r,i,o,a,m,v,g,y){var _,b,x=o/v,w=a/g,E=o/2,M=a/2,T=m/2,S=v+1,C=g+1,A=0,P=0,R=new l;for(b=0;b<C;b++){var L=b*w-M;for(_=0;_<S;_++){var I=_*x-E;R[t]=I*r,R[e]=L*i,R[n]=T,c.push(R.x,R.y,R.z),R[t]=0,R[e]=0,R[n]=m>0?1:-1,h.push(R.x,R.y,R.z),p.push(_/v),p.push(1-b/g),A+=1}}for(b=0;b<g;b++)for(_=0;_<v;_++){var O=d+_+S*b,N=d+_+S*(b+1),D=d+(_+1)+S*(b+1),U=d+(_+1)+S*b;u.push(O,N,U),u.push(N,D,U),P+=6}s.addGroup(f,P,y),f+=P,d+=A}Pt.call(this),this.type="BoxBufferGeometry",this.parameters={width:t,height:e,depth:n,widthSegments:r,heightSegments:i,depthSegments:o};var s=this;r=Math.floor(r)||1,i=Math.floor(i)||1;var u=[],c=[],h=[],p=[],d=0,f=0;a("z","y","x",-1,-1,n,e,t,o=Math.floor(o)||1,i,0),a("z","y","x",1,-1,n,e,-t,o,i,1),a("x","z","y",1,1,t,n,e,r,o,2),a("x","z","y",1,-1,t,n,-e,r,o,3),a("x","y","z",1,-1,t,e,n,r,i,4),a("x","y","z",-1,-1,t,e,-n,r,i,5),this.setIndex(u),this.addAttribute("position",new Tt(c,3)),this.addAttribute("normal",new Tt(h,3)),this.addAttribute("uv",new Tt(p,2))}function It(t,e,n,r){vt.call(this),this.type="PlaneGeometry",this.parameters={width:t,height:e,widthSegments:n,heightSegments:r},this.fromBufferGeometry(new Ot(t,e,n,r)),this.mergeVertices()}function Ot(t,e,n,r){Pt.call(this),this.type="PlaneBufferGeometry",this.parameters={width:t,height:e,widthSegments:n,heightSegments:r};var i,o,a=t/2,s=e/2,u=Math.floor(n)||1,c=Math.floor(r)||1,l=u+1,h=c+1,p=t/u,d=e/c,f=[],m=[],v=[],g=[];for(o=0;o<h;o++){var y=o*d-s;for(i=0;i<l;i++){var _=i*p-a;m.push(_,-y,0),v.push(0,0,1),g.push(i/u),g.push(1-o/c)}}for(o=0;o<c;o++)for(i=0;i<u;i++){var b=i+l*o,x=i+l*(o+1),w=i+1+l*(o+1),E=i+1+l*o;f.push(b,x,E),f.push(x,w,E)}this.setIndex(f),this.addAttribute("position",new Tt(m,3)),this.addAttribute("normal",new Tt(v,3)),this.addAttribute("uv",new Tt(g,2))}function Nt(t){J.call(this),this.type="MeshBasicMaterial",this.color=new q(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=Do,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.lights=!1,this.setValues(t)}function Dt(t,e){this.origin=void 0!==t?t:new l,this.direction=void 0!==e?e:new l}function Ut(t,e){this.start=void 0!==t?t:new l,this.end=void 0!==e?e:new l}function Ft(t,e,n){this.a=void 0!==t?t:new l,this.b=void 0!==e?e:new l,this.c=void 0!==n?n:new l}function kt(t,e){lt.call(this),this.type="Mesh",this.geometry=void 0!==t?t:new Pt,this.material=void 0!==e?e:new Nt({color:16777215*Math.random()}),this.drawMode=Va,this.updateMorphTargets()}function zt(t,e){return t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.program&&e.program&&t.program!==e.program?t.program.id-e.program.id:t.material.id!==e.material.id?t.material.id-e.material.id:t.z!==e.z?t.z-e.z:t.id-e.id}function Bt(t,e){return t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.z!==e.z?e.z-t.z:t.id-e.id}function Ht(){function t(t,n){var r=t.id+","+n.id,i=e[r];return void 0===i&&(i=new function(){var t=[],e=0,n=[],r=[];return{opaque:n,transparent:r,init:function(){e=0,n.length=0,r.length=0},push:function(i,o,a,s,u){var c=t[e];void 0===c?(c={id:i.id,object:i,geometry:o,material:a,program:a.program,renderOrder:i.renderOrder,z:s,group:u},t[e]=c):(c.id=i.id,c.object=i,c.geometry=o,c.material=a,c.program=a.program,c.renderOrder=i.renderOrder,c.z=s,c.group=u),(!0===a.transparent?r:n).push(c),e++},sort:function(){n.length>1&&n.sort(zt),r.length>1&&r.sort(Bt)}}},e[r]=i),i}var e={};return{get:t,dispose:function(){e={}}}}function Gt(t,e){return Math.abs(e[1])-Math.abs(t[1])}function jt(){var t=new function(){var t={};return{get:function(e){if(void 0!==t[e.id])return t[e.id];var n;switch(e.type){case"DirectionalLight":n={direction:new l,color:new q,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new i};break;case"SpotLight":n={position:new l,direction:new l,color:new q,distance:0,coneCos:0,penumbraCos:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new i};break;case"PointLight":n={position:new l,color:new q,distance:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new i,shadowCameraNear:1,shadowCameraFar:1e3};break;case"HemisphereLight":n={direction:new l,skyColor:new q,groundColor:new q};break;case"RectAreaLight":n={color:new q,position:new l,halfWidth:new l,halfHeight:new l}}return t[e.id]=n,n}}},e={hash:"",ambient:[0,0,0],directional:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotShadowMap:[],spotShadowMatrix:[],rectArea:[],point:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[]},n=new l,r=new h,o=new h;return{setup:function(i,a,s){for(var u=0,c=0,l=0,h=0,p=0,d=0,f=0,m=0,v=s.matrixWorldInverse,g=0,y=i.length;g<y;g++){var _=i[g],b=_.color,x=_.intensity,w=_.distance,E=_.shadow&&_.shadow.map?_.shadow.map.texture:null;if(_.isAmbientLight)u+=b.r*x,c+=b.g*x,l+=b.b*x;else if(_.isDirectionalLight)(T=t.get(_)).color.copy(_.color).multiplyScalar(_.intensity),T.direction.setFromMatrixPosition(_.matrixWorld),n.setFromMatrixPosition(_.target.matrixWorld),T.direction.sub(n),T.direction.transformDirection(v),T.shadow=_.castShadow,_.castShadow&&(M=_.shadow,T.shadowBias=M.bias,T.shadowRadius=M.radius,T.shadowMapSize=M.mapSize),e.directionalShadowMap[h]=E,e.directionalShadowMatrix[h]=_.shadow.matrix,e.directional[h]=T,h++;else if(_.isSpotLight)(T=t.get(_)).position.setFromMatrixPosition(_.matrixWorld),T.position.applyMatrix4(v),T.color.copy(b).multiplyScalar(x),T.distance=w,T.direction.setFromMatrixPosition(_.matrixWorld),n.setFromMatrixPosition(_.target.matrixWorld),T.direction.sub(n),T.direction.transformDirection(v),T.coneCos=Math.cos(_.angle),T.penumbraCos=Math.cos(_.angle*(1-_.penumbra)),T.decay=0===_.distance?0:_.decay,T.shadow=_.castShadow,_.castShadow&&(M=_.shadow,T.shadowBias=M.bias,T.shadowRadius=M.radius,T.shadowMapSize=M.mapSize),e.spotShadowMap[d]=E,e.spotShadowMatrix[d]=_.shadow.matrix,e.spot[d]=T,d++;else if(_.isRectAreaLight)(T=t.get(_)).color.copy(b).multiplyScalar(x/(_.width*_.height)),T.position.setFromMatrixPosition(_.matrixWorld),T.position.applyMatrix4(v),o.identity(),r.copy(_.matrixWorld),r.premultiply(v),o.extractRotation(r),T.halfWidth.set(.5*_.width,0,0),T.halfHeight.set(0,.5*_.height,0),T.halfWidth.applyMatrix4(o),T.halfHeight.applyMatrix4(o),e.rectArea[f]=T,f++;else if(_.isPointLight){if((T=t.get(_)).position.setFromMatrixPosition(_.matrixWorld),T.position.applyMatrix4(v),T.color.copy(_.color).multiplyScalar(_.intensity),T.distance=_.distance,T.decay=0===_.distance?0:_.decay,T.shadow=_.castShadow,_.castShadow){var M=_.shadow;T.shadowBias=M.bias,T.shadowRadius=M.radius,T.shadowMapSize=M.mapSize,T.shadowCameraNear=M.camera.near,T.shadowCameraFar=M.camera.far}e.pointShadowMap[p]=E,e.pointShadowMatrix[p]=_.shadow.matrix,e.point[p]=T,p++}else if(_.isHemisphereLight){var T=t.get(_);T.direction.setFromMatrixPosition(_.matrixWorld),T.direction.transformDirection(v),T.direction.normalize(),T.skyColor.copy(_.color).multiplyScalar(x),T.groundColor.copy(_.groundColor).multiplyScalar(x),e.hemi[m]=T,m++}}e.ambient[0]=u,e.ambient[1]=c,e.ambient[2]=l,e.directional.length=h,e.spot.length=d,e.rectArea.length=f,e.point.length=p,e.hemi.length=m,e.hash=h+","+p+","+d+","+f+","+m+","+a.length},state:e}}function Vt(t,e,n){var r=t.createShader(e);return t.shaderSource(r,n),t.compileShader(r),!1===t.getShaderParameter(r,t.COMPILE_STATUS)&&console.error("THREE.WebGLShader: Shader couldn't compile."),""!==t.getShaderInfoLog(r)&&console.warn("THREE.WebGLShader: gl.getShaderInfoLog()",e===t.VERTEX_SHADER?"vertex":"fragment",t.getShaderInfoLog(r),function(t){for(var e=t.split("\n"),n=0;n<e.length;n++)e[n]=n+1+": "+e[n];return e.join("\n")}(n)),r}function Wt(t){switch(t){case Xa:return["Linear","( value )"];case Ya:return["sRGB","( value )"];case Za:return["RGBE","( value )"];case Qa:return["RGBM","( value, 7.0 )"];case $a:return["RGBM","( value, 16.0 )"];case ts:return["RGBD","( value, 256.0 )"];case Ka:return["Gamma","( value, float( GAMMA_FACTOR ) )"];default:throw new Error("unsupported encoding: "+t)}}function qt(t,e){var n=Wt(e);return"vec4 "+t+"( vec4 value ) { return "+n[0]+"ToLinear"+n[1]+"; }"}function Xt(t){return""!==t}function Yt(t,e){return t.replace(/NUM_DIR_LIGHTS/g,e.numDirLights).replace(/NUM_SPOT_LIGHTS/g,e.numSpotLights).replace(/NUM_RECT_AREA_LIGHTS/g,e.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,e.numPointLights).replace(/NUM_HEMI_LIGHTS/g,e.numHemiLights)}function Kt(t){return t.replace(/^[ \t]*#include +<([\w\d.]+)>/gm,function(t,e){var n=ms[e];if(void 0===n)throw new Error("Can not resolve #include <"+e+">");return Kt(n)})}function Zt(t){return t.replace(/for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}/g,function(t,e,n,r){for(var i="",o=parseInt(e);o<parseInt(n);o++)i+=r.replace(/\[ i \]/g,"[ "+o+" ]");return i})}function Jt(t,e,n,r,i,o){var a=t.context,s=r.defines,u=i.vertexShader,c=i.fragmentShader,l="SHADOWMAP_TYPE_BASIC";o.shadowMapType===Yi?l="SHADOWMAP_TYPE_PCF":o.shadowMapType===Ki&&(l="SHADOWMAP_TYPE_PCF_SOFT");var h="ENVMAP_TYPE_CUBE",p="ENVMAP_MODE_REFLECTION",d="ENVMAP_BLENDING_MULTIPLY";if(o.envMap){switch(r.envMap.mapping){case Vo:case Wo:h="ENVMAP_TYPE_CUBE";break;case Ko:case Zo:h="ENVMAP_TYPE_CUBE_UV";break;case qo:case Xo:h="ENVMAP_TYPE_EQUIREC";break;case Yo:h="ENVMAP_TYPE_SPHERE"}switch(r.envMap.mapping){case Wo:case Xo:p="ENVMAP_MODE_REFRACTION"}switch(r.combine){case Do:d="ENVMAP_BLENDING_MULTIPLY";break;case Uo:d="ENVMAP_BLENDING_MIX";break;case Fo:d="ENVMAP_BLENDING_ADD"}}var f,m,v=t.gammaFactor>0?t.gammaFactor:1,g=function(t,e,n){return[(t=t||{}).derivatives||e.envMapCubeUV||e.bumpMap||e.normalMap||e.flatShading?"#extension GL_OES_standard_derivatives : enable":"",(t.fragDepth||e.logarithmicDepthBuffer)&&n.get("EXT_frag_depth")?"#extension GL_EXT_frag_depth : enable":"",t.drawBuffers&&n.get("WEBGL_draw_buffers")?"#extension GL_EXT_draw_buffers : require":"",(t.shaderTextureLOD||e.envMap)&&n.get("EXT_shader_texture_lod")?"#extension GL_EXT_shader_texture_lod : enable":""].filter(Xt).join("\n")}(r.extensions,o,e),y=function(t){var e=[];for(var n in t){var r=t[n];!1!==r&&e.push("#define "+n+" "+r)}return e.join("\n")}(s),_=a.createProgram();r.isRawShaderMaterial?(f=[y,"\n"].filter(Xt).join("\n"),m=[g,y,"\n"].filter(Xt).join("\n")):(f=["precision "+o.precision+" float;","precision "+o.precision+" int;","#define SHADER_NAME "+i.name,y,o.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define GAMMA_FACTOR "+v,"#define MAX_BONES "+o.maxBones,o.useFog&&o.fog?"#define USE_FOG":"",o.useFog&&o.fogExp?"#define FOG_EXP2":"",o.map?"#define USE_MAP":"",o.envMap?"#define USE_ENVMAP":"",o.envMap?"#define "+p:"",o.lightMap?"#define USE_LIGHTMAP":"",o.aoMap?"#define USE_AOMAP":"",o.emissiveMap?"#define USE_EMISSIVEMAP":"",o.bumpMap?"#define USE_BUMPMAP":"",o.normalMap?"#define USE_NORMALMAP":"",o.displacementMap&&o.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",o.specularMap?"#define USE_SPECULARMAP":"",o.roughnessMap?"#define USE_ROUGHNESSMAP":"",o.metalnessMap?"#define USE_METALNESSMAP":"",o.alphaMap?"#define USE_ALPHAMAP":"",o.vertexColors?"#define USE_COLOR":"",o.flatShading?"#define FLAT_SHADED":"",o.skinning?"#define USE_SKINNING":"",o.useVertexTexture?"#define BONE_TEXTURE":"",o.morphTargets?"#define USE_MORPHTARGETS":"",o.morphNormals&&!1===o.flatShading?"#define USE_MORPHNORMALS":"",o.doubleSided?"#define DOUBLE_SIDED":"",o.flipSided?"#define FLIP_SIDED":"","#define NUM_CLIPPING_PLANES "+o.numClippingPlanes,o.shadowMapEnabled?"#define USE_SHADOWMAP":"",o.shadowMapEnabled?"#define "+l:"",o.sizeAttenuation?"#define USE_SIZEATTENUATION":"",o.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",o.logarithmicDepthBuffer&&e.get("EXT_frag_depth")?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_COLOR","\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(Xt).join("\n"),m=[g,"precision "+o.precision+" float;","precision "+o.precision+" int;","#define SHADER_NAME "+i.name,y,o.alphaTest?"#define ALPHATEST "+o.alphaTest:"","#define GAMMA_FACTOR "+v,o.useFog&&o.fog?"#define USE_FOG":"",o.useFog&&o.fogExp?"#define FOG_EXP2":"",o.map?"#define USE_MAP":"",o.envMap?"#define USE_ENVMAP":"",o.envMap?"#define "+h:"",o.envMap?"#define "+p:"",o.envMap?"#define "+d:"",o.lightMap?"#define USE_LIGHTMAP":"",o.aoMap?"#define USE_AOMAP":"",o.emissiveMap?"#define USE_EMISSIVEMAP":"",o.bumpMap?"#define USE_BUMPMAP":"",o.normalMap?"#define USE_NORMALMAP":"",o.specularMap?"#define USE_SPECULARMAP":"",o.roughnessMap?"#define USE_ROUGHNESSMAP":"",o.metalnessMap?"#define USE_METALNESSMAP":"",o.alphaMap?"#define USE_ALPHAMAP":"",o.vertexColors?"#define USE_COLOR":"",o.gradientMap?"#define USE_GRADIENTMAP":"",o.flatShading?"#define FLAT_SHADED":"",o.doubleSided?"#define DOUBLE_SIDED":"",o.flipSided?"#define FLIP_SIDED":"","#define NUM_CLIPPING_PLANES "+o.numClippingPlanes,"#define UNION_CLIPPING_PLANES "+(o.numClippingPlanes-o.numClipIntersection),o.shadowMapEnabled?"#define USE_SHADOWMAP":"",o.shadowMapEnabled?"#define "+l:"",o.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",o.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",o.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",o.logarithmicDepthBuffer&&e.get("EXT_frag_depth")?"#define USE_LOGDEPTHBUF_EXT":"",o.envMap&&e.get("EXT_shader_texture_lod")?"#define TEXTURE_LOD_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;",o.toneMapping!==ko?"#define TONE_MAPPING":"",o.toneMapping!==ko?ms.tonemapping_pars_fragment:"",o.toneMapping!==ko?function(t,e){var n;switch(e){case zo:n="Linear";break;case Bo:n="Reinhard";break;case Ho:n="Uncharted2";break;case Go:n="OptimizedCineon";break;default:throw new Error("unsupported toneMapping: "+e)}return"vec3 "+t+"( vec3 color ) { return "+n+"ToneMapping( color ); }"}("toneMapping",o.toneMapping):"",o.dithering?"#define DITHERING":"",o.outputEncoding||o.mapEncoding||o.envMapEncoding||o.emissiveMapEncoding?ms.encodings_pars_fragment:"",o.mapEncoding?qt("mapTexelToLinear",o.mapEncoding):"",o.envMapEncoding?qt("envMapTexelToLinear",o.envMapEncoding):"",o.emissiveMapEncoding?qt("emissiveMapTexelToLinear",o.emissiveMapEncoding):"",o.outputEncoding?function(t,e){var n=Wt(e);return"vec4 "+t+"( vec4 value ) { return LinearTo"+n[0]+n[1]+"; }"}("linearToOutputTexel",o.outputEncoding):"",o.depthPacking?"#define DEPTH_PACKING "+r.depthPacking:"","\n"].filter(Xt).join("\n")),u=Yt(u=Kt(u),o),c=Yt(c=Kt(c),o),r.isShaderMaterial||(u=Zt(u),c=Zt(c));var b=f+u,x=m+c,w=Vt(a,a.VERTEX_SHADER,b),E=Vt(a,a.FRAGMENT_SHADER,x);a.attachShader(_,w),a.attachShader(_,E),void 0!==r.index0AttributeName?a.bindAttribLocation(_,0,r.index0AttributeName):!0===o.morphTargets&&a.bindAttribLocation(_,0,"position"),a.linkProgram(_);var M=a.getProgramInfoLog(_),T=a.getShaderInfoLog(w),S=a.getShaderInfoLog(E),C=!0,A=!0;!1===a.getProgramParameter(_,a.LINK_STATUS)?(C=!1,console.error("THREE.WebGLProgram: shader error: ",a.getError(),"gl.VALIDATE_STATUS",a.getProgramParameter(_,a.VALIDATE_STATUS),"gl.getProgramInfoLog",M,T,S)):""!==M?console.warn("THREE.WebGLProgram: gl.getProgramInfoLog()",M):""!==T&&""!==S||(A=!1),A&&(this.diagnostics={runnable:C,material:r,programLog:M,vertexShader:{log:T,prefix:f},fragmentShader:{log:S,prefix:m}}),a.deleteShader(w),a.deleteShader(E);var P;this.getUniforms=function(){return void 0===P&&(P=new W(a,_,t)),P};var R;return this.getAttributes=function(){return void 0===R&&(R=function(t,e,n){for(var r={},i=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES),o=0;o<i;o++){var a=t.getActiveAttrib(e,o).name;r[a]=t.getAttribLocation(e,a)}return r}(a,_)),R},this.destroy=function(){a.deleteProgram(_),this.program=void 0},Object.defineProperties(this,{uniforms:{get:function(){return console.warn("THREE.WebGLProgram: .uniforms is now .getUniforms()."),this.getUniforms()}},attributes:{get:function(){return console.warn("THREE.WebGLProgram: .attributes is now .getAttributes()."),this.getAttributes()}}}),this.id=bs++,this.code=n,this.usedTimes=1,this.program=_,this.vertexShader=w,this.fragmentShader=E,this}function Qt(t,e,n){function r(t,e){var n;return t?t.isTexture?n=t.encoding:t.isWebGLRenderTarget&&(console.warn("THREE.WebGLPrograms.getTextureEncodingFromMap: don't use render targets as textures. Use their .texture property instead."),n=t.texture.encoding):n=Xa,n===Xa&&e&&(n=Ka),n}var i=[],o={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"phong",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow"},a=["precision","supportsVertexTextures","map","mapEncoding","envMap","envMapMode","envMapEncoding","lightMap","aoMap","emissiveMap","emissiveMapEncoding","bumpMap","normalMap","displacementMap","specularMap","roughnessMap","metalnessMap","gradientMap","alphaMap","combine","vertexColors","fog","useFog","fogExp","flatShading","sizeAttenuation","logarithmicDepthBuffer","skinning","maxBones","useVertexTexture","morphTargets","morphNormals","maxMorphTargets","maxMorphNormals","premultipliedAlpha","numDirLights","numPointLights","numSpotLights","numHemiLights","numRectAreaLights","shadowMapEnabled","shadowMapType","toneMapping","physicallyCorrectLights","alphaTest","doubleSided","flipSided","numClippingPlanes","numClipIntersection","depthPacking","dithering"];this.getParameters=function(e,i,a,s,u,c,l){var h=o[e.type],p=l.isSkinnedMesh?function(t){var e=t.skeleton.bones;if(n.floatVertexTextures)return 1024;var r=n.maxVertexUniforms,i=Math.floor((r-20)/4),o=Math.min(i,e.length);return o<e.length?(console.warn("THREE.WebGLRenderer: Skeleton has "+e.length+" bones. This GPU supports "+o+"."),0):o}(l):0,d=n.precision;null!==e.precision&&(d=n.getMaxPrecision(e.precision))!==e.precision&&console.warn("THREE.WebGLProgram.getParameters:",e.precision,"not supported, using",d,"instead.");var f=t.getRenderTarget();return{shaderID:h,precision:d,supportsVertexTextures:n.vertexTextures,outputEncoding:r(f?f.texture:null,t.gammaOutput),map:!!e.map,mapEncoding:r(e.map,t.gammaInput),envMap:!!e.envMap,envMapMode:e.envMap&&e.envMap.mapping,envMapEncoding:r(e.envMap,t.gammaInput),envMapCubeUV:!!e.envMap&&(e.envMap.mapping===Ko||e.envMap.mapping===Zo),lightMap:!!e.lightMap,aoMap:!!e.aoMap,emissiveMap:!!e.emissiveMap,emissiveMapEncoding:r(e.emissiveMap,t.gammaInput),bumpMap:!!e.bumpMap,normalMap:!!e.normalMap,displacementMap:!!e.displacementMap,roughnessMap:!!e.roughnessMap,metalnessMap:!!e.metalnessMap,specularMap:!!e.specularMap,alphaMap:!!e.alphaMap,gradientMap:!!e.gradientMap,combine:e.combine,vertexColors:e.vertexColors,fog:!!s,useFog:e.fog,fogExp:s&&s.isFogExp2,flatShading:e.flatShading,sizeAttenuation:e.sizeAttenuation,logarithmicDepthBuffer:n.logarithmicDepthBuffer,skinning:e.skinning&&p>0,maxBones:p,useVertexTexture:n.floatVertexTextures,morphTargets:e.morphTargets,morphNormals:e.morphNormals,maxMorphTargets:t.maxMorphTargets,maxMorphNormals:t.maxMorphNormals,numDirLights:i.directional.length,numPointLights:i.point.length,numSpotLights:i.spot.length,numRectAreaLights:i.rectArea.length,numHemiLights:i.hemi.length,numClippingPlanes:u,numClipIntersection:c,dithering:e.dithering,shadowMapEnabled:t.shadowMap.enabled&&l.receiveShadow&&a.length>0,shadowMapType:t.shadowMap.type,toneMapping:t.toneMapping,physicallyCorrectLights:t.physicallyCorrectLights,premultipliedAlpha:e.premultipliedAlpha,alphaTest:e.alphaTest,doubleSided:e.side===Qi,flipSided:e.side===Ji,depthPacking:void 0!==e.depthPacking&&e.depthPacking}},this.getProgramCode=function(e,n){var r=[];if(n.shaderID?r.push(n.shaderID):(r.push(e.fragmentShader),r.push(e.vertexShader)),void 0!==e.defines)for(var i in e.defines)r.push(i),r.push(e.defines[i]);for(var o=0;o<a.length;o++)r.push(n[a[o]]);return r.push(e.onBeforeCompile.toString()),r.push(t.gammaOutput),r.join()},this.acquireProgram=function(n,r,o,a){for(var s,u=0,c=i.length;u<c;u++){var l=i[u];if(l.code===a){++(s=l).usedTimes;break}}return void 0===s&&(s=new Jt(t,e,a,n,r,o),i.push(s)),s},this.releaseProgram=function(t){if(0==--t.usedTimes){var e=i.indexOf(t);i[e]=i[i.length-1],i.pop(),t.destroy()}},this.programs=i}function $t(t,e,n,r,i,o,a){function s(t,e){if(t.width>e||t.height>e){var n=e/Math.max(t.width,t.height),r=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");r.width=Math.floor(t.width*n),r.height=Math.floor(t.height*n);return r.getContext("2d").drawImage(t,0,0,t.width,t.height,0,0,r.width,r.height),console.warn("THREE.WebGLRenderer: image is too big ("+t.width+"x"+t.height+"). Resized to "+r.width+"x"+r.height,t),r}return t}function u(t){return rs.isPowerOfTwo(t.width)&&rs.isPowerOfTwo(t.height)}function c(t,e){return t.generateMipmaps&&e&&t.minFilter!==ta&&t.minFilter!==ra}function l(e){return e===ta||e===ea||e===na?t.NEAREST:t.LINEAR}function h(e){var n=e.target;n.removeEventListener("dispose",h),function(e){var n=r.get(e);if(e.image&&n.__image__webglTextureCube)t.deleteTexture(n.__image__webglTextureCube);else{if(void 0===n.__webglInit)return;t.deleteTexture(n.__webglTexture)}r.remove(e)}(n),a.textures--}function p(e){var n=e.target;n.removeEventListener("dispose",p),function(e){var n=r.get(e),i=r.get(e.texture);if(!e)return;void 0!==i.__webglTexture&&t.deleteTexture(i.__webglTexture);e.depthTexture&&e.depthTexture.dispose();if(e.isWebGLRenderTargetCube)for(var o=0;o<6;o++)t.deleteFramebuffer(n.__webglFramebuffer[o]),n.__webglDepthbuffer&&t.deleteRenderbuffer(n.__webglDepthbuffer[o]);else t.deleteFramebuffer(n.__webglFramebuffer),n.__webglDepthbuffer&&t.deleteRenderbuffer(n.__webglDepthbuffer);r.remove(e.texture),r.remove(e)}(n),a.textures--}function d(e,l){var p=r.get(e);if(e.version>0&&p.__version!==e.version){var d=e.image;if(void 0===d)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined",e);else{if(!1!==d.complete)return void function(e,r,l){void 0===e.__webglInit&&(e.__webglInit=!0,r.addEventListener("dispose",h),e.__webglTexture=t.createTexture(),a.textures++);n.activeTexture(t.TEXTURE0+l),n.bindTexture(t.TEXTURE_2D,e.__webglTexture),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,r.flipY),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.premultiplyAlpha),t.pixelStorei(t.UNPACK_ALIGNMENT,r.unpackAlignment);var p=s(r.image,i.maxTextureSize);(function(t){return t.wrapS!==Qo||t.wrapT!==Qo||t.minFilter!==ta&&t.minFilter!==ra})(r)&&!1===u(p)&&(p=function(t){if(t instanceof HTMLImageElement||t instanceof HTMLCanvasElement){var e=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");return e.width=rs.nearestPowerOfTwo(t.width),e.height=rs.nearestPowerOfTwo(t.height),e.getContext("2d").drawImage(t,0,0,e.width,e.height),console.warn("THREE.WebGLRenderer: image is not power of two ("+t.width+"x"+t.height+"). Resized to "+e.width+"x"+e.height,t),e}return t}(p));var d=u(p),m=o.convert(r.format),v=o.convert(r.type);f(t.TEXTURE_2D,r,d);var g,_=r.mipmaps;if(r.isDepthTexture){var b=t.DEPTH_COMPONENT;if(r.type===pa){if(!y)throw new Error("Float Depth Texture only supported in WebGL2.0");b=t.DEPTH_COMPONENT32F}else y&&(b=t.DEPTH_COMPONENT16);r.format===Ma&&b===t.DEPTH_COMPONENT&&r.type!==ca&&r.type!==ha&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),r.type=ca,v=o.convert(r.type)),r.format===Ta&&(b=t.DEPTH_STENCIL,r.type!==ga&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),r.type=ga,v=o.convert(r.type))),n.texImage2D(t.TEXTURE_2D,0,b,p.width,p.height,0,m,v,null)}else if(r.isDataTexture)if(_.length>0&&d){for(var x=0,w=_.length;x<w;x++)g=_[x],n.texImage2D(t.TEXTURE_2D,x,m,g.width,g.height,0,m,v,g.data);r.generateMipmaps=!1}else n.texImage2D(t.TEXTURE_2D,0,m,p.width,p.height,0,m,v,p.data);else if(r.isCompressedTexture)for(var x=0,w=_.length;x<w;x++)g=_[x],r.format!==ba&&r.format!==_a?n.getCompressedTextureFormats().indexOf(m)>-1?n.compressedTexImage2D(t.TEXTURE_2D,x,m,g.width,g.height,0,g.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):n.texImage2D(t.TEXTURE_2D,x,m,g.width,g.height,0,m,v,g.data);else if(_.length>0&&d){for(var x=0,w=_.length;x<w;x++)g=_[x],n.texImage2D(t.TEXTURE_2D,x,m,m,v,g);r.generateMipmaps=!1}else n.texImage2D(t.TEXTURE_2D,0,m,m,v,p);c(r,d)&&t.generateMipmap(t.TEXTURE_2D);e.__version=r.version,r.onUpdate&&r.onUpdate(r)}(p,e,l);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete",e)}}n.activeTexture(t.TEXTURE0+l),n.bindTexture(t.TEXTURE_2D,p.__webglTexture)}function f(n,a,s){var u;if(s?(t.texParameteri(n,t.TEXTURE_WRAP_S,o.convert(a.wrapS)),t.texParameteri(n,t.TEXTURE_WRAP_T,o.convert(a.wrapT)),t.texParameteri(n,t.TEXTURE_MAG_FILTER,o.convert(a.magFilter)),t.texParameteri(n,t.TEXTURE_MIN_FILTER,o.convert(a.minFilter))):(t.texParameteri(n,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(n,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),a.wrapS===Qo&&a.wrapT===Qo||console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping.",a),t.texParameteri(n,t.TEXTURE_MAG_FILTER,l(a.magFilter)),t.texParameteri(n,t.TEXTURE_MIN_FILTER,l(a.minFilter)),a.minFilter!==ta&&a.minFilter!==ra&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.",a)),u=e.get("EXT_texture_filter_anisotropic")){if(a.type===pa&&null===e.get("OES_texture_float_linear"))return;if(a.type===da&&null===e.get("OES_texture_half_float_linear"))return;(a.anisotropy>1||r.get(a).__currentAnisotropy)&&(t.texParameterf(n,u.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(a.anisotropy,i.getMaxAnisotropy())),r.get(a).__currentAnisotropy=a.anisotropy)}}function m(e,i,a,s){var u=o.convert(i.texture.format),c=o.convert(i.texture.type);n.texImage2D(s,0,u,i.width,i.height,0,u,c,null),t.bindFramebuffer(t.FRAMEBUFFER,e),t.framebufferTexture2D(t.FRAMEBUFFER,a,s,r.get(i.texture).__webglTexture,0),t.bindFramebuffer(t.FRAMEBUFFER,null)}function v(e,n){t.bindRenderbuffer(t.RENDERBUFFER,e),n.depthBuffer&&!n.stencilBuffer?(t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_COMPONENT16,n.width,n.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.RENDERBUFFER,e)):n.depthBuffer&&n.stencilBuffer?(t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_STENCIL,n.width,n.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.RENDERBUFFER,e)):t.renderbufferStorage(t.RENDERBUFFER,t.RGBA4,n.width,n.height),t.bindRenderbuffer(t.RENDERBUFFER,null)}function g(e){var n=r.get(e),i=!0===e.isWebGLRenderTargetCube;if(e.depthTexture){if(i)throw new Error("target.depthTexture not supported in Cube render targets");!function(e,n){if(n&&n.isWebGLRenderTargetCube)throw new Error("Depth Texture with cube render targets is not supported");if(t.bindFramebuffer(t.FRAMEBUFFER,e),!n.depthTexture||!n.depthTexture.isDepthTexture)throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");r.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),d(n.depthTexture,0);var i=r.get(n.depthTexture).__webglTexture;if(n.depthTexture.format===Ma)t.framebufferTexture2D(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.TEXTURE_2D,i,0);else{if(n.depthTexture.format!==Ta)throw new Error("Unknown depthTexture format");t.framebufferTexture2D(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.TEXTURE_2D,i,0)}}(n.__webglFramebuffer,e)}else if(i){n.__webglDepthbuffer=[];for(var o=0;o<6;o++)t.bindFramebuffer(t.FRAMEBUFFER,n.__webglFramebuffer[o]),n.__webglDepthbuffer[o]=t.createRenderbuffer(),v(n.__webglDepthbuffer[o],e)}else t.bindFramebuffer(t.FRAMEBUFFER,n.__webglFramebuffer),n.__webglDepthbuffer=t.createRenderbuffer(),v(n.__webglDepthbuffer,e);t.bindFramebuffer(t.FRAMEBUFFER,null)}var y="undefined"!=typeof WebGL2RenderingContext&&t instanceof WebGL2RenderingContext;this.setTexture2D=d,this.setTextureCube=function(e,l){var p=r.get(e);if(6===e.image.length)if(e.version>0&&p.__version!==e.version){p.__image__webglTextureCube||(e.addEventListener("dispose",h),p.__image__webglTextureCube=t.createTexture(),a.textures++),n.activeTexture(t.TEXTURE0+l),n.bindTexture(t.TEXTURE_CUBE_MAP,p.__image__webglTextureCube),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,e.flipY);for(var d=e&&e.isCompressedTexture,m=e.image[0]&&e.image[0].isDataTexture,v=[],g=0;g<6;g++)v[g]=d||m?m?e.image[g].image:e.image[g]:s(e.image[g],i.maxCubemapSize);var y=u(v[0]),_=o.convert(e.format),b=o.convert(e.type);for(f(t.TEXTURE_CUBE_MAP,e,y),g=0;g<6;g++)if(d)for(var x,w=v[g].mipmaps,E=0,M=w.length;E<M;E++)x=w[E],e.format!==ba&&e.format!==_a?n.getCompressedTextureFormats().indexOf(_)>-1?n.compressedTexImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+g,E,_,x.width,x.height,0,x.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+g,E,_,x.width,x.height,0,_,b,x.data);else m?n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+g,0,_,v[g].width,v[g].height,0,_,b,v[g].data):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+g,0,_,_,b,v[g]);c(e,y)&&t.generateMipmap(t.TEXTURE_CUBE_MAP),p.__version=e.version,e.onUpdate&&e.onUpdate(e)}else n.activeTexture(t.TEXTURE0+l),n.bindTexture(t.TEXTURE_CUBE_MAP,p.__image__webglTextureCube)},this.setTextureCubeDynamic=function(e,i){n.activeTexture(t.TEXTURE0+i),n.bindTexture(t.TEXTURE_CUBE_MAP,r.get(e).__webglTexture)},this.setupRenderTarget=function(e){var i=r.get(e),o=r.get(e.texture);e.addEventListener("dispose",p),o.__webglTexture=t.createTexture(),a.textures++;var s=!0===e.isWebGLRenderTargetCube,l=u(e);if(s)for(i.__webglFramebuffer=[],h=0;h<6;h++)i.__webglFramebuffer[h]=t.createFramebuffer();else i.__webglFramebuffer=t.createFramebuffer();if(s){n.bindTexture(t.TEXTURE_CUBE_MAP,o.__webglTexture),f(t.TEXTURE_CUBE_MAP,e.texture,l);for(var h=0;h<6;h++)m(i.__webglFramebuffer[h],e,t.COLOR_ATTACHMENT0,t.TEXTURE_CUBE_MAP_POSITIVE_X+h);c(e.texture,l)&&t.generateMipmap(t.TEXTURE_CUBE_MAP),n.bindTexture(t.TEXTURE_CUBE_MAP,null)}else n.bindTexture(t.TEXTURE_2D,o.__webglTexture),f(t.TEXTURE_2D,e.texture,l),m(i.__webglFramebuffer,e,t.COLOR_ATTACHMENT0,t.TEXTURE_2D),c(e.texture,l)&&t.generateMipmap(t.TEXTURE_2D),n.bindTexture(t.TEXTURE_2D,null);e.depthBuffer&&g(e)},this.updateRenderTargetMipmap=function(e){var i=e.texture;if(c(i,u(e))){var o=e.isWebGLRenderTargetCube?t.TEXTURE_CUBE_MAP:t.TEXTURE_2D,a=r.get(i).__webglTexture;n.bindTexture(o,a),t.generateMipmap(o),n.bindTexture(o,null)}}}function te(t){dt.call(this),this.cameras=t||[]}function ee(t,e){return{convert:function(n){var r;if(n===Jo)return t.REPEAT;if(n===Qo)return t.CLAMP_TO_EDGE;if(n===$o)return t.MIRRORED_REPEAT;if(n===ta)return t.NEAREST;if(n===ea)return t.NEAREST_MIPMAP_NEAREST;if(n===na)return t.NEAREST_MIPMAP_LINEAR;if(n===ra)return t.LINEAR;if(n===ia)return t.LINEAR_MIPMAP_NEAREST;if(n===oa)return t.LINEAR_MIPMAP_LINEAR;if(n===aa)return t.UNSIGNED_BYTE;if(n===fa)return t.UNSIGNED_SHORT_4_4_4_4;if(n===ma)return t.UNSIGNED_SHORT_5_5_5_1;if(n===va)return t.UNSIGNED_SHORT_5_6_5;if(n===sa)return t.BYTE;if(n===ua)return t.SHORT;if(n===ca)return t.UNSIGNED_SHORT;if(n===la)return t.INT;if(n===ha)return t.UNSIGNED_INT;if(n===pa)return t.FLOAT;if(n===da&&null!==(r=e.get("OES_texture_half_float")))return r.HALF_FLOAT_OES;if(n===ya)return t.ALPHA;if(n===_a)return t.RGB;if(n===ba)return t.RGBA;if(n===xa)return t.LUMINANCE;if(n===wa)return t.LUMINANCE_ALPHA;if(n===Ma)return t.DEPTH_COMPONENT;if(n===Ta)return t.DEPTH_STENCIL;if(n===lo)return t.FUNC_ADD;if(n===ho)return t.FUNC_SUBTRACT;if(n===po)return t.FUNC_REVERSE_SUBTRACT;if(n===vo)return t.ZERO;if(n===go)return t.ONE;if(n===yo)return t.SRC_COLOR;if(n===_o)return t.ONE_MINUS_SRC_COLOR;if(n===bo)return t.SRC_ALPHA;if(n===xo)return t.ONE_MINUS_SRC_ALPHA;if(n===wo)return t.DST_ALPHA;if(n===Eo)return t.ONE_MINUS_DST_ALPHA;if(n===Mo)return t.DST_COLOR;if(n===To)return t.ONE_MINUS_DST_COLOR;if(n===So)return t.SRC_ALPHA_SATURATE;if((n===Sa||n===Ca||n===Aa||n===Pa)&&null!==(r=e.get("WEBGL_compressed_texture_s3tc"))){if(n===Sa)return r.COMPRESSED_RGB_S3TC_DXT1_EXT;if(n===Ca)return r.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(n===Aa)return r.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(n===Pa)return r.COMPRESSED_RGBA_S3TC_DXT5_EXT}if((n===Ra||n===La||n===Ia||n===Oa)&&null!==(r=e.get("WEBGL_compressed_texture_pvrtc"))){if(n===Ra)return r.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(n===La)return r.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(n===Ia)return r.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(n===Oa)return r.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(n===Na&&null!==(r=e.get("WEBGL_compressed_texture_etc1")))return r.COMPRESSED_RGB_ETC1_WEBGL;if((n===fo||n===mo)&&null!==(r=e.get("EXT_blend_minmax"))){if(n===fo)return r.MIN_EXT;if(n===mo)return r.MAX_EXT}return n===ga&&null!==(r=e.get("WEBGL_depth_texture"))?r.UNSIGNED_INT_24_8_WEBGL:0}}}function ne(t){function e(){return null===D?J:1}function n(){(_t=new function(t){var e={};return{get:function(n){if(void 0!==e[n])return e[n];var r;switch(n){case"WEBGL_depth_texture":r=t.getExtension("WEBGL_depth_texture")||t.getExtension("MOZ_WEBGL_depth_texture")||t.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":r=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":r=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":r=t.getExtension("WEBGL_compressed_texture_pvrtc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;case"WEBGL_compressed_texture_etc1":r=t.getExtension("WEBGL_compressed_texture_etc1");break;default:r=t.getExtension(n)}return null===r&&console.warn("THREE.WebGLRenderer: "+n+" extension not supported."),e[n]=r,r}}}(gt)).get("WEBGL_depth_texture"),_t.get("OES_texture_float"),_t.get("OES_texture_float_linear"),_t.get("OES_texture_half_float"),_t.get("OES_texture_half_float_linear"),_t.get("OES_standard_derivatives"),_t.get("ANGLE_instanced_arrays"),_t.get("OES_element_index_uint")&&(Pt.MaxIndex=4294967296),Xt=new ee(gt,_t),bt=new function(t,e,n){function r(e){if("highp"===e){if(t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.HIGH_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT).precision>0)return"highp";e="mediump"}return"mediump"===e&&t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.MEDIUM_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}var i,o=void 0!==n.precision?n.precision:"highp",a=r(o);a!==o&&(console.warn("THREE.WebGLRenderer:",o,"not supported, using",a,"instead."),o=a);var s=!0===n.logarithmicDepthBuffer&&!!e.get("EXT_frag_depth"),u=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),c=t.getParameter(t.MAX_VERTEX_TEXTURE_IMAGE_UNITS),l=t.getParameter(t.MAX_TEXTURE_SIZE),h=t.getParameter(t.MAX_CUBE_MAP_TEXTURE_SIZE),p=t.getParameter(t.MAX_VERTEX_ATTRIBS),d=t.getParameter(t.MAX_VERTEX_UNIFORM_VECTORS),f=t.getParameter(t.MAX_VARYING_VECTORS),m=t.getParameter(t.MAX_FRAGMENT_UNIFORM_VECTORS),v=c>0,g=!!e.get("OES_texture_float");return{getMaxAnisotropy:function(){if(void 0!==i)return i;var n=e.get("EXT_texture_filter_anisotropic");return i=null!==n?t.getParameter(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT):0},getMaxPrecision:r,precision:o,logarithmicDepthBuffer:s,maxTextures:u,maxVertexTextures:c,maxTextureSize:l,maxCubemapSize:h,maxAttributes:p,maxVertexUniforms:d,maxVaryings:f,maxFragmentUniforms:m,vertexTextures:v,floatFragmentTextures:g,floatVertexTextures:v&&g}}(gt,_t,t),(xt=new function(t,e,n){function r(e,n,r){var i=new Uint8Array(4),o=t.createTexture();t.bindTexture(e,o),t.texParameteri(e,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(e,t.TEXTURE_MAG_FILTER,t.NEAREST);for(var a=0;a<r;a++)t.texImage2D(n+a,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,i);return o}function i(e){!0!==_[e]&&(t.enable(e),_[e]=!0)}function o(e){!1!==_[e]&&(t.disable(e),_[e]=!1)}function s(e,r,a,s,u,c,l,h){if(e!==io?i(t.BLEND):o(t.BLEND),e!==co){if(e!==w||h!==P)switch(e){case ao:h?(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.ONE,t.ONE,t.ONE,t.ONE)):(t.blendEquation(t.FUNC_ADD),t.blendFunc(t.SRC_ALPHA,t.ONE));break;case so:h?(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.ZERO,t.ZERO,t.ONE_MINUS_SRC_COLOR,t.ONE_MINUS_SRC_ALPHA)):(t.blendEquation(t.FUNC_ADD),t.blendFunc(t.ZERO,t.ONE_MINUS_SRC_COLOR));break;case uo:h?(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.ZERO,t.SRC_COLOR,t.ZERO,t.SRC_ALPHA)):(t.blendEquation(t.FUNC_ADD),t.blendFunc(t.ZERO,t.SRC_COLOR));break;default:h?(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.ONE,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA)):(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.SRC_ALPHA,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA))}E=null,M=null,T=null,S=null,C=null,A=null}else u=u||r,c=c||a,l=l||s,r===E&&u===S||(t.blendEquationSeparate(n.convert(r),n.convert(u)),E=r,S=u),a===M&&s===T&&c===C&&l===A||(t.blendFuncSeparate(n.convert(a),n.convert(s),n.convert(c),n.convert(l)),M=a,T=s,C=c,A=l);w=e,P=h}function u(e){R!==e&&(e?t.frontFace(t.CW):t.frontFace(t.CCW),R=e)}function c(e){e!==Hi?(i(t.CULL_FACE),e!==L&&(e===Gi?t.cullFace(t.BACK):e===ji?t.cullFace(t.FRONT):t.cullFace(t.FRONT_AND_BACK))):o(t.CULL_FACE),L=e}function l(e,n,r){e?(i(t.POLYGON_OFFSET_FILL),O===n&&N===r||(t.polygonOffset(n,r),O=n,N=r)):o(t.POLYGON_OFFSET_FILL)}function h(e){void 0===e&&(e=t.TEXTURE0+D-1),k!==e&&(t.activeTexture(e),k=e)}var p=new function(){var e=!1,n=new a,r=null,i=new a(0,0,0,0);return{setMask:function(n){r===n||e||(t.colorMask(n,n,n,n),r=n)},setLocked:function(t){e=t},setClear:function(e,r,o,a,s){!0===s&&(e*=a,r*=a,o*=a),n.set(e,r,o,a),!1===i.equals(n)&&(t.clearColor(e,r,o,a),i.copy(n))},reset:function(){e=!1,r=null,i.set(-1,0,0,0)}}},d=new function(){var e=!1,n=null,r=null,a=null;return{setTest:function(e){e?i(t.DEPTH_TEST):o(t.DEPTH_TEST)},setMask:function(r){n===r||e||(t.depthMask(r),n=r)},setFunc:function(e){if(r!==e){if(e)switch(e){case Co:t.depthFunc(t.NEVER);break;case Ao:t.depthFunc(t.ALWAYS);break;case Po:t.depthFunc(t.LESS);break;case Ro:t.depthFunc(t.LEQUAL);break;case Lo:t.depthFunc(t.EQUAL);break;case Io:t.depthFunc(t.GEQUAL);break;case Oo:t.depthFunc(t.GREATER);break;case No:t.depthFunc(t.NOTEQUAL);break;default:t.depthFunc(t.LEQUAL)}else t.depthFunc(t.LEQUAL);r=e}},setLocked:function(t){e=t},setClear:function(e){a!==e&&(t.clearDepth(e),a=e)},reset:function(){e=!1,n=null,r=null,a=null}}},f=new function(){var e=!1,n=null,r=null,a=null,s=null,u=null,c=null,l=null,h=null;return{setTest:function(e){e?i(t.STENCIL_TEST):o(t.STENCIL_TEST)},setMask:function(r){n===r||e||(t.stencilMask(r),n=r)},setFunc:function(e,n,i){r===e&&a===n&&s===i||(t.stencilFunc(e,n,i),r=e,a=n,s=i)},setOp:function(e,n,r){u===e&&c===n&&l===r||(t.stencilOp(e,n,r),u=e,c=n,l=r)},setLocked:function(t){e=t},setClear:function(e){h!==e&&(t.clearStencil(e),h=e)},reset:function(){e=!1,n=null,r=null,a=null,s=null,u=null,c=null,l=null,h=null}}},m=t.getParameter(t.MAX_VERTEX_ATTRIBS),v=new Uint8Array(m),g=new Uint8Array(m),y=new Uint8Array(m),_={},b=null,x=null,w=null,E=null,M=null,T=null,S=null,C=null,A=null,P=!1,R=null,L=null,I=null,O=null,N=null,D=t.getParameter(t.MAX_COMBINED_TEXTURE_IMAGE_UNITS),U=parseFloat(/^WebGL\ ([0-9])/.exec(t.getParameter(t.VERSION))[1]),F=parseFloat(U)>=1,k=null,z={},B=new a,H=new a,G={};return G[t.TEXTURE_2D]=r(t.TEXTURE_2D,t.TEXTURE_2D,1),G[t.TEXTURE_CUBE_MAP]=r(t.TEXTURE_CUBE_MAP,t.TEXTURE_CUBE_MAP_POSITIVE_X,6),p.setClear(0,0,0,1),d.setClear(1),f.setClear(0),i(t.DEPTH_TEST),d.setFunc(Ro),u(!1),c(Gi),i(t.CULL_FACE),i(t.BLEND),s(oo),{buffers:{color:p,depth:d,stencil:f},initAttributes:function(){for(var t=0,e=v.length;t<e;t++)v[t]=0},enableAttribute:function(n){v[n]=1,0===g[n]&&(t.enableVertexAttribArray(n),g[n]=1),0!==y[n]&&(e.get("ANGLE_instanced_arrays").vertexAttribDivisorANGLE(n,0),y[n]=0)},enableAttributeAndDivisor:function(n,r){v[n]=1,0===g[n]&&(t.enableVertexAttribArray(n),g[n]=1),y[n]!==r&&(e.get("ANGLE_instanced_arrays").vertexAttribDivisorANGLE(n,r),y[n]=r)},disableUnusedAttributes:function(){for(var e=0,n=g.length;e!==n;++e)g[e]!==v[e]&&(t.disableVertexAttribArray(e),g[e]=0)},enable:i,disable:o,getCompressedTextureFormats:function(){if(null===b&&(b=[],e.get("WEBGL_compressed_texture_pvrtc")||e.get("WEBGL_compressed_texture_s3tc")||e.get("WEBGL_compressed_texture_etc1")))for(var n=t.getParameter(t.COMPRESSED_TEXTURE_FORMATS),r=0;r<n.length;r++)b.push(n[r]);return b},useProgram:function(e){return x!==e&&(t.useProgram(e),x=e,!0)},setBlending:s,setMaterial:function(e){e.side===Qi?o(t.CULL_FACE):i(t.CULL_FACE),u(e.side===Ji),!0===e.transparent?s(e.blending,e.blendEquation,e.blendSrc,e.blendDst,e.blendEquationAlpha,e.blendSrcAlpha,e.blendDstAlpha,e.premultipliedAlpha):s(io),d.setFunc(e.depthFunc),d.setTest(e.depthTest),d.setMask(e.depthWrite),p.setMask(e.colorWrite),l(e.polygonOffset,e.polygonOffsetFactor,e.polygonOffsetUnits)},setFlipSided:u,setCullFace:c,setLineWidth:function(e){e!==I&&(F&&t.lineWidth(e),I=e)},setPolygonOffset:l,setScissorTest:function(e){e?i(t.SCISSOR_TEST):o(t.SCISSOR_TEST)},activeTexture:h,bindTexture:function(e,n){null===k&&h();var r=z[k];void 0===r&&(r={type:void 0,texture:void 0},z[k]=r),r.type===e&&r.texture===n||(t.bindTexture(e,n||G[e]),r.type=e,r.texture=n)},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)}},scissor:function(e){!1===B.equals(e)&&(t.scissor(e.x,e.y,e.z,e.w),B.copy(e))},viewport:function(e){!1===H.equals(e)&&(t.viewport(e.x,e.y,e.z,e.w),H.copy(e))},reset:function(){for(var e=0;e<g.length;e++)1===g[e]&&(t.disableVertexAttribArray(e),g[e]=0);_={},b=null,k=null,z={},x=null,w=null,R=null,L=null,p.reset(),d.reset(),f.reset()}}}(gt,_t,Xt)).scissor(G.copy(tt).multiplyScalar(J)),xt.viewport(H.copy($).multiplyScalar(J)),Et=new function(){var t={};return{get:function(e){var n=e.uuid,r=t[n];return void 0===r&&(r={},t[n]=r),r},remove:function(e){delete t[e.uuid]},clear:function(){t={}}}},Tt=new $t(gt,_t,xt,Et,bt,Xt,mt),St=new st(gt),Ct=new function(t,e,n){function r(t){var a=t.target,s=i[a.id];null!==s.index&&e.remove(s.index);for(var u in s.attributes)e.remove(s.attributes[u]);a.removeEventListener("dispose",r),delete i[a.id];var c=o[a.id];c&&(e.remove(c),delete o[a.id]),(c=o[s.id])&&(e.remove(c),delete o[s.id]),n.geometries--}var i={},o={};return{get:function(t,e){var o=i[e.id];return o||(e.addEventListener("dispose",r),e.isBufferGeometry?o=e:e.isGeometry&&(void 0===e._bufferGeometry&&(e._bufferGeometry=(new Pt).setFromObject(t)),o=e._bufferGeometry),i[e.id]=o,n.geometries++,o)},update:function(n){var r=n.index,i=n.attributes;null!==r&&e.update(r,t.ELEMENT_ARRAY_BUFFER);for(var o in i)e.update(i[o],t.ARRAY_BUFFER);var a=n.morphAttributes;for(var o in a)for(var s=a[o],u=0,c=s.length;u<c;u++)e.update(s[u],t.ARRAY_BUFFER)},getWireframeAttribute:function(n){var r=o[n.id];if(r)return r;var i=[],a=n.index,s=n.attributes;if(null!==a)for(var u=0,c=(d=a.array).length;u<c;u+=3){var l=d[u+0],h=d[u+1],p=d[u+2];i.push(l,h,h,p,p,l)}else for(var d=s.position.array,u=0,c=d.length/3-1;u<c;u+=3){var l=u+0,h=u+1,p=u+2;i.push(l,h,h,p,p,l)}return r=new(At(i)>65535?Mt:wt)(i,1),e.update(r,t.ELEMENT_ARRAY_BUFFER),o[n.id]=r,r}}}(gt,St,mt),Rt=new function(t,e){var n={};return{update:function(r){var i=e.frame,o=r.geometry,a=t.get(r,o);return n[a.id]!==i&&(o.isGeometry&&a.updateFromObject(r),t.update(a),n[a.id]=i),a},clear:function(){n={}}}}(Ct,vt),zt=new function(t){var e={},n=new Float32Array(8);return{update:function(r,i,o,a){var s=r.morphTargetInfluences,u=s.length,c=e[i.id];if(void 0===c){for(c=[],p=0;p<u;p++)c[p]=[p,0];e[i.id]=c}for(var l=o.morphTargets&&i.morphAttributes.position,h=o.morphNormals&&i.morphAttributes.normal,p=0;p<u;p++)0!==(d=c[p])[1]&&(l&&i.removeAttribute("morphTarget"+p),h&&i.removeAttribute("morphNormal"+p));for(p=0;p<u;p++)(d=c[p])[0]=p,d[1]=s[p];for(c.sort(Gt),p=0;p<8;p++){var d=c[p];if(d){var f=d[0],m=d[1];if(m){l&&i.addAttribute("morphTarget"+p,l[f]),h&&i.addAttribute("morphNormal"+p,h[f]),n[p]=m;continue}}n[p]=0}a.getUniforms().setValue(t,"morphTargetInfluences",n)}}}(gt),Dt=new Qt(O,_t,bt),It=new jt,Ut=new Ht,Ft=new function(t,e,n,r){function i(t,n){e.buffers.color.setClear(t.r,t.g,t.b,n,r)}var o,a,s,u=new q(0),c=0;return{getClearColor:function(){return u},setClearColor:function(t,e){u.set(t),i(u,c=void 0!==e?e:1)},getClearAlpha:function(){return c},setClearAlpha:function(t){i(u,c=t)},render:function(e,r,l,h){var p=r.background;null===p?i(u,c):p&&p.isColor&&(i(p,1),h=!0),(t.autoClear||h)&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil),p&&p.isCubeTexture?(void 0===s&&((s=new kt(new Lt(1,1,1),new Q({uniforms:vs.cube.uniforms,vertexShader:vs.cube.vertexShader,fragmentShader:vs.cube.fragmentShader,side:Ji,depthTest:!0,depthWrite:!1,polygonOffset:!0,fog:!1}))).geometry.removeAttribute("normal"),s.geometry.removeAttribute("uv"),s.onBeforeRender=function(t,e,n){var r=n.far;this.matrixWorld.makeScale(r,r,r),this.matrixWorld.copyPosition(n.matrixWorld),this.material.polygonOffsetUnits=10*r},n.update(s.geometry)),s.material.uniforms.tCube.value=p,e.push(s,s.geometry,s.material,0,null)):p&&p.isTexture&&(void 0===o&&(o=new pt(-1,1,1,-1,0,1),a=new kt(new Ot(2,2),new Nt({depthTest:!1,depthWrite:!1,fog:!1})),n.update(a.geometry)),a.material.map=p,t.renderBufferDirect(o,null,a.geometry,a.material,a,null))}}}(O,xt,Ct,S),Bt=new function(t,e,n){var r;this.setMode=function(t){r=t},this.render=function(e,i){t.drawArrays(r,e,i),n.calls++,n.vertices+=i,r===t.TRIANGLES?n.faces+=i/3:r===t.POINTS&&(n.points+=i)},this.renderInstances=function(i,o,a){var s=e.get("ANGLE_instanced_arrays");if(null!==s){var u=i.attributes.position;u.isInterleavedBufferAttribute?(a=u.data.count,s.drawArraysInstancedANGLE(r,0,a,i.maxInstancedCount)):s.drawArraysInstancedANGLE(r,o,a,i.maxInstancedCount),n.calls++,n.vertices+=a*i.maxInstancedCount,r===t.TRIANGLES?n.faces+=i.maxInstancedCount*a/3:r===t.POINTS&&(n.points+=i.maxInstancedCount*a)}else console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.")}}(gt,_t,vt),Vt=new function(t,e,n){var r,i,o;this.setMode=function(t){r=t},this.setIndex=function(t){i=t.type,o=t.bytesPerElement},this.render=function(e,a){t.drawElements(r,a,i,e*o),n.calls++,n.vertices+=a,r===t.TRIANGLES?n.faces+=a/3:r===t.POINTS&&(n.points+=a)},this.renderInstances=function(a,s,u){var c=e.get("ANGLE_instanced_arrays");null!==c?(c.drawElementsInstancedANGLE(r,u,i,s*o,a.maxInstancedCount),n.calls++,n.vertices+=u*a.maxInstancedCount,r===t.TRIANGLES?n.faces+=a.maxInstancedCount*u/3:r===t.POINTS&&(n.points+=a.maxInstancedCount*u)):console.error("THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.")}}(gt,_t,vt),Wt=new Y(O,gt,xt,Tt,bt),qt=new Z(O,gt,xt,Tt,bt),O.info.programs=Dt.programs,O.context=gt,O.capabilities=bt,O.extensions=_t,O.properties=Et,O.renderLists=Ut,O.state=xt}function r(t){t.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),N=!0}function i(t){console.log("THREE.WebGLRenderer: Context Restored."),N=!1,n()}function o(t){var e=t.target;e.removeEventListener("dispose",o),function(t){s(t),Et.remove(t)}(e)}function s(t){var e=Et.get(t).program;t.program=void 0,void 0!==e&&Dt.releaseProgram(e)}function u(t){null!==Jt&&Jt(t),(Yt.getDevice()||window).requestAnimationFrame(u)}function c(t,e,n){if(t.visible){if(t.layers.test(e.layers))if(t.isLight)A.push(t),t.castShadow&&P.push(t);else if(t.isSprite)t.frustumCulled&&!nt.intersectsSprite(t)||L.push(t);else if(t.isLensFlare)I.push(t);else if(t.isImmediateRenderObject)n&&ft.setFromMatrixPosition(t.matrixWorld).applyMatrix4(ht),R.push(t,null,t.material,ft.z,null);else if((t.isMesh||t.isLine||t.isPoints)&&(t.isSkinnedMesh&&t.skeleton.update(),!t.frustumCulled||nt.intersectsObject(t))){n&&ft.setFromMatrixPosition(t.matrixWorld).applyMatrix4(ht);var r=Rt.update(t),i=t.material;if(Array.isArray(i))for(var o=r.groups,a=0,s=o.length;a<s;a++){var u=o[a],l=i[u.materialIndex];l&&l.visible&&R.push(t,r,l,ft.z,u)}else i.visible&&R.push(t,r,i,ft.z,null)}for(var h=t.children,a=0,s=h.length;a<s;a++)c(h[a],e,n)}}function d(t,e,n,r){for(var i=0,o=t.length;i<o;i++){var a=t[i],s=a.object,u=a.geometry,c=void 0===r?a.material:r,l=a.group;if(n.isArrayCamera){B=n;for(var h=n.cameras,p=0,d=h.length;p<d;p++){var m=h[p];if(s.layers.test(m.layers)){var v=m.bounds,g=v.x*X,y=v.y*K,_=v.z*X,b=v.w*K;xt.viewport(H.set(g,y,_,b).multiplyScalar(J)),f(s,e,m,u,c,l)}}}else B=null,f(s,e,n,u,c,l)}}function f(t,e,n,r,i,o){if(t.onBeforeRender(O,e,n,r,i,o),t.modelViewMatrix.multiplyMatrices(n.matrixWorldInverse,t.matrixWorld),t.normalMatrix.getNormalMatrix(t.modelViewMatrix),t.isImmediateRenderObject){xt.setMaterial(i);var a=v(n,e.fog,i,t);k="",function(t,e,n){t.render(function(t){O.renderBufferImmediate(t,e,n)})}(t,a,i)}else O.renderBufferDirect(n,e.fog,r,i,t,o);t.onAfterRender(O,e,n,r,i,o)}function m(t,e,n){var r=Et.get(t),i=Dt.getParameters(t,It.state,P,e,ut.numPlanes,ut.numIntersection,n),a=Dt.getProgramCode(t,i),u=r.program,c=!0;if(void 0===u)t.addEventListener("dispose",o);else if(u.code!==a)s(t);else{if(void 0!==i.shaderID)return;c=!1}if(c){if(i.shaderID){var l=vs[i.shaderID];r.shader={name:t.type,uniforms:fs.clone(l.uniforms),vertexShader:l.vertexShader,fragmentShader:l.fragmentShader}}else r.shader={name:t.type,uniforms:t.uniforms,vertexShader:t.vertexShader,fragmentShader:t.fragmentShader};t.onBeforeCompile(r.shader),u=Dt.acquireProgram(t,r.shader,i,a),r.program=u,t.program=u}var h=u.getAttributes();if(t.morphTargets){t.numSupportedMorphTargets=0;for(p=0;p<O.maxMorphTargets;p++)h["morphTarget"+p]>=0&&t.numSupportedMorphTargets++}if(t.morphNormals){t.numSupportedMorphNormals=0;for(var p=0;p<O.maxMorphNormals;p++)h["morphNormal"+p]>=0&&t.numSupportedMorphNormals++}var d=r.shader.uniforms;(t.isShaderMaterial||t.isRawShaderMaterial)&&!0!==t.clipping||(r.numClippingPlanes=ut.numPlanes,r.numIntersection=ut.numIntersection,d.clippingPlanes=ut.uniform),r.fog=e,r.lightsHash=It.state.hash,t.lights&&(d.ambientLightColor.value=It.state.ambient,d.directionalLights.value=It.state.directional,d.spotLights.value=It.state.spot,d.rectAreaLights.value=It.state.rectArea,d.pointLights.value=It.state.point,d.hemisphereLights.value=It.state.hemi,d.directionalShadowMap.value=It.state.directionalShadowMap,d.directionalShadowMatrix.value=It.state.directionalShadowMatrix,d.spotShadowMap.value=It.state.spotShadowMap,d.spotShadowMatrix.value=It.state.spotShadowMatrix,d.pointShadowMap.value=It.state.pointShadowMap,d.pointShadowMatrix.value=It.state.pointShadowMatrix);var f=r.program.getUniforms(),m=W.seqWithValue(f.seq,d);r.uniformsList=m}function v(t,e,n,r){V=0;var i=Et.get(n);if(ct&&(lt||t!==z)){var o=t===z&&n.id===F;ut.setState(n.clippingPlanes,n.clipIntersection,n.clipShadows,t,i,o)}!1===n.needsUpdate&&(void 0===i.program?n.needsUpdate=!0:n.fog&&i.fog!==e?n.needsUpdate=!0:n.lights&&i.lightsHash!==It.state.hash?n.needsUpdate=!0:void 0===i.numClippingPlanes||i.numClippingPlanes===ut.numPlanes&&i.numIntersection===ut.numIntersection||(n.needsUpdate=!0)),n.needsUpdate&&(m(n,e,r),n.needsUpdate=!1);var a=!1,s=!1,u=!1,c=i.program,l=c.getUniforms(),h=i.shader.uniforms;if(xt.useProgram(c.program)&&(a=!0,s=!0,u=!0),n.id!==F&&(F=n.id,s=!0),a||t!==z){if(l.setValue(gt,"projectionMatrix",t.projectionMatrix),bt.logarithmicDepthBuffer&&l.setValue(gt,"logDepthBufFC",2/(Math.log(t.far+1)/Math.LN2)),z!==(B||t)&&(z=B||t,s=!0,u=!0),n.isShaderMaterial||n.isMeshPhongMaterial||n.isMeshStandardMaterial||n.envMap){var d=l.map.cameraPosition;void 0!==d&&d.setValue(gt,ft.setFromMatrixPosition(t.matrixWorld))}(n.isMeshPhongMaterial||n.isMeshLambertMaterial||n.isMeshBasicMaterial||n.isMeshStandardMaterial||n.isShaderMaterial||n.skinning)&&l.setValue(gt,"viewMatrix",t.matrixWorldInverse)}if(n.skinning){l.setOptional(gt,r,"bindMatrix"),l.setOptional(gt,r,"bindMatrixInverse");var f=r.skeleton;if(f){var v=f.bones;if(bt.floatVertexTextures){if(void 0===f.boneTexture){var b=Math.sqrt(4*v.length);b=rs.nextPowerOfTwo(Math.ceil(b)),b=Math.max(b,4);var x=new Float32Array(b*b*4);x.set(f.boneMatrices);var w=new p(x,b,b,ba,pa);f.boneMatrices=x,f.boneTexture=w,f.boneTextureSize=b}l.setValue(gt,"boneTexture",f.boneTexture),l.setValue(gt,"boneTextureSize",f.boneTextureSize)}else l.setOptional(gt,f,"boneMatrices")}}return s&&(l.setValue(gt,"toneMappingExposure",O.toneMappingExposure),l.setValue(gt,"toneMappingWhitePoint",O.toneMappingWhitePoint),n.lights&&function(t,e){t.ambientLightColor.needsUpdate=e,t.directionalLights.needsUpdate=e,t.pointLights.needsUpdate=e,t.spotLights.needsUpdate=e,t.rectAreaLights.needsUpdate=e,t.hemisphereLights.needsUpdate=e}(h,u),e&&n.fog&&function(t,e){t.fogColor.value=e.color,e.isFog?(t.fogNear.value=e.near,t.fogFar.value=e.far):e.isFogExp2&&(t.fogDensity.value=e.density)}(h,e),n.isMeshBasicMaterial?g(h,n):n.isMeshLambertMaterial?(g(h,n),function(t,e){e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap)}(h,n)):n.isMeshPhongMaterial?(g(h,n),n.isMeshToonMaterial?function(t,e){y(t,e),e.gradientMap&&(t.gradientMap.value=e.gradientMap)}(h,n):y(h,n)):n.isMeshStandardMaterial?(g(h,n),n.isMeshPhysicalMaterial?function(t,e){t.clearCoat.value=e.clearCoat,t.clearCoatRoughness.value=e.clearCoatRoughness,_(t,e)}(h,n):_(h,n)):n.isMeshDepthMaterial?(g(h,n),function(t,e){e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}(h,n)):n.isMeshDistanceMaterial?(g(h,n),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}(h,n)):n.isMeshNormalMaterial?(g(h,n),function(t,e){e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale);e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale));e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}(h,n)):n.isLineBasicMaterial?(function(t,e){t.diffuse.value=e.color,t.opacity.value=e.opacity}(h,n),n.isLineDashedMaterial&&function(t,e){t.dashSize.value=e.dashSize,t.totalSize.value=e.dashSize+e.gapSize,t.scale.value=e.scale}(h,n)):n.isPointsMaterial?function(t,e){if(t.diffuse.value=e.color,t.opacity.value=e.opacity,t.size.value=e.size*J,t.scale.value=.5*K,t.map.value=e.map,null!==e.map){var n=e.map.offset,r=e.map.repeat;t.offsetRepeat.value.set(n.x,n.y,r.x,r.y)}}(h,n):n.isShadowMaterial&&(h.color.value=n.color,h.opacity.value=n.opacity),void 0!==h.ltcMat&&(h.ltcMat.value=ds.LTC_MAT_TEXTURE),void 0!==h.ltcMag&&(h.ltcMag.value=ds.LTC_MAG_TEXTURE),W.upload(gt,i.uniformsList,h,O)),l.setValue(gt,"modelViewMatrix",r.modelViewMatrix),l.setValue(gt,"normalMatrix",r.normalMatrix),l.setValue(gt,"modelMatrix",r.matrixWorld),c}function g(t,e){t.opacity.value=e.opacity,e.color&&(t.diffuse.value=e.color),e.emissive&&t.emissive.value.copy(e.emissive).multiplyScalar(e.emissiveIntensity),e.map&&(t.map.value=e.map),e.alphaMap&&(t.alphaMap.value=e.alphaMap),e.specularMap&&(t.specularMap.value=e.specularMap),e.envMap&&(t.envMap.value=e.envMap,t.flipEnvMap.value=e.envMap&&e.envMap.isCubeTexture?-1:1,t.reflectivity.value=e.reflectivity,t.refractionRatio.value=e.refractionRatio),e.lightMap&&(t.lightMap.value=e.lightMap,t.lightMapIntensity.value=e.lightMapIntensity),e.aoMap&&(t.aoMap.value=e.aoMap,t.aoMapIntensity.value=e.aoMapIntensity);var n;if(e.map?n=e.map:e.specularMap?n=e.specularMap:e.displacementMap?n=e.displacementMap:e.normalMap?n=e.normalMap:e.bumpMap?n=e.bumpMap:e.roughnessMap?n=e.roughnessMap:e.metalnessMap?n=e.metalnessMap:e.alphaMap?n=e.alphaMap:e.emissiveMap&&(n=e.emissiveMap),void 0!==n){n.isWebGLRenderTarget&&(n=n.texture);var r=n.offset,i=n.repeat;t.offsetRepeat.value.set(r.x,r.y,i.x,i.y)}}function y(t,e){t.specular.value=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),e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale)),e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}function _(t,e){t.roughness.value=e.roughness,t.metalness.value=e.metalness,e.roughnessMap&&(t.roughnessMap.value=e.roughnessMap),e.metalnessMap&&(t.metalnessMap.value=e.metalnessMap),e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap),e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale),e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale)),e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias),e.envMap&&(t.envMapIntensity.value=e.envMapIntensity)}console.log("THREE.WebGLRenderer",zi);var b=void 0!==(t=t||{}).canvas?t.canvas:document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),x=void 0!==t.context?t.context:null,w=void 0!==t.alpha&&t.alpha,E=void 0===t.depth||t.depth,M=void 0===t.stencil||t.stencil,T=void 0!==t.antialias&&t.antialias,S=void 0===t.premultipliedAlpha||t.premultipliedAlpha,C=void 0!==t.preserveDrawingBuffer&&t.preserveDrawingBuffer,A=[],P=[],R=null,L=[],I=[];this.domElement=b,this.context=null,this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.gammaFactor=2,this.gammaInput=!1,this.gammaOutput=!1,this.physicallyCorrectLights=!1,this.toneMapping=zo,this.toneMappingExposure=1,this.toneMappingWhitePoint=1,this.maxMorphTargets=8,this.maxMorphNormals=4;var O=this,N=!1,D=null,U=null,F=-1,k="",z=null,B=null,H=new a,G=new a,j=null,V=0,X=b.width,K=b.height,J=1,$=new a(0,0,X,K),tt=new a(0,0,X,K),et=!1,nt=new ot,ut=new function(){function t(){c.value!==r&&(c.value=r,c.needsUpdate=i>0),n.numPlanes=i,n.numIntersection=0}function e(t,e,r,i){var o=null!==t?t.length:0,a=null;if(0!==o){if(a=c.value,!0!==i||null===a){var l=r+4*o,h=e.matrixWorldInverse;u.getNormalMatrix(h),(null===a||a.length<l)&&(a=new Float32Array(l));for(var p=0,d=r;p!==o;++p,d+=4)s.copy(t[p]).applyMatrix4(h,u),s.normal.toArray(a,d),a[d+3]=s.constant}c.value=a,c.needsUpdate=!0}return n.numPlanes=o,a}var n=this,r=null,i=0,o=!1,a=!1,s=new it,u=new rt,c={value:null,needsUpdate:!1};this.uniform=c,this.numPlanes=0,this.numIntersection=0,this.init=function(t,n,a){var s=0!==t.length||n||0!==i||o;return o=n,r=e(t,a,0),i=t.length,s},this.beginShadows=function(){a=!0,e(null)},this.endShadows=function(){a=!1,t()},this.setState=function(n,s,u,l,h,p){if(!o||null===n||0===n.length||a&&!u)a?e(null):t();else{var d=a?0:i,f=4*d,m=h.clippingState||null;c.value=m,m=e(n,l,f,p);for(var v=0;v!==f;++v)m[v]=r[v];h.clippingState=m,this.numIntersection=s?this.numPlanes:0,this.numPlanes+=d}}},ct=!1,lt=!1,ht=new h,ft=new l,mt={geometries:0,textures:0},vt={frame:0,calls:0,vertices:0,faces:0,points:0};this.info={render:vt,memory:mt,programs:null};var gt;try{var yt={alpha:w,depth:E,stencil:M,antialias:T,premultipliedAlpha:S,preserveDrawingBuffer:C};if(null===(gt=x||b.getContext("webgl",yt)||b.getContext("experimental-webgl",yt)))throw null!==b.getContext("webgl")?"Error creating WebGL context with your selected attributes.":"Error creating WebGL context.";void 0===gt.getShaderPrecisionFormat&&(gt.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}}),b.addEventListener("webglcontextlost",r,!1),b.addEventListener("webglcontextrestored",i,!1)}catch(t){console.error("THREE.WebGLRenderer: "+t)}var _t,bt,xt,Et,Tt,St,Ct,Rt,It,Dt,Ut,Ft,zt,Bt,Vt,Wt,qt,Xt;n();var Yt=new function(t){function e(){if(null!==r&&r.isPresenting){var e=r.getEyeParameters("left"),i=e.renderWidth,o=e.renderHeight;f=t.getPixelRatio(),d=t.getSize(),t.setDrawingBufferSize(2*i,o,1)}else n.enabled&&t.setDrawingBufferSize(d.width,d.height,f)}var n=this,r=null,i=null;"VRFrameData"in window&&(i=new window.VRFrameData);var o=new h,s=new h,u=new h,c=new dt;c.bounds=new a(0,0,.5,1),c.layers.enable(1);var l=new dt;l.bounds=new a(.5,0,.5,1),l.layers.enable(2);var p=new te([c,l]);p.layers.enable(1),p.layers.enable(2);var d,f;window.addEventListener("vrdisplaypresentchange",e,!1),this.enabled=!1,this.standing=!1,this.getDevice=function(){return r},this.setDevice=function(t){void 0!==t&&(r=t)},this.getCamera=function(t){if(null===r)return t;r.depthNear=t.near,r.depthFar=t.far,r.getFrameData(i);var e=i.pose;null!==e.position?t.position.fromArray(e.position):t.position.set(0,0,0),null!==e.orientation&&t.quaternion.fromArray(e.orientation),t.updateMatrixWorld();var n=r.stageParameters;if(this.standing&&n&&(s.fromArray(n.sittingToStandingTransform),u.getInverse(s),t.matrixWorld.multiply(s),t.matrixWorldInverse.multiply(u)),!1===r.isPresenting)return t;c.near=t.near,l.near=t.near,c.far=t.far,l.far=t.far,p.matrixWorld.copy(t.matrixWorld),p.matrixWorldInverse.copy(t.matrixWorldInverse),c.matrixWorldInverse.fromArray(i.leftViewMatrix),l.matrixWorldInverse.fromArray(i.rightViewMatrix),this.standing&&n&&(c.matrixWorldInverse.multiply(u),l.matrixWorldInverse.multiply(u));var a=t.parent;null!==a&&(o.getInverse(a.matrixWorld),c.matrixWorldInverse.multiply(o),l.matrixWorldInverse.multiply(o)),c.matrixWorld.getInverse(c.matrixWorldInverse),l.matrixWorld.getInverse(l.matrixWorldInverse),c.projectionMatrix.fromArray(i.leftProjectionMatrix),l.projectionMatrix.fromArray(i.rightProjectionMatrix),p.projectionMatrix.copy(c.projectionMatrix);var h=r.getLayers();if(h.length){var d=h[0];null!==d.leftBounds&&4===d.leftBounds.length&&c.bounds.fromArray(d.leftBounds),null!==d.rightBounds&&4===d.rightBounds.length&&l.bounds.fromArray(d.rightBounds)}return p},this.getStandingMatrix=function(){return s},this.submitFrame=function(){r&&r.isPresenting&&r.submitFrame()},this.dispose=function(){window.removeEventListener("vrdisplaypresentchange",e)}}(O);this.vr=Yt;var Kt=new at(O,Rt,bt.maxTextureSize);this.shadowMap=Kt,this.getContext=function(){return gt},this.getContextAttributes=function(){return gt.getContextAttributes()},this.forceContextLoss=function(){var t=_t.get("WEBGL_lose_context");t&&t.loseContext()},this.forceContextRestore=function(){var t=_t.get("WEBGL_lose_context");t&&t.restoreContext()},this.getPixelRatio=function(){return J},this.setPixelRatio=function(t){void 0!==t&&(J=t,this.setSize(X,K,!1))},this.getSize=function(){return{width:X,height:K}},this.setSize=function(t,e,n){var r=Yt.getDevice();r&&r.isPresenting?console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting."):(X=t,K=e,b.width=t*J,b.height=e*J,!1!==n&&(b.style.width=t+"px",b.style.height=e+"px"),this.setViewport(0,0,t,e))},this.getDrawingBufferSize=function(){return{width:X*J,height:K*J}},this.setDrawingBufferSize=function(t,e,n){X=t,K=e,J=n,b.width=t*n,b.height=e*n,this.setViewport(0,0,t,e)},this.setViewport=function(t,e,n,r){$.set(t,K-e-r,n,r),xt.viewport(H.copy($).multiplyScalar(J))},this.setScissor=function(t,e,n,r){tt.set(t,K-e-r,n,r),xt.scissor(G.copy(tt).multiplyScalar(J))},this.setScissorTest=function(t){xt.setScissorTest(et=t)},this.getClearColor=Ft.getClearColor,this.setClearColor=Ft.setClearColor,this.getClearAlpha=Ft.getClearAlpha,this.setClearAlpha=Ft.setClearAlpha,this.clear=function(t,e,n){var r=0;(void 0===t||t)&&(r|=gt.COLOR_BUFFER_BIT),(void 0===e||e)&&(r|=gt.DEPTH_BUFFER_BIT),(void 0===n||n)&&(r|=gt.STENCIL_BUFFER_BIT),gt.clear(r)},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.clearTarget=function(t,e,n,r){this.setRenderTarget(t),this.clear(e,n,r)},this.dispose=function(){b.removeEventListener("webglcontextlost",r,!1),b.removeEventListener("webglcontextrestored",i,!1),Ut.dispose(),Yt.dispose()},this.renderBufferImmediate=function(t,e,n){xt.initAttributes();var r=Et.get(t);t.hasPositions&&!r.position&&(r.position=gt.createBuffer()),t.hasNormals&&!r.normal&&(r.normal=gt.createBuffer()),t.hasUvs&&!r.uv&&(r.uv=gt.createBuffer()),t.hasColors&&!r.color&&(r.color=gt.createBuffer());var i=e.getAttributes();if(t.hasPositions&&(gt.bindBuffer(gt.ARRAY_BUFFER,r.position),gt.bufferData(gt.ARRAY_BUFFER,t.positionArray,gt.DYNAMIC_DRAW),xt.enableAttribute(i.position),gt.vertexAttribPointer(i.position,3,gt.FLOAT,!1,0,0)),t.hasNormals){if(gt.bindBuffer(gt.ARRAY_BUFFER,r.normal),!n.isMeshPhongMaterial&&!n.isMeshStandardMaterial&&!n.isMeshNormalMaterial&&!0===n.flatShading)for(var o=0,a=3*t.count;o<a;o+=9){var s=t.normalArray,u=(s[o+0]+s[o+3]+s[o+6])/3,c=(s[o+1]+s[o+4]+s[o+7])/3,l=(s[o+2]+s[o+5]+s[o+8])/3;s[o+0]=u,s[o+1]=c,s[o+2]=l,s[o+3]=u,s[o+4]=c,s[o+5]=l,s[o+6]=u,s[o+7]=c,s[o+8]=l}gt.bufferData(gt.ARRAY_BUFFER,t.normalArray,gt.DYNAMIC_DRAW),xt.enableAttribute(i.normal),gt.vertexAttribPointer(i.normal,3,gt.FLOAT,!1,0,0)}t.hasUvs&&n.map&&(gt.bindBuffer(gt.ARRAY_BUFFER,r.uv),gt.bufferData(gt.ARRAY_BUFFER,t.uvArray,gt.DYNAMIC_DRAW),xt.enableAttribute(i.uv),gt.vertexAttribPointer(i.uv,2,gt.FLOAT,!1,0,0)),t.hasColors&&n.vertexColors!==eo&&(gt.bindBuffer(gt.ARRAY_BUFFER,r.color),gt.bufferData(gt.ARRAY_BUFFER,t.colorArray,gt.DYNAMIC_DRAW),xt.enableAttribute(i.color),gt.vertexAttribPointer(i.color,3,gt.FLOAT,!1,0,0)),xt.disableUnusedAttributes(),gt.drawArrays(gt.TRIANGLES,0,t.count),t.count=0},this.renderBufferDirect=function(t,n,r,i,o,a){xt.setMaterial(i);var s=v(t,n,i,o),u=r.id+"_"+s.id+"_"+(!0===i.wireframe),c=!1;u!==k&&(k=u,c=!0),o.morphTargetInfluences&&(zt.update(o,r,i,s),c=!0);var l=r.index,h=r.attributes.position,p=1;!0===i.wireframe&&(l=Ct.getWireframeAttribute(r),p=2);var d,f=Bt;null!==l&&(d=St.get(l),(f=Vt).setIndex(d)),c&&(!function(t,e,n,r){if(n&&n.isInstancedBufferGeometry&&null===_t.get("ANGLE_instanced_arrays"))console.error("THREE.WebGLRenderer.setupVertexAttributes: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");else{void 0===r&&(r=0),xt.initAttributes();var i=n.attributes,o=e.getAttributes(),a=t.defaultAttributeValues;for(var s in o){var u=o[s];if(u>=0){var c=i[s];if(void 0!==c){var l=c.normalized,h=c.itemSize,p=St.get(c);if(void 0===p)continue;var d=p.buffer,f=p.type,m=p.bytesPerElement;if(c.isInterleavedBufferAttribute){var v=c.data,g=v.stride,y=c.offset;v&&v.isInstancedInterleavedBuffer?(xt.enableAttributeAndDivisor(u,v.meshPerAttribute),void 0===n.maxInstancedCount&&(n.maxInstancedCount=v.meshPerAttribute*v.count)):xt.enableAttribute(u),gt.bindBuffer(gt.ARRAY_BUFFER,d),gt.vertexAttribPointer(u,h,f,l,g*m,(r*g+y)*m)}else c.isInstancedBufferAttribute?(xt.enableAttributeAndDivisor(u,c.meshPerAttribute),void 0===n.maxInstancedCount&&(n.maxInstancedCount=c.meshPerAttribute*c.count)):xt.enableAttribute(u),gt.bindBuffer(gt.ARRAY_BUFFER,d),gt.vertexAttribPointer(u,h,f,l,0,r*h*m)}else if(void 0!==a){var _=a[s];if(void 0!==_)switch(_.length){case 2:gt.vertexAttrib2fv(u,_);break;case 3:gt.vertexAttrib3fv(u,_);break;case 4:gt.vertexAttrib4fv(u,_);break;default:gt.vertexAttrib1fv(u,_)}}}}xt.disableUnusedAttributes()}}(i,s,r),null!==l&>.bindBuffer(gt.ELEMENT_ARRAY_BUFFER,d.buffer));var m=0;null!==l?m=l.count:void 0!==h&&(m=h.count);var g=r.drawRange.start*p,y=r.drawRange.count*p,_=null!==a?a.start*p:0,b=null!==a?a.count*p:1/0,x=Math.max(g,_),w=Math.min(m,g+y,_+b)-1,E=Math.max(0,w-x+1);if(0!==E){if(o.isMesh)if(!0===i.wireframe)xt.setLineWidth(i.wireframeLinewidth*e()),f.setMode(gt.LINES);else switch(o.drawMode){case Va:f.setMode(gt.TRIANGLES);break;case Wa:f.setMode(gt.TRIANGLE_STRIP);break;case qa:f.setMode(gt.TRIANGLE_FAN)}else if(o.isLine){var M=i.linewidth;void 0===M&&(M=1),xt.setLineWidth(M*e()),o.isLineSegments?f.setMode(gt.LINES):o.isLineLoop?f.setMode(gt.LINE_LOOP):f.setMode(gt.LINE_STRIP)}else o.isPoints&&f.setMode(gt.POINTS);r&&r.isInstancedBufferGeometry?r.maxInstancedCount>0&&f.renderInstances(r,x,E):f.render(x,E)}},this.compile=function(t,e){A.length=0,P.length=0,t.traverse(function(t){t.isLight&&(A.push(t),t.castShadow&&P.push(t))}),It.setup(A,P,e),t.traverse(function(e){if(e.material)if(Array.isArray(e.material))for(var n=0;n<e.material.length;n++)m(e.material[n],t.fog,e);else m(e.material,t.fog,e)})};var Zt=!1,Jt=null;this.animate=function(t){Jt=t,Zt||((Yt.getDevice()||window).requestAnimationFrame(u),Zt=!0)},this.render=function(t,e,n,r){if(e&&e.isCamera){if(!N){k="",F=-1,z=null,!0===t.autoUpdate&&t.updateMatrixWorld(),null===e.parent&&e.updateMatrixWorld(),Yt.enabled&&(e=Yt.getCamera(e)),ht.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),nt.setFromMatrix(ht),A.length=0,P.length=0,L.length=0,I.length=0,lt=this.localClippingEnabled,ct=ut.init(this.clippingPlanes,lt,e),(R=Ut.get(t,e)).init(),c(t,e,O.sortObjects),!0===O.sortObjects&&R.sort(),ct&&ut.beginShadows(),Kt.render(P,t,e),It.setup(A,P,e),ct&&ut.endShadows(),vt.frame++,vt.calls=0,vt.vertices=0,vt.faces=0,vt.points=0,void 0===n&&(n=null),this.setRenderTarget(n),Ft.render(R,t,e,r);var i=R.opaque,o=R.transparent;if(t.overrideMaterial){var a=t.overrideMaterial;i.length&&d(i,t,e,a),o.length&&d(o,t,e,a)}else i.length&&d(i,t,e),o.length&&d(o,t,e);qt.render(L,t,e),Wt.render(I,t,e,H),n&&Tt.updateRenderTargetMipmap(n),xt.buffers.depth.setTest(!0),xt.buffers.depth.setMask(!0),xt.buffers.color.setMask(!0),xt.setPolygonOffset(!1),Yt.enabled&&Yt.submitFrame()}}else console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.")},this.setFaceCulling=function(t,e){xt.setCullFace(t),xt.setFlipSided(e===Wi)},this.allocTextureUnit=function(){var t=V;return t>=bt.maxTextures&&console.warn("THREE.WebGLRenderer: Trying to use "+t+" texture units while this GPU supports only "+bt.maxTextures),V+=1,t},this.setTexture2D=function(){var t=!1;return function(e,n){e&&e.isWebGLRenderTarget&&(t||(console.warn("THREE.WebGLRenderer.setTexture2D: don't use render targets as textures. Use their .texture property instead."),t=!0),e=e.texture),Tt.setTexture2D(e,n)}}(),this.setTexture=function(){var t=!1;return function(e,n){t||(console.warn("THREE.WebGLRenderer: .setTexture is deprecated, use setTexture2D instead."),t=!0),Tt.setTexture2D(e,n)}}(),this.setTextureCube=function(){var t=!1;return function(e,n){e&&e.isWebGLRenderTargetCube&&(t||(console.warn("THREE.WebGLRenderer.setTextureCube: don't use cube render targets as textures. Use their .texture property instead."),t=!0),e=e.texture),e&&e.isCubeTexture||Array.isArray(e.image)&&6===e.image.length?Tt.setTextureCube(e,n):Tt.setTextureCubeDynamic(e,n)}}(),this.getRenderTarget=function(){return D},this.setRenderTarget=function(t){D=t,t&&void 0===Et.get(t).__webglFramebuffer&&Tt.setupRenderTarget(t);var e=null,n=!1;if(t){var r=Et.get(t).__webglFramebuffer;t.isWebGLRenderTargetCube?(e=r[t.activeCubeFace],n=!0):e=r,H.copy(t.viewport),G.copy(t.scissor),j=t.scissorTest}else H.copy($).multiplyScalar(J),G.copy(tt).multiplyScalar(J),j=et;if(U!==e&&(gt.bindFramebuffer(gt.FRAMEBUFFER,e),U=e),xt.viewport(H),xt.scissor(G),xt.setScissorTest(j),n){var i=Et.get(t.texture);gt.framebufferTexture2D(gt.FRAMEBUFFER,gt.COLOR_ATTACHMENT0,gt.TEXTURE_CUBE_MAP_POSITIVE_X+t.activeCubeFace,i.__webglTexture,t.activeMipMapLevel)}},this.readRenderTargetPixels=function(t,e,n,r,i,o){if(t&&t.isWebGLRenderTarget){var a=Et.get(t).__webglFramebuffer;if(a){var s=!1;a!==U&&(gt.bindFramebuffer(gt.FRAMEBUFFER,a),s=!0);try{var u=t.texture,c=u.format,l=u.type;if(c!==ba&&Xt.convert(c)!==gt.getParameter(gt.IMPLEMENTATION_COLOR_READ_FORMAT))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");if(!(l===aa||Xt.convert(l)===gt.getParameter(gt.IMPLEMENTATION_COLOR_READ_TYPE)||l===pa&&(_t.get("OES_texture_float")||_t.get("WEBGL_color_buffer_float"))||l===da&&_t.get("EXT_color_buffer_half_float")))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");gt.checkFramebufferStatus(gt.FRAMEBUFFER)===gt.FRAMEBUFFER_COMPLETE?e>=0&&e<=t.width-r&&n>=0&&n<=t.height-i&>.readPixels(e,n,r,i,Xt.convert(c),Xt.convert(l),o):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.")}finally{s&>.bindFramebuffer(gt.FRAMEBUFFER,U)}}}else console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.")}}function re(t,e){this.name="",this.color=new q(t),this.density=void 0!==e?e:25e-5}function ie(t,e,n){this.name="",this.color=new q(t),this.near=void 0!==e?e:1,this.far=void 0!==n?n:1e3}function oe(){lt.call(this),this.type="Scene",this.background=null,this.fog=null,this.overrideMaterial=null,this.autoUpdate=!0}function ae(t,e,n,r,i){lt.call(this),this.lensFlares=[],this.positionScreen=new l,this.customUpdateCallback=void 0,void 0!==t&&this.add(t,e,n,r,i)}function se(t){J.call(this),this.type="SpriteMaterial",this.color=new q(16777215),this.map=null,this.rotation=0,this.fog=!1,this.lights=!1,this.setValues(t)}function ue(t){lt.call(this),this.type="Sprite",this.material=void 0!==t?t:new se}function ce(){lt.call(this),this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]}})}function le(t,e){if(t=t||[],this.bones=t.slice(0),this.boneMatrices=new Float32Array(16*this.bones.length),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(var n=0,r=this.bones.length;n<r;n++)this.boneInverses.push(new h)}}function he(){lt.call(this),this.type="Bone"}function pe(t,e){kt.call(this,t,e),this.type="SkinnedMesh",this.bindMode="attached",this.bindMatrix=new h,this.bindMatrixInverse=new h;var n=new le(this.initBones());this.bind(n,this.matrixWorld),this.normalizeSkinWeights()}function de(t){J.call(this),this.type="LineBasicMaterial",this.color=new q(16777215),this.linewidth=1,this.linecap="round",this.linejoin="round",this.lights=!1,this.setValues(t)}function fe(t,e,n){if(1===n)return console.warn("THREE.Line: parameter THREE.LinePieces no longer supported. Created THREE.LineSegments instead."),new me(t,e);lt.call(this),this.type="Line",this.geometry=void 0!==t?t:new Pt,this.material=void 0!==e?e:new de({color:16777215*Math.random()})}function me(t,e){fe.call(this,t,e),this.type="LineSegments"}function ve(t,e){fe.call(this,t,e),this.type="LineLoop"}function ge(t){J.call(this),this.type="PointsMaterial",this.color=new q(16777215),this.map=null,this.size=1,this.sizeAttenuation=!0,this.lights=!1,this.setValues(t)}function ye(t,e){lt.call(this),this.type="Points",this.geometry=void 0!==t?t:new Pt,this.material=void 0!==e?e:new ge({color:16777215*Math.random()})}function _e(){lt.call(this),this.type="Group"}function be(t,e,n,r,i,a,s,u,c){function l(){requestAnimationFrame(l),t.readyState>=t.HAVE_CURRENT_DATA&&(h.needsUpdate=!0)}o.call(this,t,e,n,r,i,a,s,u,c),this.generateMipmaps=!1;var h=this;l()}function xe(t,e,n,r,i,a,s,u,c,l,h,p){o.call(this,null,a,s,u,c,l,r,i,h,p),this.image={width:e,height:n},this.mipmaps=t,this.flipY=!1,this.generateMipmaps=!1}function we(t,e,n,r,i,a,s,u,c,l){if((l=void 0!==l?l:Ma)!==Ma&&l!==Ta)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");void 0===n&&l===Ma&&(n=ca),void 0===n&&l===Ta&&(n=ga),o.call(this,null,r,i,a,s,u,l,n,c),this.image={width:t,height:e},this.magFilter=void 0!==s?s:ta,this.minFilter=void 0!==u?u:ta,this.flipY=!1,this.generateMipmaps=!1}function Ee(t){Pt.call(this),this.type="WireframeGeometry";var e,n,r,i,o,a,s,u,c,h,p=[],d=[0,0],f={},m=["a","b","c"];if(t&&t.isGeometry){var v=t.faces;for(e=0,r=v.length;e<r;e++){var g=v[e];for(n=0;n<3;n++)s=g[m[n]],u=g[m[(n+1)%3]],d[0]=Math.min(s,u),d[1]=Math.max(s,u),void 0===f[c=d[0]+","+d[1]]&&(f[c]={index1:d[0],index2:d[1]})}for(c in f)a=f[c],h=t.vertices[a.index1],p.push(h.x,h.y,h.z),h=t.vertices[a.index2],p.push(h.x,h.y,h.z)}else if(t&&t.isBufferGeometry){var y,_,b,x,w,E,M;if(h=new l,null!==t.index){for(y=t.attributes.position,_=t.index,0===(b=t.groups).length&&(b=[{start:0,count:_.count,materialIndex:0}]),i=0,o=b.length;i<o;++i)for(e=w=(x=b[i]).start,r=w+x.count;e<r;e+=3)for(n=0;n<3;n++)s=_.getX(e+n),u=_.getX(e+(n+1)%3),d[0]=Math.min(s,u),d[1]=Math.max(s,u),void 0===f[c=d[0]+","+d[1]]&&(f[c]={index1:d[0],index2:d[1]});for(c in f)a=f[c],h.fromBufferAttribute(y,a.index1),p.push(h.x,h.y,h.z),h.fromBufferAttribute(y,a.index2),p.push(h.x,h.y,h.z)}else for(e=0,r=(y=t.attributes.position).count/3;e<r;e++)for(n=0;n<3;n++)E=3*e+n,h.fromBufferAttribute(y,E),p.push(h.x,h.y,h.z),M=3*e+(n+1)%3,h.fromBufferAttribute(y,M),p.push(h.x,h.y,h.z)}this.addAttribute("position",new Tt(p,3))}function Me(t,e,n){vt.call(this),this.type="ParametricGeometry",this.parameters={func:t,slices:e,stacks:n},this.fromBufferGeometry(new Te(t,e,n)),this.mergeVertices()}function Te(t,e,n){Pt.call(this),this.type="ParametricBufferGeometry",this.parameters={func:t,slices:e,stacks:n};var r,i,o=[],a=[],s=[],u=[],c=new l,h=new l,p=new l,d=new l,f=new l,m=e+1;for(r=0;r<=n;r++){var v=r/n;for(i=0;i<=e;i++){var g=i/e;h=t(g,v,h),a.push(h.x,h.y,h.z),g-1e-5>=0?(p=t(g-1e-5,v,p),d.subVectors(h,p)):(p=t(g+1e-5,v,p),d.subVectors(p,h)),v-1e-5>=0?(p=t(g,v-1e-5,p),f.subVectors(h,p)):(p=t(g,v+1e-5,p),f.subVectors(p,h)),c.crossVectors(d,f).normalize(),s.push(c.x,c.y,c.z),u.push(g,v)}}for(r=0;r<n;r++)for(i=0;i<e;i++){var y=r*m+i,_=r*m+i+1,b=(r+1)*m+i+1,x=(r+1)*m+i;o.push(y,_,x),o.push(_,b,x)}this.setIndex(o),this.addAttribute("position",new Tt(a,3)),this.addAttribute("normal",new Tt(s,3)),this.addAttribute("uv",new Tt(u,2))}function Se(t,e,n,r){vt.call(this),this.type="PolyhedronGeometry",this.parameters={vertices:t,indices:e,radius:n,detail:r},this.fromBufferGeometry(new Ce(t,e,n,r)),this.mergeVertices()}function Ce(t,e,n,r){function o(t){for(var n=new l,r=new l,i=new l,o=0;o<e.length;o+=3)u(e[o+0],n),u(e[o+1],r),u(e[o+2],i),function(t,e,n,r){var i,o,a=Math.pow(2,r),u=[];for(i=0;i<=a;i++){u[i]=[];var c=t.clone().lerp(n,i/a),l=e.clone().lerp(n,i/a),h=a-i;for(o=0;o<=h;o++)u[i][o]=0===o&&i===a?c:c.clone().lerp(l,o/h)}for(i=0;i<a;i++)for(o=0;o<2*(a-i)-1;o++){var p=Math.floor(o/2);o%2==0?(s(u[i][p+1]),s(u[i+1][p]),s(u[i][p])):(s(u[i][p+1]),s(u[i+1][p+1]),s(u[i+1][p]))}}(n,r,i,t)}function a(){for(var t=new l,e=0;e<p.length;e+=3){t.x=p[e+0],t.y=p[e+1],t.z=p[e+2];var n=h(t)/2/Math.PI+.5,r=function(t){return Math.atan2(-t.y,Math.sqrt(t.x*t.x+t.z*t.z))}(t)/Math.PI+.5;d.push(n,1-r)}!function(){for(var t=new l,e=new l,n=new l,r=new l,o=new i,a=new i,s=new i,u=0,f=0;u<p.length;u+=9,f+=6){t.set(p[u+0],p[u+1],p[u+2]),e.set(p[u+3],p[u+4],p[u+5]),n.set(p[u+6],p[u+7],p[u+8]),o.set(d[f+0],d[f+1]),a.set(d[f+2],d[f+3]),s.set(d[f+4],d[f+5]),r.copy(t).add(e).add(n).divideScalar(3);var m=h(r);c(o,f+0,t,m),c(a,f+2,e,m),c(s,f+4,n,m)}}(),function(){for(var t=0;t<d.length;t+=6){var e=d[t+0],n=d[t+2],r=d[t+4],i=Math.max(e,n,r),o=Math.min(e,n,r);i>.9&&o<.1&&(e<.2&&(d[t+0]+=1),n<.2&&(d[t+2]+=1),r<.2&&(d[t+4]+=1))}}()}function s(t){p.push(t.x,t.y,t.z)}function u(e,n){var r=3*e;n.x=t[r+0],n.y=t[r+1],n.z=t[r+2]}function c(t,e,n,r){r<0&&1===t.x&&(d[e]=t.x-1),0===n.x&&0===n.z&&(d[e]=r/2/Math.PI+.5)}function h(t){return Math.atan2(t.z,-t.x)}Pt.call(this),this.type="PolyhedronBufferGeometry",this.parameters={vertices:t,indices:e,radius:n,detail:r},n=n||1;var p=[],d=[];o(r=r||0),function(t){for(var e=new l,n=0;n<p.length;n+=3)e.x=p[n+0],e.y=p[n+1],e.z=p[n+2],e.normalize().multiplyScalar(t),p[n+0]=e.x,p[n+1]=e.y,p[n+2]=e.z}(n),a(),this.addAttribute("position",new Tt(p,3)),this.addAttribute("normal",new Tt(p.slice(),3)),this.addAttribute("uv",new Tt(d,2)),0===r?this.computeVertexNormals():this.normalizeNormals()}function Ae(t,e){vt.call(this),this.type="TetrahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new Pe(t,e)),this.mergeVertices()}function Pe(t,e){Ce.call(this,[1,1,1,-1,-1,1,-1,1,-1,1,-1,-1],[2,1,0,0,3,2,1,3,0,2,3,1],t,e),this.type="TetrahedronBufferGeometry",this.parameters={radius:t,detail:e}}function Re(t,e){vt.call(this),this.type="OctahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new Le(t,e)),this.mergeVertices()}function Le(t,e){Ce.call(this,[1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1],[0,2,4,0,4,3,0,3,5,0,5,2,1,2,5,1,5,3,1,3,4,1,4,2],t,e),this.type="OctahedronBufferGeometry",this.parameters={radius:t,detail:e}}function Ie(t,e){vt.call(this),this.type="IcosahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new Oe(t,e)),this.mergeVertices()}function Oe(t,e){var n=(1+Math.sqrt(5))/2;Ce.call(this,[-1,n,0,1,n,0,-1,-n,0,1,-n,0,0,-1,n,0,1,n,0,-1,-n,0,1,-n,n,0,-1,n,0,1,-n,0,-1,-n,0,1],[0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,1,5,9,5,11,4,11,10,2,10,7,6,7,1,8,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,4,9,5,2,4,11,6,2,10,8,6,7,9,8,1],t,e),this.type="IcosahedronBufferGeometry",this.parameters={radius:t,detail:e}}function Ne(t,e){vt.call(this),this.type="DodecahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new De(t,e)),this.mergeVertices()}function De(t,e){var n=(1+Math.sqrt(5))/2,r=1/n;Ce.call(this,[-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-r,-n,0,-r,n,0,r,-n,0,r,n,-r,-n,0,-r,n,0,r,-n,0,r,n,0,-n,0,-r,n,0,-r,-n,0,r,n,0,r],[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,19,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9],t,e),this.type="DodecahedronBufferGeometry",this.parameters={radius:t,detail:e}}function Ue(t,e,n,r,i,o){vt.call(this),this.type="TubeGeometry",this.parameters={path:t,tubularSegments:e,radius:n,radialSegments:r,closed:i},void 0!==o&&console.warn("THREE.TubeGeometry: taper has been removed.");var a=new Fe(t,e,n,r,i);this.tangents=a.tangents,this.normals=a.normals,this.binormals=a.binormals,this.fromBufferGeometry(a),this.mergeVertices()}function Fe(t,e,n,r,o){function a(){for(c=0;c<e;c++)s(c);s(!1===o?e:0),function(){for(c=0;c<=e;c++)for(h=0;h<=r;h++)f.x=c/e,f.y=h/r,g.push(f.x,f.y)}(),function(){for(h=1;h<=e;h++)for(c=1;c<=r;c++){var t=(r+1)*(h-1)+(c-1),n=(r+1)*h+(c-1),i=(r+1)*h+c,o=(r+1)*(h-1)+c;y.push(t,n,o),y.push(n,i,o)}}()}function s(i){var o=t.getPointAt(i/e),a=u.normals[i],s=u.binormals[i];for(h=0;h<=r;h++){var c=h/r*Math.PI*2,l=Math.sin(c),f=-Math.cos(c);d.x=f*a.x+l*s.x,d.y=f*a.y+l*s.y,d.z=f*a.z+l*s.z,d.normalize(),v.push(d.x,d.y,d.z),p.x=o.x+n*d.x,p.y=o.y+n*d.y,p.z=o.z+n*d.z,m.push(p.x,p.y,p.z)}}Pt.call(this),this.type="TubeBufferGeometry",this.parameters={path:t,tubularSegments:e,radius:n,radialSegments:r,closed:o},e=e||64,n=n||1,r=r||8,o=o||!1;var u=t.computeFrenetFrames(e,o);this.tangents=u.tangents,this.normals=u.normals,this.binormals=u.binormals;var c,h,p=new l,d=new l,f=new i,m=[],v=[],g=[],y=[];a(),this.setIndex(y),this.addAttribute("position",new Tt(m,3)),this.addAttribute("normal",new Tt(v,3)),this.addAttribute("uv",new Tt(g,2))}function ke(t,e,n,r,i,o,a){vt.call(this),this.type="TorusKnotGeometry",this.parameters={radius:t,tube:e,tubularSegments:n,radialSegments:r,p:i,q:o},void 0!==a&&console.warn("THREE.TorusKnotGeometry: heightScale has been deprecated. Use .scale( x, y, z ) instead."),this.fromBufferGeometry(new ze(t,e,n,r,i,o)),this.mergeVertices()}function ze(t,e,n,r,i,o){function a(t,e,n,r,i){var o=Math.cos(t),a=Math.sin(t),s=n/e*t,u=Math.cos(s);i.x=r*(2+u)*.5*o,i.y=r*(2+u)*a*.5,i.z=r*Math.sin(s)*.5}Pt.call(this),this.type="TorusKnotBufferGeometry",this.parameters={radius:t,tube:e,tubularSegments:n,radialSegments:r,p:i,q:o},t=t||100,e=e||40,n=Math.floor(n)||64,r=Math.floor(r)||8,i=i||2,o=o||3;var s,u,c=[],h=[],p=[],d=[],f=new l,m=new l,v=new l,g=new l,y=new l,_=new l,b=new l;for(s=0;s<=n;++s){var x=s/n*i*Math.PI*2;for(a(x,i,o,t,v),a(x+.01,i,o,t,g),_.subVectors(g,v),b.addVectors(g,v),y.crossVectors(_,b),b.crossVectors(y,_),y.normalize(),b.normalize(),u=0;u<=r;++u){var w=u/r*Math.PI*2,E=-e*Math.cos(w),M=e*Math.sin(w);f.x=v.x+(E*b.x+M*y.x),f.y=v.y+(E*b.y+M*y.y),f.z=v.z+(E*b.z+M*y.z),h.push(f.x,f.y,f.z),m.subVectors(f,v).normalize(),p.push(m.x,m.y,m.z),d.push(s/n),d.push(u/r)}}for(u=1;u<=n;u++)for(s=1;s<=r;s++){var T=(r+1)*(u-1)+(s-1),S=(r+1)*u+(s-1),C=(r+1)*u+s,A=(r+1)*(u-1)+s;c.push(T,S,A),c.push(S,C,A)}this.setIndex(c),this.addAttribute("position",new Tt(h,3)),this.addAttribute("normal",new Tt(p,3)),this.addAttribute("uv",new Tt(d,2))}function Be(t,e,n,r,i){vt.call(this),this.type="TorusGeometry",this.parameters={radius:t,tube:e,radialSegments:n,tubularSegments:r,arc:i},this.fromBufferGeometry(new He(t,e,n,r,i)),this.mergeVertices()}function He(t,e,n,r,i){Pt.call(this),this.type="TorusBufferGeometry",this.parameters={radius:t,tube:e,radialSegments:n,tubularSegments:r,arc:i},t=t||100,e=e||40,n=Math.floor(n)||8,r=Math.floor(r)||6,i=i||2*Math.PI;var o,a,s=[],u=[],c=[],h=[],p=new l,d=new l,f=new l;for(o=0;o<=n;o++)for(a=0;a<=r;a++){var m=a/r*i,v=o/n*Math.PI*2;d.x=(t+e*Math.cos(v))*Math.cos(m),d.y=(t+e*Math.cos(v))*Math.sin(m),d.z=e*Math.sin(v),u.push(d.x,d.y,d.z),p.x=t*Math.cos(m),p.y=t*Math.sin(m),f.subVectors(d,p).normalize(),c.push(f.x,f.y,f.z),h.push(a/r),h.push(o/n)}for(o=1;o<=n;o++)for(a=1;a<=r;a++){var g=(r+1)*o+a-1,y=(r+1)*(o-1)+a-1,_=(r+1)*(o-1)+a,b=(r+1)*o+a;s.push(g,y,b),s.push(y,_,b)}this.setIndex(s),this.addAttribute("position",new Tt(u,3)),this.addAttribute("normal",new Tt(c,3)),this.addAttribute("uv",new Tt(h,2))}function Ge(t,e){vt.call(this),this.type="ExtrudeGeometry",this.parameters={shapes:t,options:e},this.fromBufferGeometry(new je(t,e)),this.mergeVertices()}function je(t,e){void 0!==t&&(Pt.call(this),this.type="ExtrudeBufferGeometry",t=Array.isArray(t)?t:[t],this.addShapeList(t,e),this.computeVertexNormals())}function Ve(t,e){vt.call(this),this.type="TextGeometry",this.parameters={text:t,parameters:e},this.fromBufferGeometry(new We(t,e)),this.mergeVertices()}function We(t,e){var n=(e=e||{}).font;if(!n||!n.isFont)return console.error("THREE.TextGeometry: font parameter is not an instance of THREE.Font."),new vt;var r=n.generateShapes(t,e.size,e.curveSegments);e.amount=void 0!==e.height?e.height:50,void 0===e.bevelThickness&&(e.bevelThickness=10),void 0===e.bevelSize&&(e.bevelSize=8),void 0===e.bevelEnabled&&(e.bevelEnabled=!1),je.call(this,r,e),this.type="TextBufferGeometry"}function qe(t,e,n,r,i,o,a){vt.call(this),this.type="SphereGeometry",this.parameters={radius:t,widthSegments:e,heightSegments:n,phiStart:r,phiLength:i,thetaStart:o,thetaLength:a},this.fromBufferGeometry(new Xe(t,e,n,r,i,o,a)),this.mergeVertices()}function Xe(t,e,n,r,i,o,a){Pt.call(this),this.type="SphereBufferGeometry",this.parameters={radius:t,widthSegments:e,heightSegments:n,phiStart:r,phiLength:i,thetaStart:o,thetaLength:a},t=t||50,e=Math.max(3,Math.floor(e)||8),n=Math.max(2,Math.floor(n)||6),r=void 0!==r?r:0,i=void 0!==i?i:2*Math.PI;var s,u,c=(o=void 0!==o?o:0)+(a=void 0!==a?a:Math.PI),h=0,p=[],d=new l,f=new l,m=[],v=[],g=[],y=[];for(u=0;u<=n;u++){var _=[],b=u/n;for(s=0;s<=e;s++){var x=s/e;d.x=-t*Math.cos(r+x*i)*Math.sin(o+b*a),d.y=t*Math.cos(o+b*a),d.z=t*Math.sin(r+x*i)*Math.sin(o+b*a),v.push(d.x,d.y,d.z),f.set(d.x,d.y,d.z).normalize(),g.push(f.x,f.y,f.z),y.push(x,1-b),_.push(h++)}p.push(_)}for(u=0;u<n;u++)for(s=0;s<e;s++){var w=p[u][s+1],E=p[u][s],M=p[u+1][s],T=p[u+1][s+1];(0!==u||o>0)&&m.push(w,E,T),(u!==n-1||c<Math.PI)&&m.push(E,M,T)}this.setIndex(m),this.addAttribute("position",new Tt(v,3)),this.addAttribute("normal",new Tt(g,3)),this.addAttribute("uv",new Tt(y,2))}function Ye(t,e,n,r,i,o){vt.call(this),this.type="RingGeometry",this.parameters={innerRadius:t,outerRadius:e,thetaSegments:n,phiSegments:r,thetaStart:i,thetaLength:o},this.fromBufferGeometry(new Ke(t,e,n,r,i,o)),this.mergeVertices()}function Ke(t,e,n,r,o,a){Pt.call(this),this.type="RingBufferGeometry",this.parameters={innerRadius:t,outerRadius:e,thetaSegments:n,phiSegments:r,thetaStart:o,thetaLength:a},t=t||20,e=e||50,o=void 0!==o?o:0,a=void 0!==a?a:2*Math.PI,n=void 0!==n?Math.max(3,n):8;var s,u,c,h=[],p=[],d=[],f=[],m=t,v=(e-t)/(r=void 0!==r?Math.max(1,r):1),g=new l,y=new i;for(u=0;u<=r;u++){for(c=0;c<=n;c++)s=o+c/n*a,g.x=m*Math.cos(s),g.y=m*Math.sin(s),p.push(g.x,g.y,g.z),d.push(0,0,1),y.x=(g.x/e+1)/2,y.y=(g.y/e+1)/2,f.push(y.x,y.y);m+=v}for(u=0;u<r;u++){var _=u*(n+1);for(c=0;c<n;c++){var b=s=c+_,x=s+n+1,w=s+n+2,E=s+1;h.push(b,x,E),h.push(x,w,E)}}this.setIndex(h),this.addAttribute("position",new Tt(p,3)),this.addAttribute("normal",new Tt(d,3)),this.addAttribute("uv",new Tt(f,2))}function Ze(t,e,n,r){vt.call(this),this.type="LatheGeometry",this.parameters={points:t,segments:e,phiStart:n,phiLength:r},this.fromBufferGeometry(new Je(t,e,n,r)),this.mergeVertices()}function Je(t,e,n,r){Pt.call(this),this.type="LatheBufferGeometry",this.parameters={points:t,segments:e,phiStart:n,phiLength:r},e=Math.floor(e)||12,n=n||0,r=r||2*Math.PI,r=rs.clamp(r,0,2*Math.PI);var o,a,s,u=[],c=[],h=[],p=1/e,d=new l,f=new i;for(a=0;a<=e;a++){var m=n+a*p*r,v=Math.sin(m),g=Math.cos(m);for(s=0;s<=t.length-1;s++)d.x=t[s].x*v,d.y=t[s].y,d.z=t[s].x*g,c.push(d.x,d.y,d.z),f.x=a/e,f.y=s/(t.length-1),h.push(f.x,f.y)}for(a=0;a<e;a++)for(s=0;s<t.length-1;s++){var y=o=s+a*t.length,_=o+t.length,b=o+t.length+1,x=o+1;u.push(y,_,x),u.push(_,b,x)}if(this.setIndex(u),this.addAttribute("position",new Tt(c,3)),this.addAttribute("uv",new Tt(h,2)),this.computeVertexNormals(),r===2*Math.PI){var w=this.attributes.normal.array,E=new l,M=new l,T=new l;for(o=e*t.length*3,a=0,s=0;a<t.length;a++,s+=3)E.x=w[s+0],E.y=w[s+1],E.z=w[s+2],M.x=w[o+s+0],M.y=w[o+s+1],M.z=w[o+s+2],T.addVectors(E,M).normalize(),w[s+0]=w[o+s+0]=T.x,w[s+1]=w[o+s+1]=T.y,w[s+2]=w[o+s+2]=T.z}}function Qe(t,e){vt.call(this),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 $e(t,e)),this.mergeVertices()}function $e(t,e){function n(t){var n,s,c,l=i.length/3,h=t.extractPoints(e),p=h.shape,d=h.holes;if(!1===xs.isClockWise(p))for(p=p.reverse(),n=0,s=d.length;n<s;n++)c=d[n],!0===xs.isClockWise(c)&&(d[n]=c.reverse());var f=xs.triangulateShape(p,d);for(n=0,s=d.length;n<s;n++)c=d[n],p=p.concat(c);for(n=0,s=p.length;n<s;n++){var m=p[n];i.push(m.x,m.y,0),o.push(0,0,1),a.push(m.x,m.y)}for(n=0,s=f.length;n<s;n++){var v=f[n],g=v[0]+l,y=v[1]+l,_=v[2]+l;r.push(g,y,_),u+=3}}Pt.call(this),this.type="ShapeBufferGeometry",this.parameters={shapes:t,curveSegments:e},e=e||12;var r=[],i=[],o=[],a=[],s=0,u=0;if(!1===Array.isArray(t))n(t);else for(var c=0;c<t.length;c++)n(t[c]),this.addGroup(s,u,c),s+=u,u=0;this.setIndex(r),this.addAttribute("position",new Tt(i,3)),this.addAttribute("normal",new Tt(o,3)),this.addAttribute("uv",new Tt(a,2))}function tn(t,e){Pt.call(this),this.type="EdgesGeometry",this.parameters={thresholdAngle:e},e=void 0!==e?e:1;var n,r,i,o,a=[],s=Math.cos(rs.DEG2RAD*e),u=[0,0],c={},l=["a","b","c"];t.isBufferGeometry?(o=new vt).fromBufferGeometry(t):o=t.clone(),o.mergeVertices(),o.computeFaceNormals();for(var h=o.vertices,p=o.faces,d=0,f=p.length;d<f;d++)for(var m=p[d],v=0;v<3;v++)n=m[l[v]],r=m[l[(v+1)%3]],u[0]=Math.min(n,r),u[1]=Math.max(n,r),void 0===c[i=u[0]+","+u[1]]?c[i]={index1:u[0],index2:u[1],face1:d,face2:void 0}:c[i].face2=d;for(i in c){var g=c[i];if(void 0===g.face2||p[g.face1].normal.dot(p[g.face2].normal)<=s){var y=h[g.index1];a.push(y.x,y.y,y.z),y=h[g.index2],a.push(y.x,y.y,y.z)}}this.addAttribute("position",new Tt(a,3))}function en(t,e,n,r,i,o,a,s){vt.call(this),this.type="CylinderGeometry",this.parameters={radiusTop:t,radiusBottom:e,height:n,radialSegments:r,heightSegments:i,openEnded:o,thetaStart:a,thetaLength:s},this.fromBufferGeometry(new nn(t,e,n,r,i,o,a,s)),this.mergeVertices()}function nn(t,e,n,r,o,a,s,u){function c(n){var o,a,c,g=new i,b=new l,x=0,w=!0===n?t:e,E=!0===n?1:-1;for(a=v,o=1;o<=r;o++)d.push(0,y*E,0),f.push(0,E,0),m.push(.5,.5),v++;for(c=v,o=0;o<=r;o++){var M=o/r*u+s,T=Math.cos(M),S=Math.sin(M);b.x=w*S,b.y=y*E,b.z=w*T,d.push(b.x,b.y,b.z),f.push(0,E,0),g.x=.5*T+.5,g.y=.5*S*E+.5,m.push(g.x,g.y),v++}for(o=0;o<r;o++){var C=a+o,A=c+o;!0===n?p.push(A,A+1,C):p.push(A+1,A,C),x+=3}h.addGroup(_,x,!0===n?1:2),_+=x}Pt.call(this),this.type="CylinderBufferGeometry",this.parameters={radiusTop:t,radiusBottom:e,height:n,radialSegments:r,heightSegments:o,openEnded:a,thetaStart:s,thetaLength:u};var h=this;t=void 0!==t?t:20,e=void 0!==e?e:20,n=void 0!==n?n:100,r=Math.floor(r)||8,o=Math.floor(o)||1,a=void 0!==a&&a,s=void 0!==s?s:0,u=void 0!==u?u:2*Math.PI;var p=[],d=[],f=[],m=[],v=0,g=[],y=n/2,_=0;!function(){var i,a,c=new l,b=new l,x=0,w=(e-t)/n;for(a=0;a<=o;a++){var E=[],M=a/o,T=M*(e-t)+t;for(i=0;i<=r;i++){var S=i/r,C=S*u+s,A=Math.sin(C),P=Math.cos(C);b.x=T*A,b.y=-M*n+y,b.z=T*P,d.push(b.x,b.y,b.z),c.set(A,w,P).normalize(),f.push(c.x,c.y,c.z),m.push(S,1-M),E.push(v++)}g.push(E)}for(i=0;i<r;i++)for(a=0;a<o;a++){var R=g[a][i],L=g[a+1][i],I=g[a+1][i+1],O=g[a][i+1];p.push(R,L,O),p.push(L,I,O),x+=6}h.addGroup(_,x,0),_+=x}(),!1===a&&(t>0&&c(!0),e>0&&c(!1)),this.setIndex(p),this.addAttribute("position",new Tt(d,3)),this.addAttribute("normal",new Tt(f,3)),this.addAttribute("uv",new Tt(m,2))}function rn(t,e,n,r,i,o,a){en.call(this,0,t,e,n,r,i,o,a),this.type="ConeGeometry",this.parameters={radius:t,height:e,radialSegments:n,heightSegments:r,openEnded:i,thetaStart:o,thetaLength:a}}function on(t,e,n,r,i,o,a){nn.call(this,0,t,e,n,r,i,o,a),this.type="ConeBufferGeometry",this.parameters={radius:t,height:e,radialSegments:n,heightSegments:r,openEnded:i,thetaStart:o,thetaLength:a}}function an(t,e,n,r){vt.call(this),this.type="CircleGeometry",this.parameters={radius:t,segments:e,thetaStart:n,thetaLength:r},this.fromBufferGeometry(new sn(t,e,n,r)),this.mergeVertices()}function sn(t,e,n,r){Pt.call(this),this.type="CircleBufferGeometry",this.parameters={radius:t,segments:e,thetaStart:n,thetaLength:r},t=t||50,e=void 0!==e?Math.max(3,e):8,n=void 0!==n?n:0,r=void 0!==r?r:2*Math.PI;var o,a,s=[],u=[],c=[],h=[],p=new l,d=new i;for(u.push(0,0,0),c.push(0,0,1),h.push(.5,.5),a=0,o=3;a<=e;a++,o+=3){var f=n+a/e*r;p.x=t*Math.cos(f),p.y=t*Math.sin(f),u.push(p.x,p.y,p.z),c.push(0,0,1),d.x=(u[o]/t+1)/2,d.y=(u[o+1]/t+1)/2,h.push(d.x,d.y)}for(o=1;o<=e;o++)s.push(o,o+1,0);this.setIndex(s),this.addAttribute("position",new Tt(u,3)),this.addAttribute("normal",new Tt(c,3)),this.addAttribute("uv",new Tt(h,2))}function un(t){J.call(this),this.type="ShadowMaterial",this.color=new q(0),this.opacity=1,this.lights=!0,this.transparent=!0,this.setValues(t)}function cn(t){Q.call(this,t),this.type="RawShaderMaterial"}function ln(t){J.call(this),this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new q(16777215),this.roughness=.5,this.metalness=.5,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new q(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalScale=new i(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.setValues(t)}function hn(t){ln.call(this),this.defines={PHYSICAL:""},this.type="MeshPhysicalMaterial",this.reflectivity=.5,this.clearCoat=0,this.clearCoatRoughness=0,this.setValues(t)}function pn(t){J.call(this),this.type="MeshPhongMaterial",this.color=new q(16777215),this.specular=new q(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new q(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalScale=new i(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=Do,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 dn(t){pn.call(this),this.defines={TOON:""},this.type="MeshToonMaterial",this.gradientMap=null,this.setValues(t)}function fn(t){J.call(this),this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalScale=new i(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function mn(t){J.call(this),this.type="MeshLambertMaterial",this.color=new q(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new q(0),this.emissiveIntensity=1,this.emissiveMap=null,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=Do,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 vn(t){de.call(this),this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(t)}function gn(t,e,n){var r=this,i=!1,o=0,a=0;this.onStart=void 0,this.onLoad=t,this.onProgress=e,this.onError=n,this.itemStart=function(t){a++,!1===i&&void 0!==r.onStart&&r.onStart(t,o,a),i=!0},this.itemEnd=function(t){o++,void 0!==r.onProgress&&r.onProgress(t,o,a),o===a&&(i=!1,void 0!==r.onLoad&&r.onLoad())},this.itemError=function(t){void 0!==r.onError&&r.onError(t)}}function yn(t){this.manager=void 0!==t?t:Ts}function _n(t){this.manager=void 0!==t?t:Ts,this._parser=null}function bn(t){this.manager=void 0!==t?t:Ts,this._parser=null}function xn(t){this.manager=void 0!==t?t:Ts}function wn(t){this.manager=void 0!==t?t:Ts}function En(t){this.manager=void 0!==t?t:Ts}function Mn(t,e){lt.call(this),this.type="Light",this.color=new q(t),this.intensity=void 0!==e?e:1,this.receiveShadow=void 0}function Tn(t,e,n){Mn.call(this,t,n),this.type="HemisphereLight",this.castShadow=void 0,this.position.copy(lt.DefaultUp),this.updateMatrix(),this.groundColor=new q(e)}function Sn(t){this.camera=t,this.bias=0,this.radius=1,this.mapSize=new i(512,512),this.map=null,this.matrix=new h}function Cn(){Sn.call(this,new dt(50,1,.5,500))}function An(t,e,n,r,i,o){Mn.call(this,t,e),this.type="SpotLight",this.position.copy(lt.DefaultUp),this.updateMatrix(),this.target=new lt,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!==r?r:Math.PI/3,this.penumbra=void 0!==i?i:0,this.decay=void 0!==o?o:1,this.shadow=new Cn}function Pn(t,e,n,r){Mn.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!==r?r:1,this.shadow=new Sn(new dt(90,1,.5,500))}function Rn(){Sn.call(this,new pt(-5,5,5,-5,.5,500))}function Ln(t,e){Mn.call(this,t,e),this.type="DirectionalLight",this.position.copy(lt.DefaultUp),this.updateMatrix(),this.target=new lt,this.shadow=new Rn}function In(t,e){Mn.call(this,t,e),this.type="AmbientLight",this.castShadow=void 0}function On(t,e,n,r){Mn.call(this,t,e),this.type="RectAreaLight",this.position.set(0,1,0),this.updateMatrix(),this.width=void 0!==n?n:10,this.height=void 0!==r?r:10}function Nn(t,e,n,r){this.parameterPositions=t,this._cachedIndex=0,this.resultBuffer=void 0!==r?r:new e.constructor(n),this.sampleValues=e,this.valueSize=n}function Dn(t,e,n,r){Nn.call(this,t,e,n,r),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0}function Un(t,e,n,r){Nn.call(this,t,e,n,r)}function Fn(t,e,n,r){Nn.call(this,t,e,n,r)}function kn(t,e,n,r){if(void 0===t)throw new Error("track name is undefined");if(void 0===e||0===e.length)throw new Error("no keyframes in track named "+t);this.name=t,this.times=Ss.convertArray(e,this.TimeBufferType),this.values=Ss.convertArray(n,this.ValueBufferType),this.setInterpolation(r||this.DefaultInterpolation),this.validate(),this.optimize()}function zn(t,e,n,r){kn.call(this,t,e,n,r)}function Bn(t,e,n,r){Nn.call(this,t,e,n,r)}function Hn(t,e,n,r){kn.call(this,t,e,n,r)}function Gn(t,e,n,r){kn.call(this,t,e,n,r)}function jn(t,e,n,r){kn.call(this,t,e,n,r)}function Vn(t,e,n){kn.call(this,t,e,n)}function Wn(t,e,n,r){kn.call(this,t,e,n,r)}function qn(t,e,n,r){kn.apply(this,arguments)}function Xn(t,e,n){this.name=t,this.tracks=n,this.duration=void 0!==e?e:-1,this.uuid=rs.generateUUID(),this.duration<0&&this.resetDuration(),this.optimize()}function Yn(t){this.manager=void 0!==t?t:Ts,this.textures={}}function Kn(t){this.manager=void 0!==t?t:Ts}function Zn(){this.onLoadStart=function(){},this.onLoadProgress=function(){},this.onLoadComplete=function(){}}function Jn(t){"boolean"==typeof t&&(console.warn("THREE.JSONLoader: showStatus parameter has been removed from constructor."),t=void 0),this.manager=void 0!==t?t:Ts,this.withCredentials=!1}function Qn(t){this.manager=void 0!==t?t:Ts,this.texturePath=""}function $n(t,e,n,r,i){var o=.5*(r-e),a=.5*(i-n),s=t*t;return(2*n-2*r+o+a)*(t*s)+(-3*n+3*r-2*o-a)*s+o*t+n}function tr(t,e,n,r){return function(t,e){var 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,r)}function er(t,e,n,r,i){return function(t,e){var n=1-t;return n*n*n*e}(t,e)+function(t,e){var n=1-t;return 3*n*n*t*e}(t,n)+function(t,e){return 3*(1-t)*t*t*e}(t,r)+function(t,e){return t*t*t*e}(t,i)}function nr(){this.arcLengthDivisions=200}function rr(t,e){nr.call(this),this.v1=t,this.v2=e}function ir(){nr.call(this),this.curves=[],this.autoClose=!1}function or(t,e,n,r,i,o,a,s){nr.call(this),this.aX=t,this.aY=e,this.xRadius=n,this.yRadius=r,this.aStartAngle=i,this.aEndAngle=o,this.aClockwise=a,this.aRotation=s||0}function ar(t){nr.call(this),this.points=void 0===t?[]:t}function sr(t,e,n,r){nr.call(this),this.v0=t,this.v1=e,this.v2=n,this.v3=r}function ur(t,e,n){nr.call(this),this.v0=t,this.v1=e,this.v2=n}function cr(t){ir.call(this),this.currentPoint=new i,t&&this.fromPoints(t)}function lr(){cr.apply(this,arguments),this.holes=[]}function hr(){this.subPaths=[],this.currentPath=null}function pr(t){this.data=t}function dr(t){this.manager=void 0!==t?t:Ts}function fr(t){this.manager=void 0!==t?t:Ts}function mr(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new dt,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new dt,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1}function vr(t,e,n){lt.call(this),this.type="CubeCamera";var r=new dt(90,1,t,e);r.up.set(0,-1,0),r.lookAt(new l(1,0,0)),this.add(r);var i=new dt(90,1,t,e);i.up.set(0,-1,0),i.lookAt(new l(-1,0,0)),this.add(i);var o=new dt(90,1,t,e);o.up.set(0,0,1),o.lookAt(new l(0,1,0)),this.add(o);var a=new dt(90,1,t,e);a.up.set(0,0,-1),a.lookAt(new l(0,-1,0)),this.add(a);var s=new dt(90,1,t,e);s.up.set(0,-1,0),s.lookAt(new l(0,0,1)),this.add(s);var c=new dt(90,1,t,e);c.up.set(0,-1,0),c.lookAt(new l(0,0,-1)),this.add(c);var h={format:_a,magFilter:ra,minFilter:ra};this.renderTarget=new u(n,n,h),this.renderTarget.texture.name="CubeCamera",this.update=function(t,e){null===this.parent&&this.updateMatrixWorld();var n=this.renderTarget,u=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,n.activeCubeFace=0,t.render(e,r,n),n.activeCubeFace=1,t.render(e,i,n),n.activeCubeFace=2,t.render(e,o,n),n.activeCubeFace=3,t.render(e,a,n),n.activeCubeFace=4,t.render(e,s,n),n.texture.generateMipmaps=u,n.activeCubeFace=5,t.render(e,c,n),t.setRenderTarget(null)},this.clear=function(t,e,n,r){for(var i=this.renderTarget,o=0;o<6;o++)i.activeCubeFace=o,t.setRenderTarget(i),t.clear(e,n,r);t.setRenderTarget(null)}}function gr(){lt.call(this),this.type="AudioListener",this.context=Ns.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null}function yr(t){lt.call(this),this.type="Audio",this.context=t.context,this.gain=this.context.createGain(),this.gain.connect(t.getInput()),this.autoplay=!1,this.buffer=null,this.loop=!1,this.startTime=0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.sourceType="empty",this.filters=[]}function _r(t){yr.call(this,t),this.panner=this.context.createPanner(),this.panner.connect(this.gain)}function br(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)}function xr(t,e,n){this.binding=t,this.valueSize=n;var r,i=Float64Array;switch(e){case"quaternion":r=this._slerp;break;case"string":case"bool":i=Array,r=this._select;break;default:r=this._lerp}this.buffer=new i(4*n),this._mixBufferRegion=r,this.cumulativeWeight=0,this.useCount=0,this.referenceCount=0}function wr(t,e,n){var r=n||Er.parseTrackName(e);this._targetGroup=t,this._bindings=t.subscribe_(e,r)}function Er(t,e,n){this.path=e,this.parsedPath=n||Er.parseTrackName(e),this.node=Er.findNode(t,this.parsedPath.nodeName)||t,this.rootNode=t}function Mr(t){this.uuid=rs.generateUUID(),this._objects=Array.prototype.slice.call(arguments),this.nCachedObjects_=0;var e={};this._indicesByUUID=e;for(var n=0,r=arguments.length;n!==r;++n)e[arguments[n].uuid]=n;this._paths=[],this._parsedPaths=[],this._bindings=[],this._bindingsIndicesByPath={};var i=this;this.stats={objects:{get total(){return i._objects.length},get inUse(){return this.total-i.nCachedObjects_}},get bindingsPerObject(){return i._bindings.length}}}function Tr(t,e,n){this._mixer=t,this._clip=e,this._localRoot=n||null;for(var r=e.tracks,i=r.length,o=new Array(i),a={endingStart:Ha,endingEnd:Ha},s=0;s!==i;++s){var u=r[s].createInterpolant(null);o[s]=u,u.settings=a}this._interpolantSettings=a,this._interpolants=o,this._propertyBindings=new Array(i),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=Ua,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}function Sr(t){this._root=t,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}function Cr(t){"string"==typeof t&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),t=arguments[1]),this.value=t}function Ar(){Pt.call(this),this.type="InstancedBufferGeometry",this.maxInstancedCount=void 0}function Pr(t,e,n,r){this.uuid=rs.generateUUID(),this.data=t,this.itemSize=e,this.offset=n,this.normalized=!0===r}function Rr(t,e){this.uuid=rs.generateUUID(),this.array=t,this.stride=e,this.count=void 0!==t?t.length/e:0,this.dynamic=!1,this.updateRange={offset:0,count:-1},this.onUploadCallback=function(){},this.version=0}function Lr(t,e,n){Rr.call(this,t,e),this.meshPerAttribute=n||1}function Ir(t,e,n){gt.call(this,t,e),this.meshPerAttribute=n||1}function Or(t,e,n,r){this.ray=new Dt(t,e),this.near=n||0,this.far=r||1/0,this.params={Mesh:{},Line:{},LOD:{},Points:{threshold:1},Sprite:{}},Object.defineProperties(this.params,{PointCloud:{get:function(){return console.warn("THREE.Raycaster: params.PointCloud has been renamed to params.Points."),this.Points}}})}function Nr(t,e){return t.distance-e.distance}function Dr(t,e,n,r){if(!1!==t.visible&&(t.raycast(e,n),!0===r))for(var i=t.children,o=0,a=i.length;o<a;o++)Dr(i[o],e,n,!0)}function Ur(t){this.autoStart=void 0===t||t,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}function Fr(t,e,n){return this.radius=void 0!==t?t:1,this.phi=void 0!==e?e:0,this.theta=void 0!==n?n:0,this}function kr(t,e,n){return this.radius=void 0!==t?t:1,this.theta=void 0!==e?e:0,this.y=void 0!==n?n:0,this}function zr(t){lt.call(this),this.material=t,this.render=function(t){}}function Br(t,e,n,r){this.object=t,this.size=void 0!==e?e:1;var i=void 0!==n?n:16711680,o=void 0!==r?r:1,a=0,s=this.object.geometry;s&&s.isGeometry?a=3*s.faces.length:s&&s.isBufferGeometry&&(a=s.attributes.normal.count);var u=new Pt,c=new Tt(2*a*3,3);u.addAttribute("position",c),me.call(this,u,new de({color:i,linewidth:o})),this.matrixAutoUpdate=!1,this.update()}function Hr(t,e){lt.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=e;for(var n=new Pt,r=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1],i=0,o=1;i<32;i++,o++){var a=i/32*Math.PI*2,s=o/32*Math.PI*2;r.push(Math.cos(a),Math.sin(a),1,Math.cos(s),Math.sin(s),1)}n.addAttribute("position",new Tt(r,3));var u=new de({fog:!1});this.cone=new me(n,u),this.add(this.cone),this.update()}function Gr(t){var e=[];t&&t.isBone&&e.push(t);for(var n=0;n<t.children.length;n++)e.push.apply(e,Gr(t.children[n]));return e}function jr(t){for(var e=Gr(t),n=new Pt,r=[],i=[],o=new q(0,0,1),a=new q(0,1,0),s=0;s<e.length;s++){var u=e[s];u.parent&&u.parent.isBone&&(r.push(0,0,0),r.push(0,0,0),i.push(o.r,o.g,o.b),i.push(a.r,a.g,a.b))}n.addAttribute("position",new Tt(r,3)),n.addAttribute("color",new Tt(i,3));var c=new de({vertexColors:ro,depthTest:!1,depthWrite:!1,transparent:!0});me.call(this,n,c),this.root=t,this.bones=e,this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.onBeforeRender()}function Vr(t,e,n){this.light=t,this.light.updateMatrixWorld(),this.color=n;var r=new Xe(e,4,2),i=new Nt({wireframe:!0,fog:!1});kt.call(this,r,i),this.matrix=this.light.matrixWorld,this.matrixAutoUpdate=!1,this.update()}function Wr(t,e){lt.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=e;var n=new de({fog:!1}),r=new Pt;r.addAttribute("position",new gt(new Float32Array(15),3)),this.line=new fe(r,n),this.add(this.line),this.update()}function qr(t,e,n){lt.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=n;var r=new Le(e);r.rotateY(.5*Math.PI),this.material=new Nt({wireframe:!0,fog:!1}),void 0===this.color&&(this.material.vertexColors=ro);var i=r.getAttribute("position"),o=new Float32Array(3*i.count);r.addAttribute("color",new gt(o,3)),this.add(new kt(r,this.material)),this.update()}function Xr(t,e,n,r){t=t||10,e=e||10,n=new q(void 0!==n?n:4473924),r=new q(void 0!==r?r:8947848);for(var i=e/2,o=t/e,a=t/2,s=[],u=[],c=0,l=0,h=-a;c<=e;c++,h+=o){s.push(-a,0,h,a,0,h),s.push(h,0,-a,h,0,a);var p=c===i?n:r;p.toArray(u,l),l+=3,p.toArray(u,l),l+=3,p.toArray(u,l),l+=3,p.toArray(u,l),l+=3}var d=new Pt;d.addAttribute("position",new Tt(s,3)),d.addAttribute("color",new Tt(u,3));var f=new de({vertexColors:ro});me.call(this,d,f)}function Yr(t,e,n,r,i,o){t=t||10,e=e||16,n=n||8,r=r||64,i=new q(void 0!==i?i:4473924),o=new q(void 0!==o?o:8947848);var a,s,u,c,l,h,p,d=[],f=[];for(c=0;c<=e;c++)u=c/e*(2*Math.PI),a=Math.sin(u)*t,s=Math.cos(u)*t,d.push(0,0,0),d.push(a,0,s),p=1&c?i:o,f.push(p.r,p.g,p.b),f.push(p.r,p.g,p.b);for(c=0;c<=n;c++)for(p=1&c?i:o,h=t-t/n*c,l=0;l<r;l++)u=l/r*(2*Math.PI),a=Math.sin(u)*h,s=Math.cos(u)*h,d.push(a,0,s),f.push(p.r,p.g,p.b),u=(l+1)/r*(2*Math.PI),a=Math.sin(u)*h,s=Math.cos(u)*h,d.push(a,0,s),f.push(p.r,p.g,p.b);var m=new Pt;m.addAttribute("position",new Tt(d,3)),m.addAttribute("color",new Tt(f,3));var v=new de({vertexColors:ro});me.call(this,m,v)}function Kr(t,e,n,r){this.object=t,this.size=void 0!==e?e:1;var i=void 0!==n?n:16776960,o=void 0!==r?r:1,a=0,s=this.object.geometry;s&&s.isGeometry?a=s.faces.length:console.warn("THREE.FaceNormalsHelper: only THREE.Geometry is supported. Use THREE.VertexNormalsHelper, instead.");var u=new Pt,c=new Tt(2*a*3,3);u.addAttribute("position",c),me.call(this,u,new de({color:i,linewidth:o})),this.matrixAutoUpdate=!1,this.update()}function Zr(t,e,n){lt.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=n,void 0===e&&(e=1);var r=new Pt;r.addAttribute("position",new Tt([-e,e,0,e,e,0,e,-e,0,-e,-e,0,-e,e,0],3));var i=new de({fog:!1});this.lightPlane=new fe(r,i),this.add(this.lightPlane),(r=new Pt).addAttribute("position",new Tt([0,0,0,0,0,1],3)),this.targetLine=new fe(r,i),this.add(this.targetLine),this.update()}function Jr(t){function e(t,e,r){n(t,r),n(e,r)}function n(t,e){o.push(0,0,0),a.push(e.r,e.g,e.b),void 0===s[t]&&(s[t]=[]),s[t].push(o.length/3-1)}var r=new Pt,i=new de({color:16777215,vertexColors:no}),o=[],a=[],s={},u=new q(16755200),c=new q(16711680),l=new q(43775),h=new q(16777215),p=new q(3355443);e("n1","n2",u),e("n2","n4",u),e("n4","n3",u),e("n3","n1",u),e("f1","f2",u),e("f2","f4",u),e("f4","f3",u),e("f3","f1",u),e("n1","f1",u),e("n2","f2",u),e("n3","f3",u),e("n4","f4",u),e("p","n1",c),e("p","n2",c),e("p","n3",c),e("p","n4",c),e("u1","u2",l),e("u2","u3",l),e("u3","u1",l),e("c","t",h),e("p","c",p),e("cn1","cn2",p),e("cn3","cn4",p),e("cf1","cf2",p),e("cf3","cf4",p),r.addAttribute("position",new Tt(o,3)),r.addAttribute("color",new Tt(a,3)),me.call(this,r,i),this.camera=t,this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.pointMap=s,this.update()}function Qr(t,e){this.object=t,void 0===e&&(e=16776960);var n=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),r=new Float32Array(24),i=new Pt;i.setIndex(new gt(n,1)),i.addAttribute("position",new gt(r,3)),me.call(this,i,new de({color:e})),this.matrixAutoUpdate=!1,this.update()}function $r(t,e){this.type="Box3Helper",this.box=t;var n=void 0!==e?e:16776960,r=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),i=new Pt;i.setIndex(new gt(r,1)),i.addAttribute("position",new Tt([1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1],3)),me.call(this,i,new de({color:n})),this.geometry.computeBoundingSphere(),this.onBeforeRender()}function ti(t,e,n){this.type="PlaneHelper",this.plane=t,this.size=void 0===e?1:e;var r=void 0!==n?n:16776960,i=new Pt;i.addAttribute("position",new Tt([1,-1,1,-1,1,1,-1,-1,1,1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,0,0,1,0,0,0],3)),i.computeBoundingSphere(),fe.call(this,i,new de({color:r}));var o=new Pt;o.addAttribute("position",new Tt([1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1],3)),o.computeBoundingSphere(),this.add(new kt(o,new Nt({color:r,opacity:.2,transparent:!0,depthWrite:!1}))),this.onBeforeRender()}function ei(t,e,n,r,i,o){lt.call(this),void 0===r&&(r=16776960),void 0===n&&(n=1),void 0===i&&(i=.2*n),void 0===o&&(o=.2*i),void 0===Ds&&((Ds=new Pt).addAttribute("position",new Tt([0,0,0,0,1,0],3)),(Us=new nn(0,.5,1,5,1)).translate(0,-.5,0)),this.position.copy(e),this.line=new fe(Ds,new de({color:r})),this.line.matrixAutoUpdate=!1,this.add(this.line),this.cone=new kt(Us,new Nt({color:r})),this.cone.matrixAutoUpdate=!1,this.add(this.cone),this.setDirection(t),this.setLength(n,i,o)}function ni(t){var e=[0,0,0,t=t||1,0,0,0,0,0,0,t,0,0,0,0,0,0,t],n=new Pt;n.addAttribute("position",new Tt(e,3)),n.addAttribute("color",new Tt([1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],3));var r=new de({vertexColors:ro});me.call(this,n,r)}function ri(){function t(t,o,a,s){e=t,n=a,r=-3*t+3*o-2*a-s,i=2*t-2*o+a+s}var e=0,n=0,r=0,i=0;return{initCatmullRom:function(e,n,r,i,o){t(n,r,o*(r-e),o*(i-n))},initNonuniformCatmullRom:function(e,n,r,i,o,a,s){var u=(n-e)/o-(r-e)/(o+a)+(r-n)/a,c=(r-n)/a-(i-n)/(a+s)+(i-r)/s;t(n,r,u*=a,c*=a)},calc:function(t){var o=t*t;return e+n*t+r*o+i*(o*t)}}}function ii(t){nr.call(this),t.length<2&&console.warn("THREE.CatmullRomCurve3: Points array needs at least two entries."),this.points=t||[],this.closed=!1}function oi(t,e,n,r){nr.call(this),this.v0=t,this.v1=e,this.v2=n,this.v3=r}function ai(t,e,n){nr.call(this),this.v0=t,this.v1=e,this.v2=n}function si(t,e){nr.call(this),this.v1=t,this.v2=e}function ui(t,e,n,r,i,o){or.call(this,t,e,n,n,r,i,o)}function ci(t,e,n,r,i,o,a){return console.warn("THREE.Face4 has been removed. A THREE.Face3 will be created instead."),new ft(t,e,n,i,o,a)}function li(t){return console.warn("THREE.MeshFaceMaterial has been removed. Use an Array instead."),t}function hi(t){return void 0===t&&(t=[]),console.warn("THREE.MultiMaterial has been removed. Use an Array instead."),t.isMultiMaterial=!0,t.materials=t,t.clone=function(){return t.slice()},t}function pi(t,e){return console.warn("THREE.PointCloud has been renamed to THREE.Points."),new ye(t,e)}function di(t){return console.warn("THREE.Particle has been renamed to THREE.Sprite."),new ue(t)}function fi(t,e){return console.warn("THREE.ParticleSystem has been renamed to THREE.Points."),new ye(t,e)}function mi(t){return console.warn("THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial."),new ge(t)}function vi(t){return console.warn("THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial."),new ge(t)}function gi(t){return console.warn("THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial."),new ge(t)}function yi(t,e,n){return console.warn("THREE.Vertex has been removed. Use THREE.Vector3 instead."),new l(t,e,n)}function _i(t,e){return console.warn("THREE.DynamicBufferAttribute has been removed. Use new THREE.BufferAttribute().setDynamic( true ) instead."),new gt(t,e).setDynamic(!0)}function bi(t,e){return console.warn("THREE.Int8Attribute has been removed. Use new THREE.Int8BufferAttribute() instead."),new yt(t,e)}function xi(t,e){return console.warn("THREE.Uint8Attribute has been removed. Use new THREE.Uint8BufferAttribute() instead."),new _t(t,e)}function wi(t,e){return console.warn("THREE.Uint8ClampedAttribute has been removed. Use new THREE.Uint8ClampedBufferAttribute() instead."),new bt(t,e)}function Ei(t,e){return console.warn("THREE.Int16Attribute has been removed. Use new THREE.Int16BufferAttribute() instead."),new xt(t,e)}function Mi(t,e){return console.warn("THREE.Uint16Attribute has been removed. Use new THREE.Uint16BufferAttribute() instead."),new wt(t,e)}function Ti(t,e){return console.warn("THREE.Int32Attribute has been removed. Use new THREE.Int32BufferAttribute() instead."),new Et(t,e)}function Si(t,e){return console.warn("THREE.Uint32Attribute has been removed. Use new THREE.Uint32BufferAttribute() instead."),new Mt(t,e)}function Ci(t,e){return console.warn("THREE.Float32Attribute has been removed. Use new THREE.Float32BufferAttribute() instead."),new Tt(t,e)}function Ai(t,e){return console.warn("THREE.Float64Attribute has been removed. Use new THREE.Float64BufferAttribute() instead."),new St(t,e)}function Pi(t){console.warn("THREE.ClosedSplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead."),ii.call(this,t),this.type="catmullrom",this.closed=!0}function Ri(t){console.warn("THREE.SplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead."),ii.call(this,t),this.type="catmullrom"}function Li(t){console.warn("THREE.Spline has been removed. Use THREE.CatmullRomCurve3 instead."),ii.call(this,t),this.type="catmullrom"}function Ii(t,e){return console.warn("THREE.BoundingBoxHelper has been deprecated. Creating a THREE.BoxHelper instead."),new Qr(t,e)}function Oi(t,e){return console.warn("THREE.EdgesHelper has been removed. Use THREE.EdgesGeometry instead."),new me(new tn(t.geometry),new de({color:void 0!==e?e:16777215}))}function Ni(t,e){return console.warn("THREE.WireframeHelper has been removed. Use THREE.WireframeGeometry instead."),new me(new Ee(t.geometry),new de({color:void 0!==e?e:16777215}))}function Di(t){return console.warn("THREE.XHRLoader has been renamed to THREE.FileLoader."),new yn(t)}function Ui(t){return console.warn("THREE.BinaryTextureLoader has been renamed to THREE.DataTextureLoader."),new bn(t)}function Fi(){console.error("THREE.Projector has been moved to /examples/js/renderers/Projector.js."),this.projectVector=function(t,e){console.warn("THREE.Projector: .projectVector() is now vector.project()."),t.project(e)},this.unprojectVector=function(t,e){console.warn("THREE.Projector: .unprojectVector() is now vector.unproject()."),t.unproject(e)},this.pickingRay=function(){console.error("THREE.Projector: .pickingRay() is now raycaster.setFromCamera().")}}function ki(){console.error("THREE.CanvasRenderer has been moved to /examples/js/renderers/CanvasRenderer.js"),this.domElement=document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),this.clear=function(){},this.render=function(){},this.setClearColor=function(){},this.setSize=function(){}}Object.defineProperty(e,"__esModule",{value:!0}),n.d(e,"WebGLRenderTargetCube",function(){return u}),n.d(e,"WebGLRenderTarget",function(){return s}),n.d(e,"WebGLRenderer",function(){return ne}),n.d(e,"ShaderLib",function(){return vs}),n.d(e,"UniformsLib",function(){return ds}),n.d(e,"UniformsUtils",function(){return fs}),n.d(e,"ShaderChunk",function(){return ms}),n.d(e,"FogExp2",function(){return re}),n.d(e,"Fog",function(){return ie}),n.d(e,"Scene",function(){return oe}),n.d(e,"LensFlare",function(){return ae}),n.d(e,"Sprite",function(){return ue}),n.d(e,"LOD",function(){return ce}),n.d(e,"SkinnedMesh",function(){return pe}),n.d(e,"Skeleton",function(){return le}),n.d(e,"Bone",function(){return he}),n.d(e,"Mesh",function(){return kt}),n.d(e,"LineSegments",function(){return me}),n.d(e,"LineLoop",function(){return ve}),n.d(e,"Line",function(){return fe}),n.d(e,"Points",function(){return ye}),n.d(e,"Group",function(){return _e}),n.d(e,"VideoTexture",function(){return be}),n.d(e,"DataTexture",function(){return p}),n.d(e,"CompressedTexture",function(){return xe}),n.d(e,"CubeTexture",function(){return d}),n.d(e,"CanvasTexture",function(){return K}),n.d(e,"DepthTexture",function(){return we}),n.d(e,"Texture",function(){return o}),n.d(e,"CompressedTextureLoader",function(){return _n}),n.d(e,"DataTextureLoader",function(){return bn}),n.d(e,"CubeTextureLoader",function(){return wn}),n.d(e,"TextureLoader",function(){return En}),n.d(e,"ObjectLoader",function(){return Qn}),n.d(e,"MaterialLoader",function(){return Yn}),n.d(e,"BufferGeometryLoader",function(){return Kn}),n.d(e,"DefaultLoadingManager",function(){return Ts}),n.d(e,"LoadingManager",function(){return gn}),n.d(e,"JSONLoader",function(){return Jn}),n.d(e,"ImageLoader",function(){return xn}),n.d(e,"FontLoader",function(){return dr}),n.d(e,"FileLoader",function(){return yn}),n.d(e,"Loader",function(){return Zn}),n.d(e,"Cache",function(){return Ms}),n.d(e,"AudioLoader",function(){return fr}),n.d(e,"SpotLightShadow",function(){return Cn}),n.d(e,"SpotLight",function(){return An}),n.d(e,"PointLight",function(){return Pn}),n.d(e,"RectAreaLight",function(){return On}),n.d(e,"HemisphereLight",function(){return Tn}),n.d(e,"DirectionalLightShadow",function(){return Rn}),n.d(e,"DirectionalLight",function(){return Ln}),n.d(e,"AmbientLight",function(){return In}),n.d(e,"LightShadow",function(){return Sn}),n.d(e,"Light",function(){return Mn}),n.d(e,"StereoCamera",function(){return mr}),n.d(e,"PerspectiveCamera",function(){return dt}),n.d(e,"OrthographicCamera",function(){return pt}),n.d(e,"CubeCamera",function(){return vr}),n.d(e,"ArrayCamera",function(){return te}),n.d(e,"Camera",function(){return ht}),n.d(e,"AudioListener",function(){return gr}),n.d(e,"PositionalAudio",function(){return _r}),n.d(e,"AudioContext",function(){return Ns}),n.d(e,"AudioAnalyser",function(){return br}),n.d(e,"Audio",function(){return yr}),n.d(e,"VectorKeyframeTrack",function(){return zn}),n.d(e,"StringKeyframeTrack",function(){return jn}),n.d(e,"QuaternionKeyframeTrack",function(){return Hn}),n.d(e,"NumberKeyframeTrack",function(){return Gn}),n.d(e,"ColorKeyframeTrack",function(){return Wn}),n.d(e,"BooleanKeyframeTrack",function(){return Vn}),n.d(e,"PropertyMixer",function(){return xr}),n.d(e,"PropertyBinding",function(){return Er}),n.d(e,"KeyframeTrack",function(){return qn}),n.d(e,"AnimationUtils",function(){return Ss}),n.d(e,"AnimationObjectGroup",function(){return Mr}),n.d(e,"AnimationMixer",function(){return Sr}),n.d(e,"AnimationClip",function(){return Xn}),n.d(e,"Uniform",function(){return Cr}),n.d(e,"InstancedBufferGeometry",function(){return Ar}),n.d(e,"BufferGeometry",function(){return Pt}),n.d(e,"GeometryIdCount",function(){return mt}),n.d(e,"Geometry",function(){return vt}),n.d(e,"InterleavedBufferAttribute",function(){return Pr}),n.d(e,"InstancedInterleavedBuffer",function(){return Lr}),n.d(e,"InterleavedBuffer",function(){return Rr}),n.d(e,"InstancedBufferAttribute",function(){return Ir}),n.d(e,"Face3",function(){return ft}),n.d(e,"Object3D",function(){return lt}),n.d(e,"Raycaster",function(){return Or}),n.d(e,"Layers",function(){return ct}),n.d(e,"EventDispatcher",function(){return r}),n.d(e,"Clock",function(){return Ur}),n.d(e,"QuaternionLinearInterpolant",function(){return Bn}),n.d(e,"LinearInterpolant",function(){return Un}),n.d(e,"DiscreteInterpolant",function(){return Fn}),n.d(e,"CubicInterpolant",function(){return Dn}),n.d(e,"Interpolant",function(){return Nn}),n.d(e,"Triangle",function(){return Ft}),n.d(e,"Math",function(){return rs}),n.d(e,"Spherical",function(){return Fr}),n.d(e,"Cylindrical",function(){return kr}),n.d(e,"Plane",function(){return it}),n.d(e,"Frustum",function(){return ot}),n.d(e,"Sphere",function(){return nt}),n.d(e,"Ray",function(){return Dt}),n.d(e,"Matrix4",function(){return h}),n.d(e,"Matrix3",function(){return rt}),n.d(e,"Box3",function(){return et}),n.d(e,"Box2",function(){return X}),n.d(e,"Line3",function(){return Ut}),n.d(e,"Euler",function(){return ut}),n.d(e,"Vector4",function(){return a}),n.d(e,"Vector3",function(){return l}),n.d(e,"Vector2",function(){return i}),n.d(e,"Quaternion",function(){return c}),n.d(e,"Color",function(){return q}),n.d(e,"ImmediateRenderObject",function(){return zr}),n.d(e,"VertexNormalsHelper",function(){return Br}),n.d(e,"SpotLightHelper",function(){return Hr}),n.d(e,"SkeletonHelper",function(){return jr}),n.d(e,"PointLightHelper",function(){return Vr}),n.d(e,"RectAreaLightHelper",function(){return Wr}),n.d(e,"HemisphereLightHelper",function(){return qr}),n.d(e,"GridHelper",function(){return Xr}),n.d(e,"PolarGridHelper",function(){return Yr}),n.d(e,"FaceNormalsHelper",function(){return Kr}),n.d(e,"DirectionalLightHelper",function(){return Zr}),n.d(e,"CameraHelper",function(){return Jr}),n.d(e,"BoxHelper",function(){return Qr}),n.d(e,"Box3Helper",function(){return $r}),n.d(e,"PlaneHelper",function(){return ti}),n.d(e,"ArrowHelper",function(){return ei}),n.d(e,"AxisHelper",function(){return ni}),n.d(e,"CatmullRomCurve3",function(){return ii}),n.d(e,"CubicBezierCurve3",function(){return oi}),n.d(e,"QuadraticBezierCurve3",function(){return ai}),n.d(e,"LineCurve3",function(){return si}),n.d(e,"ArcCurve",function(){return ui}),n.d(e,"EllipseCurve",function(){return or}),n.d(e,"SplineCurve",function(){return ar}),n.d(e,"CubicBezierCurve",function(){return sr}),n.d(e,"QuadraticBezierCurve",function(){return ur}),n.d(e,"LineCurve",function(){return rr}),n.d(e,"Shape",function(){return lr}),n.d(e,"Path",function(){return cr}),n.d(e,"ShapePath",function(){return hr}),n.d(e,"Font",function(){return pr}),n.d(e,"CurvePath",function(){return ir}),n.d(e,"Curve",function(){return nr}),n.d(e,"ShapeUtils",function(){return xs}),n.d(e,"SceneUtils",function(){return Hs}),n.d(e,"WebGLUtils",function(){return ee}),n.d(e,"WireframeGeometry",function(){return Ee}),n.d(e,"ParametricGeometry",function(){return Me}),n.d(e,"ParametricBufferGeometry",function(){return Te}),n.d(e,"TetrahedronGeometry",function(){return Ae}),n.d(e,"TetrahedronBufferGeometry",function(){return Pe}),n.d(e,"OctahedronGeometry",function(){return Re}),n.d(e,"OctahedronBufferGeometry",function(){return Le}),n.d(e,"IcosahedronGeometry",function(){return Ie}),n.d(e,"IcosahedronBufferGeometry",function(){return Oe}),n.d(e,"DodecahedronGeometry",function(){return Ne}),n.d(e,"DodecahedronBufferGeometry",function(){return De}),n.d(e,"PolyhedronGeometry",function(){return Se}),n.d(e,"PolyhedronBufferGeometry",function(){return Ce}),n.d(e,"TubeGeometry",function(){return Ue}),n.d(e,"TubeBufferGeometry",function(){return Fe}),n.d(e,"TorusKnotGeometry",function(){return ke}),n.d(e,"TorusKnotBufferGeometry",function(){return ze}),n.d(e,"TorusGeometry",function(){return Be}),n.d(e,"TorusBufferGeometry",function(){return He}),n.d(e,"TextGeometry",function(){return Ve}),n.d(e,"TextBufferGeometry",function(){return We}),n.d(e,"SphereGeometry",function(){return qe}),n.d(e,"SphereBufferGeometry",function(){return Xe}),n.d(e,"RingGeometry",function(){return Ye}),n.d(e,"RingBufferGeometry",function(){return Ke}),n.d(e,"PlaneGeometry",function(){return It}),n.d(e,"PlaneBufferGeometry",function(){return Ot}),n.d(e,"LatheGeometry",function(){return Ze}),n.d(e,"LatheBufferGeometry",function(){return Je}),n.d(e,"ShapeGeometry",function(){return Qe}),n.d(e,"ShapeBufferGeometry",function(){return $e}),n.d(e,"ExtrudeGeometry",function(){return Ge}),n.d(e,"ExtrudeBufferGeometry",function(){return je}),n.d(e,"EdgesGeometry",function(){return tn}),n.d(e,"ConeGeometry",function(){return rn}),n.d(e,"ConeBufferGeometry",function(){return on}),n.d(e,"CylinderGeometry",function(){return en}),n.d(e,"CylinderBufferGeometry",function(){return nn}),n.d(e,"CircleGeometry",function(){return an}),n.d(e,"CircleBufferGeometry",function(){return sn}),n.d(e,"BoxGeometry",function(){return Rt}),n.d(e,"BoxBufferGeometry",function(){return Lt}),n.d(e,"ShadowMaterial",function(){return un}),n.d(e,"SpriteMaterial",function(){return se}),n.d(e,"RawShaderMaterial",function(){return cn}),n.d(e,"ShaderMaterial",function(){return Q}),n.d(e,"PointsMaterial",function(){return ge}),n.d(e,"MeshPhysicalMaterial",function(){return hn}),n.d(e,"MeshStandardMaterial",function(){return ln}),n.d(e,"MeshPhongMaterial",function(){return pn}),n.d(e,"MeshToonMaterial",function(){return dn}),n.d(e,"MeshNormalMaterial",function(){return fn}),n.d(e,"MeshLambertMaterial",function(){return mn}),n.d(e,"MeshDepthMaterial",function(){return $}),n.d(e,"MeshDistanceMaterial",function(){return tt}),n.d(e,"MeshBasicMaterial",function(){return Nt}),n.d(e,"LineDashedMaterial",function(){return vn}),n.d(e,"LineBasicMaterial",function(){return de}),n.d(e,"Material",function(){return J}),n.d(e,"Float64BufferAttribute",function(){return St}),n.d(e,"Float32BufferAttribute",function(){return Tt}),n.d(e,"Uint32BufferAttribute",function(){return Mt}),n.d(e,"Int32BufferAttribute",function(){return Et}),n.d(e,"Uint16BufferAttribute",function(){return wt}),n.d(e,"Int16BufferAttribute",function(){return xt}),n.d(e,"Uint8ClampedBufferAttribute",function(){return bt}),n.d(e,"Uint8BufferAttribute",function(){return _t}),n.d(e,"Int8BufferAttribute",function(){return yt}),n.d(e,"BufferAttribute",function(){return gt}),n.d(e,"REVISION",function(){return zi}),n.d(e,"MOUSE",function(){return Bi}),n.d(e,"CullFaceNone",function(){return Hi}),n.d(e,"CullFaceBack",function(){return Gi}),n.d(e,"CullFaceFront",function(){return ji}),n.d(e,"CullFaceFrontBack",function(){return Vi}),n.d(e,"FrontFaceDirectionCW",function(){return Wi}),n.d(e,"FrontFaceDirectionCCW",function(){return qi}),n.d(e,"BasicShadowMap",function(){return Xi}),n.d(e,"PCFShadowMap",function(){return Yi}),n.d(e,"PCFSoftShadowMap",function(){return Ki}),n.d(e,"FrontSide",function(){return Zi}),n.d(e,"BackSide",function(){return Ji}),n.d(e,"DoubleSide",function(){return Qi}),n.d(e,"FlatShading",function(){return $i}),n.d(e,"SmoothShading",function(){return to}),n.d(e,"NoColors",function(){return eo}),n.d(e,"FaceColors",function(){return no}),n.d(e,"VertexColors",function(){return ro}),n.d(e,"NoBlending",function(){return io}),n.d(e,"NormalBlending",function(){return oo}),n.d(e,"AdditiveBlending",function(){return ao}),n.d(e,"SubtractiveBlending",function(){return so}),n.d(e,"MultiplyBlending",function(){return uo}),n.d(e,"CustomBlending",function(){return co}),n.d(e,"AddEquation",function(){return lo}),n.d(e,"SubtractEquation",function(){return ho}),n.d(e,"ReverseSubtractEquation",function(){return po}),n.d(e,"MinEquation",function(){return fo}),n.d(e,"MaxEquation",function(){return mo}),n.d(e,"ZeroFactor",function(){return vo}),n.d(e,"OneFactor",function(){return go}),n.d(e,"SrcColorFactor",function(){return yo}),n.d(e,"OneMinusSrcColorFactor",function(){return _o}),n.d(e,"SrcAlphaFactor",function(){return bo}),n.d(e,"OneMinusSrcAlphaFactor",function(){return xo}),n.d(e,"DstAlphaFactor",function(){return wo}),n.d(e,"OneMinusDstAlphaFactor",function(){return Eo}),n.d(e,"DstColorFactor",function(){return Mo}),n.d(e,"OneMinusDstColorFactor",function(){return To}),n.d(e,"SrcAlphaSaturateFactor",function(){return So}),n.d(e,"NeverDepth",function(){return Co}),n.d(e,"AlwaysDepth",function(){return Ao}),n.d(e,"LessDepth",function(){return Po}),n.d(e,"LessEqualDepth",function(){return Ro}),n.d(e,"EqualDepth",function(){return Lo}),n.d(e,"GreaterEqualDepth",function(){return Io}),n.d(e,"GreaterDepth",function(){return Oo}),n.d(e,"NotEqualDepth",function(){return No}),n.d(e,"MultiplyOperation",function(){return Do}),n.d(e,"MixOperation",function(){return Uo}),n.d(e,"AddOperation",function(){return Fo}),n.d(e,"NoToneMapping",function(){return ko}),n.d(e,"LinearToneMapping",function(){return zo}),n.d(e,"ReinhardToneMapping",function(){return Bo}),n.d(e,"Uncharted2ToneMapping",function(){return Ho}),n.d(e,"CineonToneMapping",function(){return Go}),n.d(e,"UVMapping",function(){return jo}),n.d(e,"CubeReflectionMapping",function(){return Vo}),n.d(e,"CubeRefractionMapping",function(){return Wo}),n.d(e,"EquirectangularReflectionMapping",function(){return qo}),n.d(e,"EquirectangularRefractionMapping",function(){return Xo}),n.d(e,"SphericalReflectionMapping",function(){return Yo}),n.d(e,"CubeUVReflectionMapping",function(){return Ko}),n.d(e,"CubeUVRefractionMapping",function(){return Zo}),n.d(e,"RepeatWrapping",function(){return Jo}),n.d(e,"ClampToEdgeWrapping",function(){return Qo}),n.d(e,"MirroredRepeatWrapping",function(){return $o}),n.d(e,"NearestFilter",function(){return ta}),n.d(e,"NearestMipMapNearestFilter",function(){return ea}),n.d(e,"NearestMipMapLinearFilter",function(){return na}),n.d(e,"LinearFilter",function(){return ra}),n.d(e,"LinearMipMapNearestFilter",function(){return ia}),n.d(e,"LinearMipMapLinearFilter",function(){return oa}),n.d(e,"UnsignedByteType",function(){return aa}),n.d(e,"ByteType",function(){return sa}),n.d(e,"ShortType",function(){return ua}),n.d(e,"UnsignedShortType",function(){return ca}),n.d(e,"IntType",function(){return la}),n.d(e,"UnsignedIntType",function(){return ha}),n.d(e,"FloatType",function(){return pa}),n.d(e,"HalfFloatType",function(){return da}),n.d(e,"UnsignedShort4444Type",function(){return fa}),n.d(e,"UnsignedShort5551Type",function(){return ma}),n.d(e,"UnsignedShort565Type",function(){return va}),n.d(e,"UnsignedInt248Type",function(){return ga}),n.d(e,"AlphaFormat",function(){return ya}),n.d(e,"RGBFormat",function(){return _a}),n.d(e,"RGBAFormat",function(){return ba}),n.d(e,"LuminanceFormat",function(){return xa}),n.d(e,"LuminanceAlphaFormat",function(){return wa}),n.d(e,"RGBEFormat",function(){return Ea}),n.d(e,"DepthFormat",function(){return Ma}),n.d(e,"DepthStencilFormat",function(){return Ta}),n.d(e,"RGB_S3TC_DXT1_Format",function(){return Sa}),n.d(e,"RGBA_S3TC_DXT1_Format",function(){return Ca}),n.d(e,"RGBA_S3TC_DXT3_Format",function(){return Aa}),n.d(e,"RGBA_S3TC_DXT5_Format",function(){return Pa}),n.d(e,"RGB_PVRTC_4BPPV1_Format",function(){return Ra}),n.d(e,"RGB_PVRTC_2BPPV1_Format",function(){return La}),n.d(e,"RGBA_PVRTC_4BPPV1_Format",function(){return Ia}),n.d(e,"RGBA_PVRTC_2BPPV1_Format",function(){return Oa}),n.d(e,"RGB_ETC1_Format",function(){return Na}),n.d(e,"LoopOnce",function(){return Da}),n.d(e,"LoopRepeat",function(){return Ua}),n.d(e,"LoopPingPong",function(){return Fa}),n.d(e,"InterpolateDiscrete",function(){return ka}),n.d(e,"InterpolateLinear",function(){return za}),n.d(e,"InterpolateSmooth",function(){return Ba}),n.d(e,"ZeroCurvatureEnding",function(){return Ha}),n.d(e,"ZeroSlopeEnding",function(){return Ga}),n.d(e,"WrapAroundEnding",function(){return ja}),n.d(e,"TrianglesDrawMode",function(){return Va}),n.d(e,"TriangleStripDrawMode",function(){return Wa}),n.d(e,"TriangleFanDrawMode",function(){return qa}),n.d(e,"LinearEncoding",function(){return Xa}),n.d(e,"sRGBEncoding",function(){return Ya}),n.d(e,"GammaEncoding",function(){return Ka}),n.d(e,"RGBEEncoding",function(){return Za}),n.d(e,"LogLuvEncoding",function(){return Ja}),n.d(e,"RGBM7Encoding",function(){return Qa}),n.d(e,"RGBM16Encoding",function(){return $a}),n.d(e,"RGBDEncoding",function(){return ts}),n.d(e,"BasicDepthPacking",function(){return es}),n.d(e,"RGBADepthPacking",function(){return ns}),n.d(e,"CubeGeometry",function(){return Rt}),n.d(e,"Face4",function(){return ci}),n.d(e,"LineStrip",function(){return Gs}),n.d(e,"LinePieces",function(){return js}),n.d(e,"MeshFaceMaterial",function(){return li}),n.d(e,"MultiMaterial",function(){return hi}),n.d(e,"PointCloud",function(){return pi}),n.d(e,"Particle",function(){return di}),n.d(e,"ParticleSystem",function(){return fi}),n.d(e,"PointCloudMaterial",function(){return mi}),n.d(e,"ParticleBasicMaterial",function(){return vi}),n.d(e,"ParticleSystemMaterial",function(){return gi}),n.d(e,"Vertex",function(){return yi}),n.d(e,"DynamicBufferAttribute",function(){return _i}),n.d(e,"Int8Attribute",function(){return bi}),n.d(e,"Uint8Attribute",function(){return xi}),n.d(e,"Uint8ClampedAttribute",function(){return wi}),n.d(e,"Int16Attribute",function(){return Ei}),n.d(e,"Uint16Attribute",function(){return Mi}),n.d(e,"Int32Attribute",function(){return Ti}),n.d(e,"Uint32Attribute",function(){return Si}),n.d(e,"Float32Attribute",function(){return Ci}),n.d(e,"Float64Attribute",function(){return Ai}),n.d(e,"ClosedSplineCurve3",function(){return Pi}),n.d(e,"SplineCurve3",function(){return Ri}),n.d(e,"Spline",function(){return Li}),n.d(e,"BoundingBoxHelper",function(){return Ii}),n.d(e,"EdgesHelper",function(){return Oi}),n.d(e,"WireframeHelper",function(){return Ni}),n.d(e,"XHRLoader",function(){return Di}),n.d(e,"BinaryTextureLoader",function(){return Ui}),n.d(e,"GeometryUtils",function(){return Vs}),n.d(e,"ImageUtils",function(){return Ws}),n.d(e,"Projector",function(){return Fi}),n.d(e,"CanvasRenderer",function(){return ki}),void 0===Number.EPSILON&&(Number.EPSILON=Math.pow(2,-52)),void 0===Number.isInteger&&(Number.isInteger=function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t}),void 0===Math.sign&&(Math.sign=function(t){return t<0?-1:t>0?1:+t}),void 0===Function.prototype.name&&Object.defineProperty(Function.prototype,"name",{get:function(){return this.toString().match(/^\s*function\s*([^\(\s]*)/)[1]}}),void 0===Object.assign&&(Object.assign=function(t){if(void 0===t||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),n=1;n<arguments.length;n++){var r=arguments[n];if(void 0!==r&&null!==r)for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e}),Object.assign(r.prototype,{addEventListener:function(t,e){void 0===this._listeners&&(this._listeners={});var 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;var n=this._listeners;return void 0!==n[t]&&-1!==n[t].indexOf(e)},removeEventListener:function(t,e){if(void 0!==this._listeners){var n=this._listeners[t];if(void 0!==n){var r=n.indexOf(e);-1!==r&&n.splice(r,1)}}},dispatchEvent:function(t){if(void 0!==this._listeners){var e=this._listeners[t.type];if(void 0!==e){t.target=this;for(var n=e.slice(0),r=0,i=n.length;r<i;r++)n[r].call(this,t)}}}});var zi="87",Bi={LEFT:0,MIDDLE:1,RIGHT:2},Hi=0,Gi=1,ji=2,Vi=3,Wi=0,qi=1,Xi=0,Yi=1,Ki=2,Zi=0,Ji=1,Qi=2,$i=1,to=2,eo=0,no=1,ro=2,io=0,oo=1,ao=2,so=3,uo=4,co=5,lo=100,ho=101,po=102,fo=103,mo=104,vo=200,go=201,yo=202,_o=203,bo=204,xo=205,wo=206,Eo=207,Mo=208,To=209,So=210,Co=0,Ao=1,Po=2,Ro=3,Lo=4,Io=5,Oo=6,No=7,Do=0,Uo=1,Fo=2,ko=0,zo=1,Bo=2,Ho=3,Go=4,jo=300,Vo=301,Wo=302,qo=303,Xo=304,Yo=305,Ko=306,Zo=307,Jo=1e3,Qo=1001,$o=1002,ta=1003,ea=1004,na=1005,ra=1006,ia=1007,oa=1008,aa=1009,sa=1010,ua=1011,ca=1012,la=1013,ha=1014,pa=1015,da=1016,fa=1017,ma=1018,va=1019,ga=1020,ya=1021,_a=1022,ba=1023,xa=1024,wa=1025,Ea=ba,Ma=1026,Ta=1027,Sa=2001,Ca=2002,Aa=2003,Pa=2004,Ra=2100,La=2101,Ia=2102,Oa=2103,Na=2151,Da=2200,Ua=2201,Fa=2202,ka=2300,za=2301,Ba=2302,Ha=2400,Ga=2401,ja=2402,Va=0,Wa=1,qa=2,Xa=3e3,Ya=3001,Ka=3007,Za=3002,Ja=3003,Qa=3004,$a=3005,ts=3006,es=3200,ns=3201,rs={DEG2RAD:Math.PI/180,RAD2DEG:180/Math.PI,generateUUID:function(){var t,e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),n=new Array(36),r=0;return function(){for(var i=0;i<36;i++)8===i||13===i||18===i||23===i?n[i]="-":14===i?n[i]="4":(r<=2&&(r=33554432+16777216*Math.random()|0),t=15&r,r>>=4,n[i]=e[19===i?3&t|8:t]);return n.join("")}}(),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,r,i){return r+(t-e)*(i-r)/(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())},degToRad:function(t){return t*rs.DEG2RAD},radToDeg:function(t){return t*rs.RAD2DEG},isPowerOfTwo:function(t){return 0==(t&t-1)&&0!==t},nearestPowerOfTwo:function(t){return Math.pow(2,Math.round(Math.log(t)/Math.LN2))},nextPowerOfTwo:function(t){return t--,t|=t>>1,t|=t>>2,t|=t>>4,t|=t>>8,t|=t>>16,++t}};Object.defineProperties(i.prototype,{width:{get:function(){return this.x},set:function(t){this.x=t}},height:{get:function(){return this.y},set:function(t){this.y=t}}}),Object.assign(i.prototype,{isVector2:!0,set:function(t,e){return this.x=t,this.y=e,this},setScalar:function(t){return this.x=t,this.y=t,this},setX:function(t){return this.x=t,this},setY:function(t){return this.y=t,this},setComponent:function(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;default:throw new Error("index is out of range: "+t)}return this},getComponent:function(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y)},copy:function(t){return this.x=t.x,this.y=t.y,this},add:function(t,e){return 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:function(t){return this.x+=t,this.y+=t,this},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this},sub:function(t,e){return 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:function(t){return this.x-=t,this.y-=t,this},subVectors:function(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this},multiplyScalar:function(t){return this.x*=t,this.y*=t,this},divide:function(t){return this.x/=t.x,this.y/=t.y,this},divideScalar:function(t){return this.multiplyScalar(1/t)},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this},clampScalar:function(){var t=new i,e=new i;return function(n,r){return t.set(n,n),e.set(r,r),this.clamp(t,e)}}(),clampLength:function(t,e){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))},floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},roundToZero:function(){return this.x=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:function(){return this.x=-this.x,this.y=-this.y,this},dot:function(t){return this.x*t.x+this.y*t.y},lengthSq:function(){return this.x*this.x+this.y*this.y},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},lengthManhattan:function(){return Math.abs(this.x)+Math.abs(this.y)},normalize:function(){return this.divideScalar(this.length()||1)},angle:function(){var t=Math.atan2(this.y,this.x);return t<0&&(t+=2*Math.PI),t},distanceTo:function(t){return Math.sqrt(this.distanceToSquared(t))},distanceToSquared:function(t){var e=this.x-t.x,n=this.y-t.y;return e*e+n*n},distanceToManhattan:function(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)},setLength:function(t){return this.normalize().multiplyScalar(t)},lerp:function(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this},lerpVectors:function(t,e,n){return this.subVectors(e,t).multiplyScalar(n).add(t)},equals:function(t){return t.x===this.x&&t.y===this.y},fromArray:function(t,e){return void 0===e&&(e=0),this.x=t[e],this.y=t[e+1],this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this.x,t[e+1]=this.y,t},fromBufferAttribute:function(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:function(t,e){var n=Math.cos(e),r=Math.sin(e),i=this.x-t.x,o=this.y-t.y;return this.x=i*n-o*r+t.x,this.y=i*r+o*n+t.y,this}});var is=0;o.DEFAULT_IMAGE=void 0,o.DEFAULT_MAPPING=jo,Object.defineProperty(o.prototype,"needsUpdate",{set:function(t){!0===t&&this.version++}}),Object.assign(o.prototype,r.prototype,{constructor:o,isTexture:!0,clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.name=t.name,this.image=t.image,this.mipmaps=t.mipmaps.slice(0),this.mapping=t.mapping,this.wrapS=t.wrapS,this.wrapT=t.wrapT,this.magFilter=t.magFilter,this.minFilter=t.minFilter,this.anisotropy=t.anisotropy,this.format=t.format,this.type=t.type,this.offset.copy(t.offset),this.repeat.copy(t.repeat),this.generateMipmaps=t.generateMipmaps,this.premultiplyAlpha=t.premultiplyAlpha,this.flipY=t.flipY,this.unpackAlignment=t.unpackAlignment,this.encoding=t.encoding,this},toJSON:function(t){if(void 0!==t.textures[this.uuid])return t.textures[this.uuid];var e={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],wrap:[this.wrapS,this.wrapT],minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY};if(void 0!==this.image){var n=this.image;void 0===n.uuid&&(n.uuid=rs.generateUUID()),void 0===t.images[n.uuid]&&(t.images[n.uuid]={uuid:n.uuid,url:function(t){var e;if(t instanceof HTMLCanvasElement)e=t;else{(e=document.createElementNS("http://www.w3.org/1999/xhtml","canvas")).width=t.width,e.height=t.height;var n=e.getContext("2d");t instanceof ImageData?n.putImageData(t,0,0):n.drawImage(t,0,0,t.width,t.height)}return e.width>2048||e.height>2048?e.toDataURL("image/jpeg",.6):e.toDataURL("image/png")}(n)}),e.image=n.uuid}return t.textures[this.uuid]=e,e},dispose:function(){this.dispatchEvent({type:"dispose"})},transformUv:function(t){if(this.mapping===jo){if(t.multiply(this.repeat),t.add(this.offset),t.x<0||t.x>1)switch(this.wrapS){case Jo:t.x=t.x-Math.floor(t.x);break;case Qo:t.x=t.x<0?0:1;break;case $o: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 Jo:t.y=t.y-Math.floor(t.y);break;case Qo:t.y=t.y<0?0:1;break;case $o:1===Math.abs(Math.floor(t.y)%2)?t.y=Math.ceil(t.y)-t.y:t.y=t.y-Math.floor(t.y)}this.flipY&&(t.y=1-t.y)}}}),Object.assign(a.prototype,{isVector4:!0,set:function(t,e,n,r){return this.x=t,this.y=e,this.z=n,this.w=r,this},setScalar:function(t){return this.x=t,this.y=t,this.z=t,this.w=t,this},setX:function(t){return this.x=t,this},setY:function(t){return this.y=t,this},setZ:function(t){return this.z=t,this},setW:function(t){return this.w=t,this},setComponent:function(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;case 3:this.w=e;break;default:throw new Error("index is out of range: "+t)}return this},getComponent:function(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y,this.z,this.w)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=void 0!==t.w?t.w:1,this},add:function(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:function(t){return this.x+=t,this.y+=t,this.z+=t,this.w+=t,this},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this.w=t.w+e.w,this},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this.w+=t.w*e,this},sub:function(t,e){return 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:function(t){return this.x-=t,this.y-=t,this.z-=t,this.w-=t,this},subVectors:function(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this.w=t.w-e.w,this},multiplyScalar:function(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this},applyMatrix4:function(t){var e=this.x,n=this.y,r=this.z,i=this.w,o=t.elements;return this.x=o[0]*e+o[4]*n+o[8]*r+o[12]*i,this.y=o[1]*e+o[5]*n+o[9]*r+o[13]*i,this.z=o[2]*e+o[6]*n+o[10]*r+o[14]*i,this.w=o[3]*e+o[7]*n+o[11]*r+o[15]*i,this},divideScalar:function(t){return this.multiplyScalar(1/t)},setAxisAngleFromQuaternion:function(t){this.w=2*Math.acos(t.w);var e=Math.sqrt(1-t.w*t.w);return 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:function(t){var e,n,r,i,o=t.elements,a=o[0],s=o[4],u=o[8],c=o[1],l=o[5],h=o[9],p=o[2],d=o[6],f=o[10];if(Math.abs(s-c)<.01&&Math.abs(u-p)<.01&&Math.abs(h-d)<.01){if(Math.abs(s+c)<.1&&Math.abs(u+p)<.1&&Math.abs(h+d)<.1&&Math.abs(a+l+f-3)<.1)return this.set(1,0,0,0),this;e=Math.PI;var m=(a+1)/2,v=(l+1)/2,g=(f+1)/2,y=(s+c)/4,_=(u+p)/4,b=(h+d)/4;return m>v&&m>g?m<.01?(n=0,r=.707106781,i=.707106781):(r=y/(n=Math.sqrt(m)),i=_/n):v>g?v<.01?(n=.707106781,r=0,i=.707106781):(n=y/(r=Math.sqrt(v)),i=b/r):g<.01?(n=.707106781,r=.707106781,i=0):(n=_/(i=Math.sqrt(g)),r=b/i),this.set(n,r,i,e),this}var x=Math.sqrt((d-h)*(d-h)+(u-p)*(u-p)+(c-s)*(c-s));return Math.abs(x)<.001&&(x=1),this.x=(d-h)/x,this.y=(u-p)/x,this.z=(c-s)/x,this.w=Math.acos((a+l+f-1)/2),this},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this.w=Math.min(this.w,t.w),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this.w=Math.max(this.w,t.w),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this.w=Math.max(t.w,Math.min(e.w,this.w)),this},clampScalar:function(){var t,e;return function(n,r){return void 0===t&&(t=new a,e=new a),t.set(n,n,n,n),e.set(r,r,r,r),this.clamp(t,e)}}(),clampLength:function(t,e){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))},floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this},roundToZero:function(){return this.x=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:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)},lengthManhattan:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)},normalize:function(){return this.divideScalar(this.length()||1)},setLength:function(t){return this.normalize().multiplyScalar(t)},lerp:function(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this.w+=(t.w-this.w)*e,this},lerpVectors:function(t,e,n){return this.subVectors(e,t).multiplyScalar(n).add(t)},equals:function(t){return t.x===this.x&&t.y===this.y&&t.z===this.z&&t.w===this.w},fromArray:function(t,e){return void 0===e&&(e=0),this.x=t[e],this.y=t[e+1],this.z=t[e+2],this.w=t[e+3],this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t[e+3]=this.w,t},fromBufferAttribute:function(t,e,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}}),Object.assign(s.prototype,r.prototype,{isWebGLRenderTarget:!0,setSize:function(t,e){this.width===t&&this.height===e||(this.width=t,this.height=e,this.dispose()),this.viewport.set(0,0,t,e),this.scissor.set(0,0,t,e)},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.width=t.width,this.height=t.height,this.viewport.copy(t.viewport),this.texture=t.texture.clone(),this.depthBuffer=t.depthBuffer,this.stencilBuffer=t.stencilBuffer,this.depthTexture=t.depthTexture,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),(u.prototype=Object.create(s.prototype)).constructor=u,u.prototype.isWebGLRenderTargetCube=!0,Object.assign(c,{slerp:function(t,e,n,r){return n.copy(t).slerp(e,r)},slerpFlat:function(t,e,n,r,i,o,a){var s=n[r+0],u=n[r+1],c=n[r+2],l=n[r+3],h=i[o+0],p=i[o+1],d=i[o+2],f=i[o+3];if(l!==f||s!==h||u!==p||c!==d){var m=1-a,v=s*h+u*p+c*d+l*f,g=v>=0?1:-1,y=1-v*v;if(y>Number.EPSILON){var _=Math.sqrt(y),b=Math.atan2(_,v*g);m=Math.sin(m*b)/_,a=Math.sin(a*b)/_}var x=a*g;if(s=s*m+h*x,u=u*m+p*x,c=c*m+d*x,l=l*m+f*x,m===1-a){var w=1/Math.sqrt(s*s+u*u+c*c+l*l);s*=w,u*=w,c*=w,l*=w}}t[e]=s,t[e+1]=u,t[e+2]=c,t[e+3]=l}}),Object.defineProperties(c.prototype,{x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback()}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback()}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback()}},w:{get:function(){return this._w},set:function(t){this._w=t,this.onChangeCallback()}}}),Object.assign(c.prototype,{set:function(t,e,n,r){return this._x=t,this._y=e,this._z=n,this._w=r,this.onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._w)},copy:function(t){return this._x=t.x,this._y=t.y,this._z=t.z,this._w=t.w,this.onChangeCallback(),this},setFromEuler:function(t,e){if(!t||!t.isEuler)throw new Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");var n=t._x,r=t._y,i=t._z,o=t.order,a=Math.cos,s=Math.sin,u=a(n/2),c=a(r/2),l=a(i/2),h=s(n/2),p=s(r/2),d=s(i/2);return"XYZ"===o?(this._x=h*c*l+u*p*d,this._y=u*p*l-h*c*d,this._z=u*c*d+h*p*l,this._w=u*c*l-h*p*d):"YXZ"===o?(this._x=h*c*l+u*p*d,this._y=u*p*l-h*c*d,this._z=u*c*d-h*p*l,this._w=u*c*l+h*p*d):"ZXY"===o?(this._x=h*c*l-u*p*d,this._y=u*p*l+h*c*d,this._z=u*c*d+h*p*l,this._w=u*c*l-h*p*d):"ZYX"===o?(this._x=h*c*l-u*p*d,this._y=u*p*l+h*c*d,this._z=u*c*d-h*p*l,this._w=u*c*l+h*p*d):"YZX"===o?(this._x=h*c*l+u*p*d,this._y=u*p*l+h*c*d,this._z=u*c*d-h*p*l,this._w=u*c*l-h*p*d):"XZY"===o&&(this._x=h*c*l-u*p*d,this._y=u*p*l-h*c*d,this._z=u*c*d+h*p*l,this._w=u*c*l+h*p*d),!1!==e&&this.onChangeCallback(),this},setFromAxisAngle:function(t,e){var n=e/2,r=Math.sin(n);return this._x=t.x*r,this._y=t.y*r,this._z=t.z*r,this._w=Math.cos(n),this.onChangeCallback(),this},setFromRotationMatrix:function(t){var e,n=t.elements,r=n[0],i=n[4],o=n[8],a=n[1],s=n[5],u=n[9],c=n[2],l=n[6],h=n[10],p=r+s+h;return p>0?(e=.5/Math.sqrt(p+1),this._w=.25/e,this._x=(l-u)*e,this._y=(o-c)*e,this._z=(a-i)*e):r>s&&r>h?(e=2*Math.sqrt(1+r-s-h),this._w=(l-u)/e,this._x=.25*e,this._y=(i+a)/e,this._z=(o+c)/e):s>h?(e=2*Math.sqrt(1+s-r-h),this._w=(o-c)/e,this._x=(i+a)/e,this._y=.25*e,this._z=(u+l)/e):(e=2*Math.sqrt(1+h-r-s),this._w=(a-i)/e,this._x=(o+c)/e,this._y=(u+l)/e,this._z=.25*e),this.onChangeCallback(),this},setFromUnitVectors:function(){var t,e=new l;return function(n,r){return void 0===e&&(e=new l),(t=n.dot(r)+1)<1e-6?(t=0,Math.abs(n.x)>Math.abs(n.z)?e.set(-n.y,n.x,0):e.set(0,-n.z,n.y)):e.crossVectors(n,r),this._x=e.x,this._y=e.y,this._z=e.z,this._w=t,this.normalize()}}(),inverse:function(){return this.conjugate().normalize()},conjugate:function(){return this._x*=-1,this._y*=-1,this._z*=-1,this.onChangeCallback(),this},dot:function(t){return this._x*t._x+this._y*t._y+this._z*t._z+this._w*t._w},lengthSq:function(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w},length:function(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)},normalize:function(){var t=this.length();return 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:function(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:function(t){return this.multiplyQuaternions(t,this)},multiplyQuaternions:function(t,e){var n=t._x,r=t._y,i=t._z,o=t._w,a=e._x,s=e._y,u=e._z,c=e._w;return this._x=n*c+o*a+r*u-i*s,this._y=r*c+o*s+i*a-n*u,this._z=i*c+o*u+n*s-r*a,this._w=o*c-n*a-r*s-i*u,this.onChangeCallback(),this},slerp:function(t,e){if(0===e)return this;if(1===e)return this.copy(t);var n=this._x,r=this._y,i=this._z,o=this._w,a=o*t._w+n*t._x+r*t._y+i*t._z;if(a<0?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,a=-a):this.copy(t),a>=1)return this._w=o,this._x=n,this._y=r,this._z=i,this;var s=Math.sqrt(1-a*a);if(Math.abs(s)<.001)return this._w=.5*(o+this._w),this._x=.5*(n+this._x),this._y=.5*(r+this._y),this._z=.5*(i+this._z),this;var u=Math.atan2(s,a),c=Math.sin((1-e)*u)/s,l=Math.sin(e*u)/s;return this._w=o*c+this._w*l,this._x=n*c+this._x*l,this._y=r*c+this._y*l,this._z=i*c+this._z*l,this.onChangeCallback(),this},equals:function(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._w===this._w},fromArray:function(t,e){return void 0===e&&(e=0),this._x=t[e],this._y=t[e+1],this._z=t[e+2],this._w=t[e+3],this.onChangeCallback(),this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._w,t},onChange:function(t){return this.onChangeCallback=t,this},onChangeCallback:function(){}}),Object.assign(l.prototype,{isVector3:!0,set:function(t,e,n){return this.x=t,this.y=e,this.z=n,this},setScalar:function(t){return this.x=t,this.y=t,this.z=t,this},setX:function(t){return this.x=t,this},setY:function(t){return this.y=t,this},setZ:function(t){return this.z=t,this},setComponent:function(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;default:throw new Error("index is out of range: "+t)}return this},getComponent:function(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y,this.z)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this},add:function(t,e){return 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:function(t){return this.x+=t,this.y+=t,this.z+=t,this},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this},sub:function(t,e){return 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:function(t){return this.x-=t,this.y-=t,this.z-=t,this},subVectors:function(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this},multiply:function(t,e){return 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:function(t){return this.x*=t,this.y*=t,this.z*=t,this},multiplyVectors:function(t,e){return this.x=t.x*e.x,this.y=t.y*e.y,this.z=t.z*e.z,this},applyEuler:function(){var t=new c;return function(e){return e&&e.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."),this.applyQuaternion(t.setFromEuler(e))}}(),applyAxisAngle:function(){var t=new c;return function(e,n){return this.applyQuaternion(t.setFromAxisAngle(e,n))}}(),applyMatrix3:function(t){var e=this.x,n=this.y,r=this.z,i=t.elements;return this.x=i[0]*e+i[3]*n+i[6]*r,this.y=i[1]*e+i[4]*n+i[7]*r,this.z=i[2]*e+i[5]*n+i[8]*r,this},applyMatrix4:function(t){var e=this.x,n=this.y,r=this.z,i=t.elements,o=1/(i[3]*e+i[7]*n+i[11]*r+i[15]);return this.x=(i[0]*e+i[4]*n+i[8]*r+i[12])*o,this.y=(i[1]*e+i[5]*n+i[9]*r+i[13])*o,this.z=(i[2]*e+i[6]*n+i[10]*r+i[14])*o,this},applyQuaternion:function(t){var e=this.x,n=this.y,r=this.z,i=t.x,o=t.y,a=t.z,s=t.w,u=s*e+o*r-a*n,c=s*n+a*e-i*r,l=s*r+i*n-o*e,h=-i*e-o*n-a*r;return this.x=u*s+h*-i+c*-a-l*-o,this.y=c*s+h*-o+l*-i-u*-a,this.z=l*s+h*-a+u*-o-c*-i,this},project:function(){var t=new h;return function(e){return t.multiplyMatrices(e.projectionMatrix,t.getInverse(e.matrixWorld)),this.applyMatrix4(t)}}(),unproject:function(){var t=new h;return function(e){return t.multiplyMatrices(e.matrixWorld,t.getInverse(e.projectionMatrix)),this.applyMatrix4(t)}}(),transformDirection:function(t){var e=this.x,n=this.y,r=this.z,i=t.elements;return this.x=i[0]*e+i[4]*n+i[8]*r,this.y=i[1]*e+i[5]*n+i[9]*r,this.z=i[2]*e+i[6]*n+i[10]*r,this.normalize()},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this},divideScalar:function(t){return this.multiplyScalar(1/t)},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this},clampScalar:function(){var t=new l,e=new l;return function(n,r){return t.set(n,n,n),e.set(r,r,r),this.clamp(t,e)}}(),clampLength:function(t,e){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))},floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this},roundToZero:function(){return this.x=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:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},lengthManhattan:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)},normalize:function(){return this.divideScalar(this.length()||1)},setLength:function(t){return this.normalize().multiplyScalar(t)},lerp:function(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this},lerpVectors:function(t,e,n){return this.subVectors(e,t).multiplyScalar(n).add(t)},cross:function(t,e){if(void 0!==e)return console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(t,e);var n=this.x,r=this.y,i=this.z;return this.x=r*t.z-i*t.y,this.y=i*t.x-n*t.z,this.z=n*t.y-r*t.x,this},crossVectors:function(t,e){var n=t.x,r=t.y,i=t.z,o=e.x,a=e.y,s=e.z;return this.x=r*s-i*a,this.y=i*o-n*s,this.z=n*a-r*o,this},projectOnVector:function(t){var e=t.dot(this)/t.lengthSq();return this.copy(t).multiplyScalar(e)},projectOnPlane:function(){var t=new l;return function(e){return t.copy(this).projectOnVector(e),this.sub(t)}}(),reflect:function(){var t=new l;return function(e){return this.sub(t.copy(e).multiplyScalar(2*this.dot(e)))}}(),angleTo:function(t){var e=this.dot(t)/Math.sqrt(this.lengthSq()*t.lengthSq());return Math.acos(rs.clamp(e,-1,1))},distanceTo:function(t){return Math.sqrt(this.distanceToSquared(t))},distanceToSquared:function(t){var e=this.x-t.x,n=this.y-t.y,r=this.z-t.z;return e*e+n*n+r*r},distanceToManhattan:function(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)},setFromSpherical:function(t){var e=Math.sin(t.phi)*t.radius;return this.x=e*Math.sin(t.theta),this.y=Math.cos(t.phi)*t.radius,this.z=e*Math.cos(t.theta),this},setFromCylindrical:function(t){return this.x=t.radius*Math.sin(t.theta),this.y=t.y,this.z=t.radius*Math.cos(t.theta),this},setFromMatrixPosition:function(t){var e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this},setFromMatrixScale:function(t){var e=this.setFromMatrixColumn(t,0).length(),n=this.setFromMatrixColumn(t,1).length(),r=this.setFromMatrixColumn(t,2).length();return this.x=e,this.y=n,this.z=r,this},setFromMatrixColumn:function(t,e){return this.fromArray(t.elements,4*e)},equals:function(t){return t.x===this.x&&t.y===this.y&&t.z===this.z},fromArray:function(t,e){return void 0===e&&(e=0),this.x=t[e],this.y=t[e+1],this.z=t[e+2],this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t},fromBufferAttribute:function(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}}),Object.assign(h.prototype,{isMatrix4:!0,set:function(t,e,n,r,i,o,a,s,u,c,l,h,p,d,f,m){var v=this.elements;return v[0]=t,v[4]=e,v[8]=n,v[12]=r,v[1]=i,v[5]=o,v[9]=a,v[13]=s,v[2]=u,v[6]=c,v[10]=l,v[14]=h,v[3]=p,v[7]=d,v[11]=f,v[15]=m,this},identity:function(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this},clone:function(){return(new h).fromArray(this.elements)},copy:function(t){var 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:function(t){var e=this.elements,n=t.elements;return e[12]=n[12],e[13]=n[13],e[14]=n[14],this},extractBasis:function(t,e,n){return t.setFromMatrixColumn(this,0),e.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this},makeBasis:function(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:function(){var t=new l;return function(e){var n=this.elements,r=e.elements,i=1/t.setFromMatrixColumn(e,0).length(),o=1/t.setFromMatrixColumn(e,1).length(),a=1/t.setFromMatrixColumn(e,2).length();return n[0]=r[0]*i,n[1]=r[1]*i,n[2]=r[2]*i,n[4]=r[4]*o,n[5]=r[5]*o,n[6]=r[6]*o,n[8]=r[8]*a,n[9]=r[9]*a,n[10]=r[10]*a,this}}(),makeRotationFromEuler:function(t){t&&t.isEuler||console.error("THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");var e=this.elements,n=t.x,r=t.y,i=t.z,o=Math.cos(n),a=Math.sin(n),s=Math.cos(r),u=Math.sin(r),c=Math.cos(i),l=Math.sin(i);if("XYZ"===t.order){var h=o*c,p=o*l,d=a*c,f=a*l;e[0]=s*c,e[4]=-s*l,e[8]=u,e[1]=p+d*u,e[5]=h-f*u,e[9]=-a*s,e[2]=f-h*u,e[6]=d+p*u,e[10]=o*s}else if("YXZ"===t.order){var m=s*c,v=s*l,g=u*c,y=u*l;e[0]=m+y*a,e[4]=g*a-v,e[8]=o*u,e[1]=o*l,e[5]=o*c,e[9]=-a,e[2]=v*a-g,e[6]=y+m*a,e[10]=o*s}else if("ZXY"===t.order){var m=s*c,v=s*l,g=u*c,y=u*l;e[0]=m-y*a,e[4]=-o*l,e[8]=g+v*a,e[1]=v+g*a,e[5]=o*c,e[9]=y-m*a,e[2]=-o*u,e[6]=a,e[10]=o*s}else if("ZYX"===t.order){var h=o*c,p=o*l,d=a*c,f=a*l;e[0]=s*c,e[4]=d*u-p,e[8]=h*u+f,e[1]=s*l,e[5]=f*u+h,e[9]=p*u-d,e[2]=-u,e[6]=a*s,e[10]=o*s}else if("YZX"===t.order){var _=o*s,b=o*u,x=a*s,w=a*u;e[0]=s*c,e[4]=w-_*l,e[8]=x*l+b,e[1]=l,e[5]=o*c,e[9]=-a*c,e[2]=-u*c,e[6]=b*l+x,e[10]=_-w*l}else if("XZY"===t.order){var _=o*s,b=o*u,x=a*s,w=a*u;e[0]=s*c,e[4]=-l,e[8]=u*c,e[1]=_*l+w,e[5]=o*c,e[9]=b*l-x,e[2]=x*l-b,e[6]=a*c,e[10]=w*l+_}return e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this},makeRotationFromQuaternion:function(t){var e=this.elements,n=t._x,r=t._y,i=t._z,o=t._w,a=n+n,s=r+r,u=i+i,c=n*a,l=n*s,h=n*u,p=r*s,d=r*u,f=i*u,m=o*a,v=o*s,g=o*u;return e[0]=1-(p+f),e[4]=l-g,e[8]=h+v,e[1]=l+g,e[5]=1-(c+f),e[9]=d-m,e[2]=h-v,e[6]=d+m,e[10]=1-(c+p),e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this},lookAt:function(){var t=new l,e=new l,n=new l;return function(r,i,o){var a=this.elements;return n.subVectors(r,i),0===n.lengthSq()&&(n.z=1),n.normalize(),t.crossVectors(o,n),0===t.lengthSq()&&(1===Math.abs(o.z)?n.x+=1e-4:n.z+=1e-4,n.normalize(),t.crossVectors(o,n)),t.normalize(),e.crossVectors(n,t),a[0]=t.x,a[4]=e.x,a[8]=n.x,a[1]=t.y,a[5]=e.y,a[9]=n.y,a[2]=t.z,a[6]=e.z,a[10]=n.z,this}}(),multiply:function(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:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,e){var n=t.elements,r=e.elements,i=this.elements,o=n[0],a=n[4],s=n[8],u=n[12],c=n[1],l=n[5],h=n[9],p=n[13],d=n[2],f=n[6],m=n[10],v=n[14],g=n[3],y=n[7],_=n[11],b=n[15],x=r[0],w=r[4],E=r[8],M=r[12],T=r[1],S=r[5],C=r[9],A=r[13],P=r[2],R=r[6],L=r[10],I=r[14],O=r[3],N=r[7],D=r[11],U=r[15];return i[0]=o*x+a*T+s*P+u*O,i[4]=o*w+a*S+s*R+u*N,i[8]=o*E+a*C+s*L+u*D,i[12]=o*M+a*A+s*I+u*U,i[1]=c*x+l*T+h*P+p*O,i[5]=c*w+l*S+h*R+p*N,i[9]=c*E+l*C+h*L+p*D,i[13]=c*M+l*A+h*I+p*U,i[2]=d*x+f*T+m*P+v*O,i[6]=d*w+f*S+m*R+v*N,i[10]=d*E+f*C+m*L+v*D,i[14]=d*M+f*A+m*I+v*U,i[3]=g*x+y*T+_*P+b*O,i[7]=g*w+y*S+_*R+b*N,i[11]=g*E+y*C+_*L+b*D,i[15]=g*M+y*A+_*I+b*U,this},multiplyScalar:function(t){var e=this.elements;return e[0]*=t,e[4]*=t,e[8]*=t,e[12]*=t,e[1]*=t,e[5]*=t,e[9]*=t,e[13]*=t,e[2]*=t,e[6]*=t,e[10]*=t,e[14]*=t,e[3]*=t,e[7]*=t,e[11]*=t,e[15]*=t,this},applyToBufferAttribute:function(){var t=new l;return function(e){for(var n=0,r=e.count;n<r;n++)t.x=e.getX(n),t.y=e.getY(n),t.z=e.getZ(n),t.applyMatrix4(this),e.setXYZ(n,t.x,t.y,t.z);return e}}(),determinant:function(){var t=this.elements,e=t[0],n=t[4],r=t[8],i=t[12],o=t[1],a=t[5],s=t[9],u=t[13],c=t[2],l=t[6],h=t[10],p=t[14];return t[3]*(+i*s*l-r*u*l-i*a*h+n*u*h+r*a*p-n*s*p)+t[7]*(+e*s*p-e*u*h+i*o*h-r*o*p+r*u*c-i*s*c)+t[11]*(+e*u*l-e*a*p-i*o*l+n*o*p+i*a*c-n*u*c)+t[15]*(-r*a*c-e*s*l+e*a*h+r*o*l-n*o*h+n*s*c)},transpose:function(){var t,e=this.elements;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this},setPosition:function(t){var e=this.elements;return e[12]=t.x,e[13]=t.y,e[14]=t.z,this},getInverse:function(t,e){var n=this.elements,r=t.elements,i=r[0],o=r[1],a=r[2],s=r[3],u=r[4],c=r[5],l=r[6],h=r[7],p=r[8],d=r[9],f=r[10],m=r[11],v=r[12],g=r[13],y=r[14],_=r[15],b=d*y*h-g*f*h+g*l*m-c*y*m-d*l*_+c*f*_,x=v*f*h-p*y*h-v*l*m+u*y*m+p*l*_-u*f*_,w=p*g*h-v*d*h+v*c*m-u*g*m-p*c*_+u*d*_,E=v*d*l-p*g*l-v*c*f+u*g*f+p*c*y-u*d*y,M=i*b+o*x+a*w+s*E;if(0===M){var T="THREE.Matrix4: .getInverse() can't invert matrix, determinant is 0";if(!0===e)throw new Error(T);return console.warn(T),this.identity()}var S=1/M;return n[0]=b*S,n[1]=(g*f*s-d*y*s-g*a*m+o*y*m+d*a*_-o*f*_)*S,n[2]=(c*y*s-g*l*s+g*a*h-o*y*h-c*a*_+o*l*_)*S,n[3]=(d*l*s-c*f*s-d*a*h+o*f*h+c*a*m-o*l*m)*S,n[4]=x*S,n[5]=(p*y*s-v*f*s+v*a*m-i*y*m-p*a*_+i*f*_)*S,n[6]=(v*l*s-u*y*s-v*a*h+i*y*h+u*a*_-i*l*_)*S,n[7]=(u*f*s-p*l*s+p*a*h-i*f*h-u*a*m+i*l*m)*S,n[8]=w*S,n[9]=(v*d*s-p*g*s-v*o*m+i*g*m+p*o*_-i*d*_)*S,n[10]=(u*g*s-v*c*s+v*o*h-i*g*h-u*o*_+i*c*_)*S,n[11]=(p*c*s-u*d*s-p*o*h+i*d*h+u*o*m-i*c*m)*S,n[12]=E*S,n[13]=(p*g*a-v*d*a+v*o*f-i*g*f-p*o*y+i*d*y)*S,n[14]=(v*c*a-u*g*a-v*o*l+i*g*l+u*o*y-i*c*y)*S,n[15]=(u*d*a-p*c*a+p*o*l-i*d*l-u*o*f+i*c*f)*S,this},scale:function(t){var e=this.elements,n=t.x,r=t.y,i=t.z;return e[0]*=n,e[4]*=r,e[8]*=i,e[1]*=n,e[5]*=r,e[9]*=i,e[2]*=n,e[6]*=r,e[10]*=i,e[3]*=n,e[7]*=r,e[11]*=i,this},getMaxScaleOnAxis:function(){var 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],r=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(e,n,r))},makeTranslation:function(t,e,n){return this.set(1,0,0,t,0,1,0,e,0,0,1,n,0,0,0,1),this},makeRotationX:function(t){var 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:function(t){var 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:function(t){var 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:function(t,e){var n=Math.cos(e),r=Math.sin(e),i=1-n,o=t.x,a=t.y,s=t.z,u=i*o,c=i*a;return this.set(u*o+n,u*a-r*s,u*s+r*a,0,u*a+r*s,c*a+n,c*s-r*o,0,u*s-r*a,c*s+r*o,i*s*s+n,0,0,0,0,1),this},makeScale:function(t,e,n){return this.set(t,0,0,0,0,e,0,0,0,0,n,0,0,0,0,1),this},makeShear:function(t,e,n){return this.set(1,e,n,0,t,1,n,0,t,e,1,0,0,0,0,1),this},compose:function(t,e,n){return this.makeRotationFromQuaternion(e),this.scale(n),this.setPosition(t),this},decompose:function(){var t=new l,e=new h;return function(n,r,i){var o=this.elements,a=t.set(o[0],o[1],o[2]).length(),s=t.set(o[4],o[5],o[6]).length(),u=t.set(o[8],o[9],o[10]).length();this.determinant()<0&&(a=-a),n.x=o[12],n.y=o[13],n.z=o[14],e.copy(this);var c=1/a,l=1/s,h=1/u;return e.elements[0]*=c,e.elements[1]*=c,e.elements[2]*=c,e.elements[4]*=l,e.elements[5]*=l,e.elements[6]*=l,e.elements[8]*=h,e.elements[9]*=h,e.elements[10]*=h,r.setFromRotationMatrix(e),i.x=a,i.y=s,i.z=u,this}}(),makePerspective:function(t,e,n,r,i,o){void 0===o&&console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.");var a=this.elements,s=2*i/(e-t),u=2*i/(n-r),c=(e+t)/(e-t),l=(n+r)/(n-r),h=-(o+i)/(o-i),p=-2*o*i/(o-i);return a[0]=s,a[4]=0,a[8]=c,a[12]=0,a[1]=0,a[5]=u,a[9]=l,a[13]=0,a[2]=0,a[6]=0,a[10]=h,a[14]=p,a[3]=0,a[7]=0,a[11]=-1,a[15]=0,this},makeOrthographic:function(t,e,n,r,i,o){var a=this.elements,s=1/(e-t),u=1/(n-r),c=1/(o-i),l=(e+t)*s,h=(n+r)*u,p=(o+i)*c;return a[0]=2*s,a[4]=0,a[8]=0,a[12]=-l,a[1]=0,a[5]=2*u,a[9]=0,a[13]=-h,a[2]=0,a[6]=0,a[10]=-2*c,a[14]=-p,a[3]=0,a[7]=0,a[11]=0,a[15]=1,this},equals:function(t){for(var e=this.elements,n=t.elements,r=0;r<16;r++)if(e[r]!==n[r])return!1;return!0},fromArray:function(t,e){void 0===e&&(e=0);for(var n=0;n<16;n++)this.elements[n]=t[n+e];return this},toArray:function(t,e){void 0===t&&(t=[]),void 0===e&&(e=0);var 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}}),(p.prototype=Object.create(o.prototype)).constructor=p,p.prototype.isDataTexture=!0,(d.prototype=Object.create(o.prototype)).constructor=d,d.prototype.isCubeTexture=!0,Object.defineProperty(d.prototype,"images",{get:function(){return this.image},set:function(t){this.image=t}});var os=new o,as=new d,ss=[],us=[],cs=new Float32Array(16),ls=new Float32Array(9);G.prototype.setValue=function(t,e){for(var n=this.seq,r=0,i=n.length;r!==i;++r){var o=n[r];o.setValue(t,e[o.id])}};var hs=/([\w\d_]+)(\])?(\[|\.)?/g;W.prototype.setValue=function(t,e,n){var r=this.map[e];void 0!==r&&r.setValue(t,n,this.renderer)},W.prototype.setOptional=function(t,e,n){var r=e[n];void 0!==r&&this.setValue(t,n,r)},W.upload=function(t,e,n,r){for(var i=0,o=e.length;i!==o;++i){var a=e[i],s=n[a.id];!1!==s.needsUpdate&&a.setValue(t,s.value,r)}},W.seqWithValue=function(t,e){for(var n=[],r=0,i=t.length;r!==i;++r){var o=t[r];o.id in e&&n.push(o)}return n};var ps={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Object.assign(q.prototype,{isColor:!0,r:1,g:1,b:1,set:function(t){return t&&t.isColor?this.copy(t):"number"==typeof t?this.setHex(t):"string"==typeof t&&this.setStyle(t),this},setScalar:function(t){return this.r=t,this.g=t,this.b=t,this},setHex:function(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:function(t,e,n){return this.r=t,this.g=e,this.b=n,this},setHSL:function(){function t(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}return function(e,n,r){if(e=rs.euclideanModulo(e,1),n=rs.clamp(n,0,1),r=rs.clamp(r,0,1),0===n)this.r=this.g=this.b=r;else{var i=r<=.5?r*(1+n):r+n-r*n,o=2*r-i;this.r=t(o,i,e+1/3),this.g=t(o,i,e),this.b=t(o,i,e-1/3)}return this}}(),setStyle:function(t){function e(e){void 0!==e&&parseFloat(e)<1&&console.warn("THREE.Color: Alpha component of "+t+" will be ignored.")}var n;if(n=/^((?:rgb|hsl)a?)\(\s*([^\)]*)\)/.exec(t)){var r,i=n[1],o=n[2];switch(i){case"rgb":case"rgba":if(r=/^(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(o))return this.r=Math.min(255,parseInt(r[1],10))/255,this.g=Math.min(255,parseInt(r[2],10))/255,this.b=Math.min(255,parseInt(r[3],10))/255,e(r[5]),this;if(r=/^(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(o))return this.r=Math.min(100,parseInt(r[1],10))/100,this.g=Math.min(100,parseInt(r[2],10))/100,this.b=Math.min(100,parseInt(r[3],10))/100,e(r[5]),this;break;case"hsl":case"hsla":if(r=/^([0-9]*\.?[0-9]+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(o)){var a=parseFloat(r[1])/360,s=parseInt(r[2],10)/100,u=parseInt(r[3],10)/100;return e(r[5]),this.setHSL(a,s,u)}}}else if(n=/^\#([A-Fa-f0-9]+)$/.exec(t)){var c=(l=n[1]).length;if(3===c)return this.r=parseInt(l.charAt(0)+l.charAt(0),16)/255,this.g=parseInt(l.charAt(1)+l.charAt(1),16)/255,this.b=parseInt(l.charAt(2)+l.charAt(2),16)/255,this;if(6===c)return this.r=parseInt(l.charAt(0)+l.charAt(1),16)/255,this.g=parseInt(l.charAt(2)+l.charAt(3),16)/255,this.b=parseInt(l.charAt(4)+l.charAt(5),16)/255,this}if(t&&t.length>0){var l=ps[t];void 0!==l?this.setHex(l):console.warn("THREE.Color: Unknown color "+t)}return this},clone:function(){return new this.constructor(this.r,this.g,this.b)},copy:function(t){return this.r=t.r,this.g=t.g,this.b=t.b,this},copyGammaToLinear:function(t,e){return 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:function(t,e){void 0===e&&(e=2);var 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:function(){var t=this.r,e=this.g,n=this.b;return this.r=t*t,this.g=e*e,this.b=n*n,this},convertLinearToGamma:function(){return this.r=Math.sqrt(this.r),this.g=Math.sqrt(this.g),this.b=Math.sqrt(this.b),this},getHex:function(){return 255*this.r<<16^255*this.g<<8^255*this.b<<0},getHexString:function(){return("000000"+this.getHex().toString(16)).slice(-6)},getHSL:function(t){var e,n,r=t||{h:0,s:0,l:0},i=this.r,o=this.g,a=this.b,s=Math.max(i,o,a),u=Math.min(i,o,a),c=(u+s)/2;if(u===s)e=0,n=0;else{var l=s-u;switch(n=c<=.5?l/(s+u):l/(2-s-u),s){case i:e=(o-a)/l+(o<a?6:0);break;case o:e=(a-i)/l+2;break;case a:e=(i-o)/l+4}e/=6}return r.h=e,r.s=n,r.l=c,r},getStyle:function(){return"rgb("+(255*this.r|0)+","+(255*this.g|0)+","+(255*this.b|0)+")"},offsetHSL:function(t,e,n){var r=this.getHSL();return r.h+=t,r.s+=e,r.l+=n,this.setHSL(r.h,r.s,r.l),this},add:function(t){return this.r+=t.r,this.g+=t.g,this.b+=t.b,this},addColors:function(t,e){return this.r=t.r+e.r,this.g=t.g+e.g,this.b=t.b+e.b,this},addScalar:function(t){return this.r+=t,this.g+=t,this.b+=t,this},sub:function(t){return this.r=Math.max(0,this.r-t.r),this.g=Math.max(0,this.g-t.g),this.b=Math.max(0,this.b-t.b),this},multiply:function(t){return this.r*=t.r,this.g*=t.g,this.b*=t.b,this},multiplyScalar:function(t){return this.r*=t,this.g*=t,this.b*=t,this},lerp:function(t,e){return this.r+=(t.r-this.r)*e,this.g+=(t.g-this.g)*e,this.b+=(t.b-this.b)*e,this},equals:function(t){return t.r===this.r&&t.g===this.g&&t.b===this.b},fromArray:function(t,e){return void 0===e&&(e=0),this.r=t[e],this.g=t[e+1],this.b=t[e+2],this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this.r,t[e+1]=this.g,t[e+2]=this.b,t},toJSON:function(){return this.getHex()}});var ds={common:{diffuse:{value:new q(15658734)},opacity:{value:1},map:{value:null},offsetRepeat:{value:new a(0,0,1,1)},alphaMap:{value:null}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},refractionRatio:{value:.98}},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 i(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 q(16777215)}},lights:{ambientLightColor:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{}}},spotShadowMap:{value:[]},spotShadowMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}}},points:{diffuse:{value:new q(15658734)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},offsetRepeat:{value:new a(0,0,1,1)}}},fs={merge:function(t){for(var e={},n=0;n<t.length;n++){var r=this.clone(t[n]);for(var i in r)e[i]=r[i]}return e},clone:function(t){var e={};for(var n in t){e[n]={};for(var r in t[n]){var i=t[n][r];i&&(i.isColor||i.isMatrix3||i.isMatrix4||i.isVector2||i.isVector3||i.isVector4||i.isTexture)?e[n][r]=i.clone():Array.isArray(i)?e[n][r]=i.slice():e[n][r]=i}}return e}},ms={alphamap_fragment:"#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, vUv ).g;\n#endif\n",alphamap_pars_fragment:"#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif\n",alphatest_fragment:"#ifdef ALPHATEST\n\tif ( diffuseColor.a < ALPHATEST ) discard;\n#endif\n",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( PHYSICAL )\n\t\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\t\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.specularRoughness );\n\t#endif\n#endif\n",aomap_pars_fragment:"#ifdef USE_AOMAP\n\tuniform sampler2D aoMap;\n\tuniform float aoMapIntensity;\n#endif",begin_vertex:"\nvec3 transformed = vec3( position );\n",beginnormal_vertex:"\nvec3 objectNormal = vec3( normal );\n",bsdfs:"float punctualLightIntensityToIrradianceFactor( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n\tif( decayExponent > 0.0 ) {\n#if defined ( PHYSICALLY_CORRECT_LIGHTS )\n\t\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\t\tfloat maxDistanceCutoffFactor = pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t\treturn distanceFalloff * maxDistanceCutoffFactor;\n#else\n\t\treturn pow( saturate( -lightDistance / cutoffDistance + 1.0 ), decayExponent );\n#endif\n\t}\n\treturn 1.0;\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}\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 GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\n\tfloat dotNL = saturate( dot( geometry.normal, incidentLight.direction ) );\n\tfloat dotNV = saturate( dot( geometry.normal, 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_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 theta = acos( dot( N, V ) );\n\tvec2 uv = vec2(\n\t\tsqrt( saturate( roughness ) ),\n\t\tsaturate( theta / ( 0.5 * PI ) ) );\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.86267 + (0.49788 + 0.01436 * y ) * y;\n\tfloat b = 3.45068 + (4.18814 + y) * y;\n\tfloat v = a / b;\n\tfloat theta_sintheta = (x > 0.0) ? v : 0.5 * inversesqrt( 1.0 - x * x ) - v;\n\treturn cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 );\n\tmat3 mat = mInv * transpose( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tvec3 result = vec3( LTC_ClippedSphereFormFactor( vectorFormFactor ) );\n\treturn result;\n}\nvec3 BRDF_Specular_GGX_Environment( const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\n\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\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\tvec2 AB = vec2( -1.04, 1.04 ) * a004 + r.zw;\n\treturn specularColor * AB.x + AB.y;\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",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\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n\t\treturn normalize( abs( fDet ) * surf_norm - vGrad );\n\t}\n#endif\n",clipping_planes_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; ++ i ) {\n\t\tvec4 plane = clippingPlanes[ i ];\n\t\tif ( dot( vViewPosition, plane.xyz ) > plane.w ) discard;\n\t}\n\t\t\n\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\tbool clipped = true;\n\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; ++ i ) {\n\t\t\tvec4 plane = clippingPlanes[ i ];\n\t\t\tclipped = ( dot( vViewPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t}\n\t\tif ( clipped ) discard;\n\t\n\t#endif\n#endif\n",clipping_planes_pars_fragment:"#if NUM_CLIPPING_PLANES > 0\n\t#if ! defined( PHYSICAL ) && ! defined( PHONG )\n\t\tvarying vec3 vViewPosition;\n\t#endif\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif\n",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG )\n\tvarying vec3 vViewPosition;\n#endif\n",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n",color_fragment:"#ifdef USE_COLOR\n\tdiffuseColor.rgb *= vColor;\n#endif",color_pars_fragment:"#ifdef USE_COLOR\n\tvarying vec3 vColor;\n#endif\n",color_pars_vertex:"#ifdef USE_COLOR\n\tvarying vec3 vColor;\n#endif",color_vertex:"#ifdef USE_COLOR\n\tvColor.xyz = color.xyz;\n#endif",common:"#define PI 3.14159265359\n#define PI2 6.28318530718\n#define PI_HALF 1.5707963267949\n#define RECIPROCAL_PI 0.31830988618\n#define RECIPROCAL_PI2 0.15915494\n#define LOG2 1.442695\n#define EPSILON 1e-6\n#define saturate(a) clamp( a, 0.0, 1.0 )\n#define whiteCompliment(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}\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};\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 transpose( const in mat3 v ) {\n\tmat3 tmp;\n\ttmp[0] = vec3(v[0].x, v[1].x, v[2].x);\n\ttmp[1] = vec3(v[0].y, v[1].y, v[2].y);\n\ttmp[2] = vec3(v[0].z, v[1].z, v[2].z);\n\treturn tmp;\n}\n",cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\n#define cubeUV_textureSize (1024.0)\nint getFaceFromDirection(vec3 direction) {\n\tvec3 absDirection = abs(direction);\n\tint face = -1;\n\tif( absDirection.x > absDirection.z ) {\n\t\tif(absDirection.x > absDirection.y )\n\t\t\tface = direction.x > 0.0 ? 0 : 3;\n\t\telse\n\t\t\tface = direction.y > 0.0 ? 1 : 4;\n\t}\n\telse {\n\t\tif(absDirection.z > absDirection.y )\n\t\t\tface = direction.z > 0.0 ? 2 : 5;\n\t\telse\n\t\t\tface = direction.y > 0.0 ? 1 : 4;\n\t}\n\treturn face;\n}\n#define cubeUV_maxLods1 (log2(cubeUV_textureSize*0.25) - 1.0)\n#define cubeUV_rangeClamp (exp2((6.0 - 1.0) * 2.0))\nvec2 MipLevelInfo( vec3 vec, float roughnessLevel, float roughness ) {\n\tfloat scale = exp2(cubeUV_maxLods1 - roughnessLevel);\n\tfloat dxRoughness = dFdx(roughness);\n\tfloat dyRoughness = dFdy(roughness);\n\tvec3 dx = dFdx( vec * scale * dxRoughness );\n\tvec3 dy = dFdy( vec * scale * dyRoughness );\n\tfloat d = max( dot( dx, dx ), dot( dy, dy ) );\n\td = clamp(d, 1.0, cubeUV_rangeClamp);\n\tfloat mipLevel = 0.5 * log2(d);\n\treturn vec2(floor(mipLevel), fract(mipLevel));\n}\n#define cubeUV_maxLods2 (log2(cubeUV_textureSize*0.25) - 2.0)\n#define cubeUV_rcpTextureSize (1.0 / cubeUV_textureSize)\nvec2 getCubeUV(vec3 direction, float roughnessLevel, float mipLevel) {\n\tmipLevel = roughnessLevel > cubeUV_maxLods2 - 3.0 ? 0.0 : mipLevel;\n\tfloat a = 16.0 * cubeUV_rcpTextureSize;\n\tvec2 exp2_packed = exp2( vec2( roughnessLevel, mipLevel ) );\n\tvec2 rcp_exp2_packed = vec2( 1.0 ) / exp2_packed;\n\tfloat powScale = exp2_packed.x * exp2_packed.y;\n\tfloat scale = rcp_exp2_packed.x * rcp_exp2_packed.y * 0.25;\n\tfloat mipOffset = 0.75*(1.0 - rcp_exp2_packed.y) * rcp_exp2_packed.x;\n\tbool bRes = mipLevel == 0.0;\n\tscale = bRes && (scale < a) ? a : scale;\n\tvec3 r;\n\tvec2 offset;\n\tint face = getFaceFromDirection(direction);\n\tfloat rcpPowScale = 1.0 / powScale;\n\tif( face == 0) {\n\t\tr = vec3(direction.x, -direction.z, direction.y);\n\t\toffset = vec2(0.0+mipOffset,0.75 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\n\t}\n\telse if( face == 1) {\n\t\tr = vec3(direction.y, direction.x, direction.z);\n\t\toffset = vec2(scale+mipOffset, 0.75 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\n\t}\n\telse if( face == 2) {\n\t\tr = vec3(direction.z, direction.x, direction.y);\n\t\toffset = vec2(2.0*scale+mipOffset, 0.75 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\n\t}\n\telse if( face == 3) {\n\t\tr = vec3(direction.x, direction.z, direction.y);\n\t\toffset = vec2(0.0+mipOffset,0.5 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\n\t}\n\telse if( face == 4) {\n\t\tr = vec3(direction.y, direction.x, -direction.z);\n\t\toffset = vec2(scale+mipOffset, 0.5 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\n\t}\n\telse {\n\t\tr = vec3(direction.z, -direction.x, direction.y);\n\t\toffset = vec2(2.0*scale+mipOffset, 0.5 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\n\t}\n\tr = normalize(r);\n\tfloat texelOffset = 0.5 * cubeUV_rcpTextureSize;\n\tvec2 s = ( r.yz / abs( r.x ) + vec2( 1.0 ) ) * 0.5;\n\tvec2 base = offset + vec2( texelOffset );\n\treturn base + s * ( scale - 2.0 * texelOffset );\n}\n#define cubeUV_maxLods3 (log2(cubeUV_textureSize*0.25) - 3.0)\nvec4 textureCubeUV(vec3 reflectedDirection, float roughness ) {\n\tfloat roughnessVal = roughness* cubeUV_maxLods3;\n\tfloat r1 = floor(roughnessVal);\n\tfloat r2 = r1 + 1.0;\n\tfloat t = fract(roughnessVal);\n\tvec2 mipInfo = MipLevelInfo(reflectedDirection, r1, roughness);\n\tfloat s = mipInfo.y;\n\tfloat level0 = mipInfo.x;\n\tfloat level1 = level0 + 1.0;\n\tlevel1 = level1 > 5.0 ? 5.0 : level1;\n\tlevel0 += min( floor( s + 0.5 ), 5.0 );\n\tvec2 uv_10 = getCubeUV(reflectedDirection, r1, level0);\n\tvec4 color10 = envMapTexelToLinear(texture2D(envMap, uv_10));\n\tvec2 uv_20 = getCubeUV(reflectedDirection, r2, level0);\n\tvec4 color20 = envMapTexelToLinear(texture2D(envMap, uv_20));\n\tvec4 result = mix(color10, color20, t);\n\treturn vec4(result.rgb, 1.0);\n}\n#endif\n",defaultnormal_vertex:"vec3 transformedNormal = normalMatrix * objectNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n",displacementmap_pars_vertex:"#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif\n",displacementmap_vertex:"#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, uv ).x * displacementScale + displacementBias );\n#endif\n",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vUv );\n\temissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb;\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif\n",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif\n",encodings_fragment:" gl_FragColor = linearToOutputTexel( gl_FragColor );\n",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.xyz, vec3( gammaFactor ) ), value.w );\n}\nvec4 LinearToGamma( in vec4 value, in float gammaFactor ) {\n\treturn vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );\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.w );\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.w );\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.xyz * value.w * maxRange, 1.0 );\n}\nvec4 LinearToRGBM( in vec4 value, in float maxRange ) {\n\tfloat maxRGB = max( value.x, 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.x, max( value.g, value.b ) );\n\tfloat D = max( maxRange / maxRGB, 1.0 );\n\tD = min( floor( D ) / 255.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 = value.rgb * cLogLuvM;\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 = Xp_Y_XYZp.rgb * cLogLuvInverseM;\n\treturn vec4( max(vRGB, 0.0), 1.0 );\n}\n",envmap_fragment:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\tvec3 cameraToVertex = normalize( vWorldPosition - cameraPosition );\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToVertex, 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_EQUIREC )\n\t\tvec2 sampleUV;\n\t\treflectVec = normalize( reflectVec );\n\t\tsampleUV.y = asin( clamp( reflectVec.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\t\tsampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\n\t\tvec4 envColor = texture2D( envMap, sampleUV );\n\t#elif defined( ENVMAP_TYPE_SPHERE )\n\t\treflectVec = normalize( reflectVec );\n\t\tvec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0, 0.0, 1.0 ) );\n\t\tvec4 envColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5 );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\tenvColor = envMapTexelToLinear( envColor );\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\n",envmap_pars_fragment:"#if defined( USE_ENVMAP ) || defined( PHYSICAL )\n\tuniform float reflectivity;\n\tuniform float envMapIntensity;\n#endif\n#ifdef USE_ENVMAP\n\t#if ! defined( PHYSICAL ) && ( defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) )\n\t\tvarying vec3 vWorldPosition;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\tuniform float flipEnvMap;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( PHYSICAL )\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif\n",envmap_pars_vertex:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\tvarying vec3 vWorldPosition;\n\t#else\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\t#endif\n#endif\n",envmap_vertex:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\tvWorldPosition = worldPosition.xyz;\n\t#else\n\t\tvec3 cameraToVertex = normalize( worldPosition.xyz - cameraPosition );\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\n",fog_vertex:"\n#ifdef USE_FOG\nfogDepth = -mvPosition.z;\n#endif",fog_pars_vertex:"#ifdef USE_FOG\n varying float fogDepth;\n#endif\n",fog_fragment:"#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = whiteCompliment( exp2( - fogDensity * fogDensity * fogDepth * fogDepth * LOG2 ) );\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\n",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\n",gradientmap_pars_fragment:"#ifdef TOON\n\tuniform sampler2D gradientMap;\n\tvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\t\tfloat dotNL = dot( normal, lightDirection );\n\t\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\t\t#ifdef USE_GRADIENTMAP\n\t\t\treturn texture2D( gradientMap, coord ).rgb;\n\t\t#else\n\t\t\treturn ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 );\n\t\t#endif\n\t}\n#endif\n",lightmap_fragment:"#ifdef USE_LIGHTMAP\n\treflectedLight.indirectDiffuse += PI * texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\n#endif\n",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 = normalize( -mvPosition.xyz );\nGeometricContext backGeometry;\nbackGeometry.position = geometry.position;\nbackGeometry.normal = -geometry.normal;\nbackGeometry.viewDir = geometry.viewDir;\nvLightFront = vec3( 0.0 );\n#ifdef DOUBLE_SIDED\n\tvLightBack = vec3( 0.0 );\n#endif\nIncidentLight directLight;\nfloat dotNL;\nvec3 directLightColor_Diffuse;\n#if NUM_POINT_LIGHTS > 0\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#endif\n#if NUM_SPOT_LIGHTS > 0\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#endif\n#if NUM_DIR_LIGHTS > 0\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#endif\n#if NUM_HEMI_LIGHTS > 0\n\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\tvLightFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry );\n\t\t#endif\n\t}\n#endif\n",lights_pars:"uniform vec3 ambientLightColor;\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\tint shadow;\n\t\tfloat shadowBias;\n\t\tfloat shadowRadius;\n\t\tvec2 shadowMapSize;\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\tint shadow;\n\t\tfloat shadowBias;\n\t\tfloat shadowRadius;\n\t\tvec2 shadowMapSize;\n\t\tfloat shadowCameraNear;\n\t\tfloat shadowCameraFar;\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\tint shadow;\n\t\tfloat shadowBias;\n\t\tfloat shadowRadius;\n\t\tvec2 shadowMapSize;\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 ltcMat;\tuniform sampler2D ltcMag;\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\n#if defined( USE_ENVMAP ) && defined( PHYSICAL )\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\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\n\t\t\tvec4 envMapColor = textureCubeUV( queryVec, 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 blinnShininessExponent, const in int maxMIPLevel ) {\n\t\tfloat maxMIPLevelScalar = float( maxMIPLevel );\n\t\tfloat desiredMIPLevel = maxMIPLevelScalar - 0.79248 - 0.5 * log2( pow2( blinnShininessExponent ) + 1.0 );\n\t\treturn clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );\n\t}\n\tvec3 getLightProbeIndirectRadiance( const in GeometricContext geometry, const in float blinnShininessExponent, const in int maxMIPLevel ) {\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( -geometry.viewDir, geometry.normal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( -geometry.viewDir, geometry.normal, refractionRatio );\n\t\t#endif\n\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\tfloat specularMIPLevel = getSpecularMIPLevel( blinnShininessExponent, 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\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\n\t\t\tvec4 envMapColor = textureCubeUV(queryReflectVec, BlinnExponentToGGXRoughness(blinnShininessExponent));\n\t\t#elif defined( ENVMAP_TYPE_EQUIREC )\n\t\t\tvec2 sampleUV;\n\t\t\tsampleUV.y = asin( clamp( reflectVec.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\t\t\tsampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = texture2DLodEXT( envMap, sampleUV, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = texture2D( envMap, sampleUV, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_SPHERE )\n\t\t\tvec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0,0.0,1.0 ) );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = texture2DLodEXT( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#endif\n\t\treturn envMapColor.rgb * envMapIntensity;\n\t}\n#endif\n",lights_phong_fragment:"BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;\n",lights_phong_pars_fragment:"varying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\nstruct BlinnPhongMaterial {\n\tvec3\tdiffuseColor;\n\tvec3\tspecularColor;\n\tfloat\tspecularShininess;\n\tfloat\tspecularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\t#ifdef TOON\n\t\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\n\t#else\n\t\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\t\tvec3 irradiance = dotNL * directLight.color;\n\t#endif\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)\n",lights_physical_fragment:"PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nmaterial.specularRoughness = clamp( roughnessFactor, 0.04, 1.0 );\n#ifdef STANDARD\n\tmaterial.specularColor = mix( vec3( DEFAULT_SPECULAR_COEFFICIENT ), diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( MAXIMUM_SPECULAR_COEFFICIENT * pow2( reflectivity ) ), diffuseColor.rgb, metalnessFactor );\n\tmaterial.clearCoat = saturate( clearCoat );\tmaterial.clearCoatRoughness = clamp( clearCoatRoughness, 0.04, 1.0 );\n#endif\n",lights_physical_pars_fragment:"struct PhysicalMaterial {\n\tvec3\tdiffuseColor;\n\tfloat\tspecularRoughness;\n\tvec3\tspecularColor;\n\t#ifndef STANDARD\n\t\tfloat clearCoat;\n\t\tfloat clearCoatRoughness;\n\t#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\tfloat norm = texture2D( ltcMag, uv ).a;\n\t\tvec4 t = texture2D( ltcMat, uv );\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( 1, 0, t.y ),\n\t\t\tvec3( 0, t.z, 0 ),\n\t\t\tvec3( t.w, 0, t.x )\n\t\t);\n\t\treflectedLight.directSpecular += lightColor * material.specularColor * norm * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1 ), 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#ifndef STANDARD\n\t\tfloat clearCoatDHR = material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, dotNL );\n\t#else\n\t\tfloat clearCoatDHR = 0.0;\n\t#endif\n\treflectedLight.directSpecular += ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Specular_GGX( directLight, geometry, material.specularColor, material.specularRoughness );\n\treflectedLight.directDiffuse += ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n\t#ifndef STANDARD\n\t\treflectedLight.directSpecular += irradiance * material.clearCoat * BRDF_Specular_GGX( directLight, geometry, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearCoatRoughness );\n\t#endif\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 clearCoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t#ifndef STANDARD\n\t\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\t\tfloat dotNL = dotNV;\n\t\tfloat clearCoatDHR = material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, dotNL );\n\t#else\n\t\tfloat clearCoatDHR = 0.0;\n\t#endif\n\treflectedLight.indirectSpecular += ( 1.0 - clearCoatDHR ) * radiance * BRDF_Specular_GGX_Environment( geometry, material.specularColor, material.specularRoughness );\n\t#ifndef STANDARD\n\t\treflectedLight.indirectSpecular += clearCoatRadiance * material.clearCoat * BRDF_Specular_GGX_Environment( geometry, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearCoatRoughness );\n\t#endif\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\n#define Material_BlinnShininessExponent( material ) GGXRoughnessToBlinnExponent( material.specularRoughness )\n#define Material_ClearCoat_BlinnShininessExponent( material ) GGXRoughnessToBlinnExponent( material.clearCoatRoughness )\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}\n",lights_template:"\nGeometricContext geometry;\ngeometry.position = - vViewPosition;\ngeometry.normal = normal;\ngeometry.viewDir = normalize( vViewPosition );\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointDirectLightIrradiance( pointLight, geometry, directLight );\n\t\t#ifdef USE_SHADOWMAP\n\t\tdirectLight.color *= all( bvec2( pointLight.shadow, directLight.visible ) ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotDirectLightIrradiance( spotLight, geometry, directLight );\n\t\t#ifdef USE_SHADOWMAP\n\t\tdirectLight.color *= all( bvec2( spotLight.shadow, directLight.visible ) ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalDirectLightIrradiance( directionalLight, geometry, directLight );\n\t\t#ifdef USE_SHADOWMAP\n\t\tdirectLight.color *= all( bvec2( directionalLight.shadow, directLight.visible ) ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\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#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\t#ifdef USE_LIGHTMAP\n\t\tvec3 lightMapIrradiance = texture2D( lightMap, vUv2 ).xyz * 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 ( NUM_HEMI_LIGHTS > 0 )\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t}\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( PHYSICAL ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tirradiance += getLightProbeIndirectIrradiance( geometry, 8 );\n\t#endif\n\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\tvec3 radiance = getLightProbeIndirectRadiance( geometry, Material_BlinnShininessExponent( material ), 8 );\n\t#ifndef STANDARD\n\t\tvec3 clearCoatRadiance = getLightProbeIndirectRadiance( geometry, Material_ClearCoat_BlinnShininessExponent( material ), 8 );\n\t#else\n\t\tvec3 clearCoatRadiance = vec3( 0.0 );\n\t#endif\n\tRE_IndirectSpecular( radiance, clearCoatRadiance, geometry, material, reflectedLight );\n#endif\n",logdepthbuf_fragment:"#if defined(USE_LOGDEPTHBUF) && defined(USE_LOGDEPTHBUF_EXT)\n\tgl_FragDepthEXT = log2(vFragDepth) * logDepthBufFC * 0.5;\n#endif",logdepthbuf_pars_fragment:"#ifdef USE_LOGDEPTHBUF\n\tuniform float logDepthBufFC;\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t#endif\n#endif\n",logdepthbuf_pars_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t#endif\n\tuniform float logDepthBufFC;\n#endif",logdepthbuf_vertex:"#ifdef USE_LOGDEPTHBUF\n\tgl_Position.z = log2(max( EPSILON, gl_Position.w + 1.0 )) * logDepthBufFC;\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvFragDepth = 1.0 + gl_Position.w;\n\t#else\n\t\tgl_Position.z = (gl_Position.z - 1.0) * gl_Position.w;\n\t#endif\n#endif\n",map_fragment:"#ifdef USE_MAP\n\tvec4 texelColor = texture2D( map, vUv );\n\ttexelColor = mapTexelToLinear( texelColor );\n\tdiffuseColor *= texelColor;\n#endif\n",map_pars_fragment:"#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n",map_particle_fragment:"#ifdef USE_MAP\n\tvec4 mapTexel = texture2D( map, vec2( gl_PointCoord.x, 1.0 - gl_PointCoord.y ) * offsetRepeat.zw + offsetRepeat.xy );\n\tdiffuseColor *= mapTexelToLinear( mapTexel );\n#endif\n",map_particle_pars_fragment:"#ifdef USE_MAP\n\tuniform vec4 offsetRepeat;\n\tuniform sampler2D map;\n#endif\n",metalnessmap_fragment:"float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif\n",metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\n\tobjectNormal += ( morphNormal0 - normal ) * morphTargetInfluences[ 0 ];\n\tobjectNormal += ( morphNormal1 - normal ) * morphTargetInfluences[ 1 ];\n\tobjectNormal += ( morphNormal2 - normal ) * morphTargetInfluences[ 2 ];\n\tobjectNormal += ( morphNormal3 - normal ) * morphTargetInfluences[ 3 ];\n#endif\n",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n\t#ifndef USE_MORPHNORMALS\n\tuniform float morphTargetInfluences[ 8 ];\n\t#else\n\tuniform float morphTargetInfluences[ 4 ];\n\t#endif\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n\ttransformed += ( morphTarget0 - position ) * morphTargetInfluences[ 0 ];\n\ttransformed += ( morphTarget1 - position ) * morphTargetInfluences[ 1 ];\n\ttransformed += ( morphTarget2 - position ) * morphTargetInfluences[ 2 ];\n\ttransformed += ( morphTarget3 - position ) * morphTargetInfluences[ 3 ];\n\t#ifndef USE_MORPHNORMALS\n\ttransformed += ( morphTarget4 - position ) * morphTargetInfluences[ 4 ];\n\ttransformed += ( morphTarget5 - position ) * morphTargetInfluences[ 5 ];\n\ttransformed += ( morphTarget6 - position ) * morphTargetInfluences[ 6 ];\n\ttransformed += ( morphTarget7 - position ) * morphTargetInfluences[ 7 ];\n\t#endif\n#endif\n",normal_fragment:"#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#endif\n#ifdef USE_NORMALMAP\n\tnormal = perturbNormal2Arb( -vViewPosition, normal );\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( -vViewPosition, normal, dHdxy_fwd() );\n#endif\n",normalmap_pars_fragment:"#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n\tvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm ) {\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\tvec3 S = normalize( q0 * st1.t - q1 * st0.t );\n\t\tvec3 T = normalize( -q0 * st1.s + q1 * st0.s );\n\t\tvec3 N = normalize( surf_norm );\n\t\tvec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\t\tmapN.xy = normalScale * mapN.xy;\n\t\tmat3 tsn = mat3( S, T, N );\n\t\treturn normalize( tsn * mapN );\n\t}\n#endif\n",packing:"vec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 1.0 - 2.0 * rgb.xyz;\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}\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}\n",premultiplied_alpha_fragment:"#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif\n",project_vertex:"vec4 mvPosition = modelViewMatrix * vec4( transformed, 1.0 );\ngl_Position = projectionMatrix * mvPosition;\n",dithering_fragment:"#if defined( DITHERING )\n gl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif\n",dithering_pars_fragment:"#if defined( 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\n",roughnessmap_fragment:"float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\n\troughnessFactor *= texelRoughness.g;\n#endif\n",roughnessmap_pars_fragment:"#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif",shadowmap_pars_fragment:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHTS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ];\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHTS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHTS ];\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHTS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHTS ];\n\t#endif\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n\t}\n\tfloat texture2DShadowLerp( sampler2D depths, vec2 size, vec2 uv, float compare ) {\n\t\tconst vec2 offset = vec2( 0.0, 1.0 );\n\t\tvec2 texelSize = vec2( 1.0 ) / size;\n\t\tvec2 centroidUV = floor( uv * size + 0.5 ) / size;\n\t\tfloat lb = texture2DCompare( depths, centroidUV + texelSize * offset.xx, compare );\n\t\tfloat lt = texture2DCompare( depths, centroidUV + texelSize * offset.xy, compare );\n\t\tfloat rb = texture2DCompare( depths, centroidUV + texelSize * offset.yx, compare );\n\t\tfloat rt = texture2DCompare( depths, centroidUV + texelSize * offset.yy, compare );\n\t\tvec2 f = fract( uv * size + 0.5 );\n\t\tfloat a = mix( lb, lt, f.y );\n\t\tfloat b = mix( rb, rt, f.y );\n\t\tfloat c = mix( a, b, f.x );\n\t\treturn c;\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\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( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, 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( 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 / 9.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\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\tshadow = (\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 9.0 );\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 )\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\n",shadowmap_pars_vertex:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHTS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ];\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\t\tuniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHTS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHTS ];\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHTS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHTS ];\n\t#endif\n#endif\n",shadowmap_vertex:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tvSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n#endif\n",shadowmask_pars_fragment:"float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\tDirectionalLight directionalLight;\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tshadow *= bool( directionalLight.shadow ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\tSpotLight spotLight;\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tshadow *= bool( spotLight.shadow ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t}\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\tPointLight pointLight;\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tshadow *= bool( pointLight.shadow ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t}\n\t#endif\n\t#endif\n\treturn shadow;\n}\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 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\n",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\n",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#endif\n",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 gl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif\n",tonemapping_pars_fragment:"#define saturate(a) clamp( a, 0.0, 1.0 )\nuniform float toneMappingExposure;\nuniform float toneMappingWhitePoint;\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}\n#define Uncharted2Helper( x ) max( ( ( x * ( 0.15 * x + 0.10 * 0.50 ) + 0.20 * 0.02 ) / ( x * ( 0.15 * x + 0.50 ) + 0.20 * 0.30 ) ) - 0.02 / 0.30, vec3( 0.0 ) )\nvec3 Uncharted2ToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( Uncharted2Helper( color ) / Uncharted2Helper( vec3( toneMappingWhitePoint ) ) );\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}\n",uv_pars_fragment:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\n\tvarying vec2 vUv;\n#endif",uv_pars_vertex:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\n\tvarying vec2 vUv;\n\tuniform vec4 offsetRepeat;\n#endif\n",uv_vertex:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\n\tvUv = uv * offsetRepeat.zw + offsetRepeat.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#endif",uv2_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvUv2 = uv2;\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( PHONG ) || defined( PHYSICAL ) || defined( LAMBERT ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP )\n\tvec4 worldPosition = modelMatrix * vec4( transformed, 1.0 );\n#endif\n",cube_frag:"uniform samplerCube tCube;\nuniform float tFlip;\nuniform float opacity;\nvarying vec3 vWorldPosition;\nvoid main() {\n\tgl_FragColor = textureCube( tCube, vec3( tFlip * vWorldPosition.x, vWorldPosition.yz ) );\n\tgl_FragColor.a *= opacity;\n}\n",cube_vert:"varying vec3 vWorldPosition;\n#include <common>\nvoid main() {\n\tvWorldPosition = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n}\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>\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\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( gl_FragCoord.z ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( gl_FragCoord.z );\n\t#endif\n}\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>\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}\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}\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}\n",equirect_frag:"uniform sampler2D tEquirect;\nvarying vec3 vWorldPosition;\n#include <common>\nvoid main() {\n\tvec3 direction = normalize( vWorldPosition );\n\tvec2 sampleUV;\n\tsampleUV.y = asin( clamp( direction.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\tsampleUV.x = atan( direction.z, direction.x ) * RECIPROCAL_PI2 + 0.5;\n\tgl_FragColor = texture2D( tEquirect, sampleUV );\n}\n",equirect_vert:"varying vec3 vWorldPosition;\n#include <common>\nvoid main() {\n\tvWorldPosition = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n}\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 <premultiplied_alpha_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}\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 <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <color_vertex>\n\tvLineDistance = scale * lineDistance;\n\tvec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}\n",meshbasic_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\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_pars_fragment>\n#include <fog_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\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\treflectedLight.indirectDiffuse += texture2D( lightMap, vUv2 ).xyz * 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 <premultiplied_alpha_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}\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}\n",meshlambert_frag:"uniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\nvarying vec3 vLightFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\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_pars_fragment>\n#include <bsdfs>\n#include <lights_pars>\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\treflectedLight.indirectDiffuse = getAmbientLightIrradiance( ambientLightColor );\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}\n",meshlambert_vert:"#define LAMBERT\nvarying vec3 vLightFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\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>\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}\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_pars_fragment>\n#include <gradientmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars>\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>\n\t#include <emissivemap_fragment>\n\t#include <lights_phong_fragment>\n\t#include <lights_template>\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}\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}\n",meshphysical_frag:"#define PHYSICAL\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifndef STANDARD\n\tuniform float clearCoat;\n\tuniform float clearCoatRoughness;\n#endif\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\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_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <cube_uv_reflection_fragment>\n#include <lights_pars>\n#include <lights_physical_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_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#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>\n\t#include <emissivemap_fragment>\n\t#include <lights_physical_fragment>\n\t#include <lights_template>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + 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}\n",meshphysical_vert:"#define PHYSICAL\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}\n",normal_frag:"#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\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>\nvoid main() {\n\t#include <logdepthbuf_fragment>\n\t#include <normal_fragment>\n\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\n}\n",normal_vert:"#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\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>\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#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#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n}\n",points_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <color_pars_fragment>\n#include <map_particle_pars_fragment>\n#include <fog_pars_fragment>\n#include <shadowmap_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 <premultiplied_alpha_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}\n",points_vert:"uniform float size;\nuniform float scale;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <shadowmap_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 <project_vertex>\n\t#ifdef USE_SIZEATTENUATION\n\t\tgl_PointSize = size * ( scale / - mvPosition.z );\n\t#else\n\t\tgl_PointSize = size;\n\t#endif\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}\n",shadow_frag:"uniform vec3 color;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <bsdfs>\n#include <lights_pars>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\nvoid main() {\n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n}\n",shadow_vert:"#include <shadowmap_pars_vertex>\nvoid main() {\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n}\n"},vs={basic:{uniforms:fs.merge([ds.common,ds.specularmap,ds.envmap,ds.aomap,ds.lightmap,ds.fog]),vertexShader:ms.meshbasic_vert,fragmentShader:ms.meshbasic_frag},lambert:{uniforms:fs.merge([ds.common,ds.specularmap,ds.envmap,ds.aomap,ds.lightmap,ds.emissivemap,ds.fog,ds.lights,{emissive:{value:new q(0)}}]),vertexShader:ms.meshlambert_vert,fragmentShader:ms.meshlambert_frag},phong:{uniforms:fs.merge([ds.common,ds.specularmap,ds.envmap,ds.aomap,ds.lightmap,ds.emissivemap,ds.bumpmap,ds.normalmap,ds.displacementmap,ds.gradientmap,ds.fog,ds.lights,{emissive:{value:new q(0)},specular:{value:new q(1118481)},shininess:{value:30}}]),vertexShader:ms.meshphong_vert,fragmentShader:ms.meshphong_frag},standard:{uniforms:fs.merge([ds.common,ds.envmap,ds.aomap,ds.lightmap,ds.emissivemap,ds.bumpmap,ds.normalmap,ds.displacementmap,ds.roughnessmap,ds.metalnessmap,ds.fog,ds.lights,{emissive:{value:new q(0)},roughness:{value:.5},metalness:{value:.5},envMapIntensity:{value:1}}]),vertexShader:ms.meshphysical_vert,fragmentShader:ms.meshphysical_frag},points:{uniforms:fs.merge([ds.points,ds.fog]),vertexShader:ms.points_vert,fragmentShader:ms.points_frag},dashed:{uniforms:fs.merge([ds.common,ds.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:ms.linedashed_vert,fragmentShader:ms.linedashed_frag},depth:{uniforms:fs.merge([ds.common,ds.displacementmap]),vertexShader:ms.depth_vert,fragmentShader:ms.depth_frag},normal:{uniforms:fs.merge([ds.common,ds.bumpmap,ds.normalmap,ds.displacementmap,{opacity:{value:1}}]),vertexShader:ms.normal_vert,fragmentShader:ms.normal_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:ms.cube_vert,fragmentShader:ms.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:ms.equirect_vert,fragmentShader:ms.equirect_frag},distanceRGBA:{uniforms:fs.merge([ds.common,ds.displacementmap,{referencePosition:{value:new l},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:ms.distanceRGBA_vert,fragmentShader:ms.distanceRGBA_frag},shadow:{uniforms:fs.merge([ds.lights,{color:{value:new q(0)},opacity:{value:1}}]),vertexShader:ms.shadow_vert,fragmentShader:ms.shadow_frag}};vs.physical={uniforms:fs.merge([vs.standard.uniforms,{clearCoat:{value:0},clearCoatRoughness:{value:0}}]),vertexShader:ms.meshphysical_vert,fragmentShader:ms.meshphysical_frag},Object.assign(X.prototype,{set:function(t,e){return this.min.copy(t),this.max.copy(e),this},setFromPoints:function(t){this.makeEmpty();for(var e=0,n=t.length;e<n;e++)this.expandByPoint(t[e]);return this},setFromCenterAndSize:function(){var t=new i;return function(e,n){var r=t.copy(n).multiplyScalar(.5);return this.min.copy(e).sub(r),this.max.copy(e).add(r),this}}(),clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.min.copy(t.min),this.max.copy(t.max),this},makeEmpty:function(){return this.min.x=this.min.y=1/0,this.max.x=this.max.y=-1/0,this},isEmpty:function(){return this.max.x<this.min.x||this.max.y<this.min.y},getCenter:function(t){var e=t||new i;return this.isEmpty()?e.set(0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)},getSize:function(t){var e=t||new i;return this.isEmpty()?e.set(0,0):e.subVectors(this.max,this.min)},expandByPoint:function(t){return this.min.min(t),this.max.max(t),this},expandByVector:function(t){return this.min.sub(t),this.max.add(t),this},expandByScalar:function(t){return this.min.addScalar(-t),this.max.addScalar(t),this},containsPoint:function(t){return!(t.x<this.min.x||t.x>this.max.x||t.y<this.min.y||t.y>this.max.y)},containsBox:function(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y},getParameter:function(t,e){return(e||new i).set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y))},intersectsBox:function(t){return!(t.max.x<this.min.x||t.min.x>this.max.x||t.max.y<this.min.y||t.min.y>this.max.y)},clampPoint:function(t,e){return(e||new i).copy(t).clamp(this.min,this.max)},distanceToPoint:function(){var t=new i;return function(e){return t.copy(e).clamp(this.min,this.max).sub(e).length()}}(),intersect:function(t){return this.min.max(t.min),this.max.min(t.max),this},union:function(t){return this.min.min(t.min),this.max.max(t.max),this},translate:function(t){return this.min.add(t),this.max.add(t),this},equals:function(t){return t.min.equals(this.min)&&t.max.equals(this.max)}}),(K.prototype=Object.create(o.prototype)).constructor=K;var gs=0;Object.assign(J.prototype,r.prototype,{isMaterial:!0,onBeforeCompile:function(){},setValues:function(t){if(void 0!==t)for(var e in t){var n=t[e];if(void 0!==n)if("shading"!==e){var r=this[e];void 0!==r?r&&r.isColor?r.set(n):r&&r.isVector3&&n&&n.isVector3?r.copy(n):this[e]="overdraw"===e?Number(n):n:console.warn("THREE."+this.type+": '"+e+"' is not a property of this material.")}else console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=n===$i;else console.warn("THREE.Material: '"+e+"' parameter is undefined.")}},toJSON:function(t){function e(t){var e=[];for(var n in t){var r=t[n];delete r.metadata,e.push(r)}return e}var n=void 0===t;n&&(t={textures:{},images:{}});var r={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};if(r.uuid=this.uuid,r.type=this.type,""!==this.name&&(r.name=this.name),this.color&&this.color.isColor&&(r.color=this.color.getHex()),void 0!==this.roughness&&(r.roughness=this.roughness),void 0!==this.metalness&&(r.metalness=this.metalness),this.emissive&&this.emissive.isColor&&(r.emissive=this.emissive.getHex()),this.specular&&this.specular.isColor&&(r.specular=this.specular.getHex()),void 0!==this.shininess&&(r.shininess=this.shininess),void 0!==this.clearCoat&&(r.clearCoat=this.clearCoat),void 0!==this.clearCoatRoughness&&(r.clearCoatRoughness=this.clearCoatRoughness),this.map&&this.map.isTexture&&(r.map=this.map.toJSON(t).uuid),this.alphaMap&&this.alphaMap.isTexture&&(r.alphaMap=this.alphaMap.toJSON(t).uuid),this.lightMap&&this.lightMap.isTexture&&(r.lightMap=this.lightMap.toJSON(t).uuid),this.bumpMap&&this.bumpMap.isTexture&&(r.bumpMap=this.bumpMap.toJSON(t).uuid,r.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(r.normalMap=this.normalMap.toJSON(t).uuid,r.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(r.displacementMap=this.displacementMap.toJSON(t).uuid,r.displacementScale=this.displacementScale,r.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(r.roughnessMap=this.roughnessMap.toJSON(t).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(r.metalnessMap=this.metalnessMap.toJSON(t).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(r.emissiveMap=this.emissiveMap.toJSON(t).uuid),this.specularMap&&this.specularMap.isTexture&&(r.specularMap=this.specularMap.toJSON(t).uuid),this.envMap&&this.envMap.isTexture&&(r.envMap=this.envMap.toJSON(t).uuid,r.reflectivity=this.reflectivity),this.gradientMap&&this.gradientMap.isTexture&&(r.gradientMap=this.gradientMap.toJSON(t).uuid),void 0!==this.size&&(r.size=this.size),void 0!==this.sizeAttenuation&&(r.sizeAttenuation=this.sizeAttenuation),this.blending!==oo&&(r.blending=this.blending),!0===this.flatShading&&(r.flatShading=this.flatShading),this.side!==Zi&&(r.side=this.side),this.vertexColors!==eo&&(r.vertexColors=this.vertexColors),this.opacity<1&&(r.opacity=this.opacity),!0===this.transparent&&(r.transparent=this.transparent),r.depthFunc=this.depthFunc,r.depthTest=this.depthTest,r.depthWrite=this.depthWrite,!0===this.dithering&&(r.dithering=!0),this.alphaTest>0&&(r.alphaTest=this.alphaTest),!0===this.premultipliedAlpha&&(r.premultipliedAlpha=this.premultipliedAlpha),!0===this.wireframe&&(r.wireframe=this.wireframe),this.wireframeLinewidth>1&&(r.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(r.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(r.wireframeLinejoin=this.wireframeLinejoin),!0===this.morphTargets&&(r.morphTargets=!0),!0===this.skinning&&(r.skinning=!0),!1===this.visible&&(r.visible=!1),"{}"!==JSON.stringify(this.userData)&&(r.userData=this.userData),n){var i=e(t.textures),o=e(t.images);i.length>0&&(r.textures=i),o.length>0&&(r.images=o)}return r},clone:function(){return(new this.constructor).copy(this)},copy:function(t){this.name=t.name,this.fog=t.fog,this.lights=t.lights,this.blending=t.blending,this.side=t.side,this.flatShading=t.flatShading,this.vertexColors=t.vertexColors,this.opacity=t.opacity,this.transparent=t.transparent,this.blendSrc=t.blendSrc,this.blendDst=t.blendDst,this.blendEquation=t.blendEquation,this.blendSrcAlpha=t.blendSrcAlpha,this.blendDstAlpha=t.blendDstAlpha,this.blendEquationAlpha=t.blendEquationAlpha,this.depthFunc=t.depthFunc,this.depthTest=t.depthTest,this.depthWrite=t.depthWrite,this.colorWrite=t.colorWrite,this.precision=t.precision,this.polygonOffset=t.polygonOffset,this.polygonOffsetFactor=t.polygonOffsetFactor,this.polygonOffsetUnits=t.polygonOffsetUnits,this.dithering=t.dithering,this.alphaTest=t.alphaTest,this.premultipliedAlpha=t.premultipliedAlpha,this.overdraw=t.overdraw,this.visible=t.visible,this.userData=JSON.parse(JSON.stringify(t.userData)),this.clipShadows=t.clipShadows,this.clipIntersection=t.clipIntersection;var e=t.clippingPlanes,n=null;if(null!==e){var r=e.length;n=new Array(r);for(var i=0;i!==r;++i)n[i]=e[i].clone()}return this.clippingPlanes=n,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),(Q.prototype=Object.create(J.prototype)).constructor=Q,Q.prototype.isShaderMaterial=!0,Q.prototype.copy=function(t){return J.prototype.copy.call(this,t),this.fragmentShader=t.fragmentShader,this.vertexShader=t.vertexShader,this.uniforms=fs.clone(t.uniforms),this.defines=t.defines,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.lights=t.lights,this.clipping=t.clipping,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this.extensions=t.extensions,this},Q.prototype.toJSON=function(t){var e=J.prototype.toJSON.call(this,t);return e.uniforms=this.uniforms,e.vertexShader=this.vertexShader,e.fragmentShader=this.fragmentShader,e},($.prototype=Object.create(J.prototype)).constructor=$,$.prototype.isMeshDepthMaterial=!0,$.prototype.copy=function(t){return J.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},(tt.prototype=Object.create(J.prototype)).constructor=tt,tt.prototype.isMeshDistanceMaterial=!0,tt.prototype.copy=function(t){return J.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},Object.assign(et.prototype,{isBox3:!0,set:function(t,e){return this.min.copy(t),this.max.copy(e),this},setFromArray:function(t){for(var e=1/0,n=1/0,r=1/0,i=-1/0,o=-1/0,a=-1/0,s=0,u=t.length;s<u;s+=3){var c=t[s],l=t[s+1],h=t[s+2];c<e&&(e=c),l<n&&(n=l),h<r&&(r=h),c>i&&(i=c),l>o&&(o=l),h>a&&(a=h)}return this.min.set(e,n,r),this.max.set(i,o,a),this},setFromBufferAttribute:function(t){for(var e=1/0,n=1/0,r=1/0,i=-1/0,o=-1/0,a=-1/0,s=0,u=t.count;s<u;s++){var c=t.getX(s),l=t.getY(s),h=t.getZ(s);c<e&&(e=c),l<n&&(n=l),h<r&&(r=h),c>i&&(i=c),l>o&&(o=l),h>a&&(a=h)}return this.min.set(e,n,r),this.max.set(i,o,a),this},setFromPoints:function(t){this.makeEmpty();for(var e=0,n=t.length;e<n;e++)this.expandByPoint(t[e]);return this},setFromCenterAndSize:function(){var t=new l;return function(e,n){var r=t.copy(n).multiplyScalar(.5);return this.min.copy(e).sub(r),this.max.copy(e).add(r),this}}(),setFromObject:function(t){return this.makeEmpty(),this.expandByObject(t)},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.min.copy(t.min),this.max.copy(t.max),this},makeEmpty:function(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this},isEmpty:function(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z},getCenter:function(t){var e=t||new l;return this.isEmpty()?e.set(0,0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)},getSize:function(t){var e=t||new l;return this.isEmpty()?e.set(0,0,0):e.subVectors(this.max,this.min)},expandByPoint:function(t){return this.min.min(t),this.max.max(t),this},expandByVector:function(t){return this.min.sub(t),this.max.add(t),this},expandByScalar:function(t){return this.min.addScalar(-t),this.max.addScalar(t),this},expandByObject:function(){var t=new l;return function(e){var n=this;return e.updateMatrixWorld(!0),e.traverse(function(e){var r,i,o=e.geometry;if(void 0!==o)if(o.isGeometry){var a=o.vertices;for(r=0,i=a.length;r<i;r++)t.copy(a[r]),t.applyMatrix4(e.matrixWorld),n.expandByPoint(t)}else if(o.isBufferGeometry){var s=o.attributes.position;if(void 0!==s)for(r=0,i=s.count;r<i;r++)t.fromBufferAttribute(s,r).applyMatrix4(e.matrixWorld),n.expandByPoint(t)}}),this}}(),containsPoint:function(t){return!(t.x<this.min.x||t.x>this.max.x||t.y<this.min.y||t.y>this.max.y||t.z<this.min.z||t.z>this.max.z)},containsBox:function(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y&&this.min.z<=t.min.z&&t.max.z<=this.max.z},getParameter:function(t,e){return(e||new l).set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y),(t.z-this.min.z)/(this.max.z-this.min.z))},intersectsBox:function(t){return!(t.max.x<this.min.x||t.min.x>this.max.x||t.max.y<this.min.y||t.min.y>this.max.y||t.max.z<this.min.z||t.min.z>this.max.z)},intersectsSphere:function(){var t=new l;return function(e){return this.clampPoint(e.center,t),t.distanceToSquared(e.center)<=e.radius*e.radius}}(),intersectsPlane:function(t){var 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},clampPoint:function(t,e){return(e||new l).copy(t).clamp(this.min,this.max)},distanceToPoint:function(){var t=new l;return function(e){return t.copy(e).clamp(this.min,this.max).sub(e).length()}}(),getBoundingSphere:function(){var t=new l;return function(e){var n=e||new nt;return this.getCenter(n.center),n.radius=.5*this.getSize(t).length(),n}}(),intersect:function(t){return this.min.max(t.min),this.max.min(t.max),this.isEmpty()&&this.makeEmpty(),this},union:function(t){return this.min.min(t.min),this.max.max(t.max),this},applyMatrix4:function(){var t=[new l,new l,new l,new l,new l,new l,new l,new l];return function(e){return this.isEmpty()?this:(t[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),t[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),t[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),t[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),t[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),t[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),t[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),t[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(t),this)}}(),translate:function(t){return this.min.add(t),this.max.add(t),this},equals:function(t){return t.min.equals(this.min)&&t.max.equals(this.max)}}),Object.assign(nt.prototype,{set:function(t,e){return this.center.copy(t),this.radius=e,this},setFromPoints:function(){var t=new et;return function(e,n){var r=this.center;void 0!==n?r.copy(n):t.setFromPoints(e).getCenter(r);for(var i=0,o=0,a=e.length;o<a;o++)i=Math.max(i,r.distanceToSquared(e[o]));return this.radius=Math.sqrt(i),this}}(),clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.center.copy(t.center),this.radius=t.radius,this},empty:function(){return this.radius<=0},containsPoint:function(t){return t.distanceToSquared(this.center)<=this.radius*this.radius},distanceToPoint:function(t){return t.distanceTo(this.center)-this.radius},intersectsSphere:function(t){var e=this.radius+t.radius;return t.center.distanceToSquared(this.center)<=e*e},intersectsBox:function(t){return t.intersectsSphere(this)},intersectsPlane:function(t){return Math.abs(t.distanceToPoint(this.center))<=this.radius},clampPoint:function(t,e){var n=this.center.distanceToSquared(t),r=e||new l;return r.copy(t),n>this.radius*this.radius&&(r.sub(this.center).normalize(),r.multiplyScalar(this.radius).add(this.center)),r},getBoundingBox:function(t){var e=t||new et;return e.set(this.center,this.center),e.expandByScalar(this.radius),e},applyMatrix4:function(t){return this.center.applyMatrix4(t),this.radius=this.radius*t.getMaxScaleOnAxis(),this},translate:function(t){return this.center.add(t),this},equals:function(t){return t.center.equals(this.center)&&t.radius===this.radius}}),Object.assign(rt.prototype,{isMatrix3:!0,set:function(t,e,n,r,i,o,a,s,u){var c=this.elements;return c[0]=t,c[1]=r,c[2]=a,c[3]=e,c[4]=i,c[5]=s,c[6]=n,c[7]=o,c[8]=u,this},identity:function(){return this.set(1,0,0,0,1,0,0,0,1),this},clone:function(){return(new this.constructor).fromArray(this.elements)},copy:function(t){var e=this.elements,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},setFromMatrix4:function(t){var 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},applyToBufferAttribute:function(){var t=new l;return function(e){for(var n=0,r=e.count;n<r;n++)t.x=e.getX(n),t.y=e.getY(n),t.z=e.getZ(n),t.applyMatrix3(this),e.setXYZ(n,t.x,t.y,t.z);return e}}(),multiply:function(t){return this.multiplyMatrices(this,t)},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,e){var n=t.elements,r=e.elements,i=this.elements,o=n[0],a=n[3],s=n[6],u=n[1],c=n[4],l=n[7],h=n[2],p=n[5],d=n[8],f=r[0],m=r[3],v=r[6],g=r[1],y=r[4],_=r[7],b=r[2],x=r[5],w=r[8];return i[0]=o*f+a*g+s*b,i[3]=o*m+a*y+s*x,i[6]=o*v+a*_+s*w,i[1]=u*f+c*g+l*b,i[4]=u*m+c*y+l*x,i[7]=u*v+c*_+l*w,i[2]=h*f+p*g+d*b,i[5]=h*m+p*y+d*x,i[8]=h*v+p*_+d*w,this},multiplyScalar:function(t){var e=this.elements;return e[0]*=t,e[3]*=t,e[6]*=t,e[1]*=t,e[4]*=t,e[7]*=t,e[2]*=t,e[5]*=t,e[8]*=t,this},determinant:function(){var t=this.elements,e=t[0],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],s=t[6],u=t[7],c=t[8];return e*o*c-e*a*u-n*i*c+n*a*s+r*i*u-r*o*s},getInverse:function(t,e){t&&t.isMatrix4&&console.error("THREE.Matrix3: .getInverse() no longer takes a Matrix4 argument.");var n=t.elements,r=this.elements,i=n[0],o=n[1],a=n[2],s=n[3],u=n[4],c=n[5],l=n[6],h=n[7],p=n[8],d=p*u-c*h,f=c*l-p*s,m=h*s-u*l,v=i*d+o*f+a*m;if(0===v){var g="THREE.Matrix3: .getInverse() can't invert matrix, determinant is 0";if(!0===e)throw new Error(g);return console.warn(g),this.identity()}var y=1/v;return r[0]=d*y,r[1]=(a*h-p*o)*y,r[2]=(c*o-a*u)*y,r[3]=f*y,r[4]=(p*i-a*l)*y,r[5]=(a*s-c*i)*y,r[6]=m*y,r[7]=(o*l-h*i)*y,r[8]=(u*i-o*s)*y,this},transpose:function(){var t,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:function(t){return this.setFromMatrix4(t).getInverse(this).transpose()},transposeIntoArray:function(t){var e=this.elements;return t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8],this},equals:function(t){for(var e=this.elements,n=t.elements,r=0;r<9;r++)if(e[r]!==n[r])return!1;return!0},fromArray:function(t,e){void 0===e&&(e=0);for(var n=0;n<9;n++)this.elements[n]=t[n+e];return this},toArray:function(t,e){void 0===t&&(t=[]),void 0===e&&(e=0);var 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}}),Object.assign(it.prototype,{set:function(t,e){return this.normal.copy(t),this.constant=e,this},setComponents:function(t,e,n,r){return this.normal.set(t,e,n),this.constant=r,this},setFromNormalAndCoplanarPoint:function(t,e){return this.normal.copy(t),this.constant=-e.dot(this.normal),this},setFromCoplanarPoints:function(){var t=new l,e=new l;return function(n,r,i){var o=t.subVectors(i,r).cross(e.subVectors(n,r)).normalize();return this.setFromNormalAndCoplanarPoint(o,n),this}}(),clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.normal.copy(t.normal),this.constant=t.constant,this},normalize:function(){var t=1/this.normal.length();return this.normal.multiplyScalar(t),this.constant*=t,this},negate:function(){return this.constant*=-1,this.normal.negate(),this},distanceToPoint:function(t){return this.normal.dot(t)+this.constant},distanceToSphere:function(t){return this.distanceToPoint(t.center)-t.radius},projectPoint:function(t,e){return(e||new l).copy(this.normal).multiplyScalar(-this.distanceToPoint(t)).add(t)},intersectLine:function(){var t=new l;return function(e,n){var r=n||new l,i=e.delta(t),o=this.normal.dot(i);if(0!==o){var a=-(e.start.dot(this.normal)+this.constant)/o;if(!(a<0||a>1))return r.copy(i).multiplyScalar(a).add(e.start)}else if(0===this.distanceToPoint(e.start))return r.copy(e.start)}}(),intersectsLine:function(t){var e=this.distanceToPoint(t.start),n=this.distanceToPoint(t.end);return e<0&&n>0||n<0&&e>0},intersectsBox:function(t){return t.intersectsPlane(this)},intersectsSphere:function(t){return t.intersectsPlane(this)},coplanarPoint:function(t){return(t||new l).copy(this.normal).multiplyScalar(-this.constant)},applyMatrix4:function(){var t=new l,e=new rt;return function(n,r){var i=r||e.getNormalMatrix(n),o=this.coplanarPoint(t).applyMatrix4(n),a=this.normal.applyMatrix3(i).normalize();return this.constant=-o.dot(a),this}}(),translate:function(t){return this.constant-=t.dot(this.normal),this},equals:function(t){return t.normal.equals(this.normal)&&t.constant===this.constant}}),Object.assign(ot.prototype,{set:function(t,e,n,r,i,o){var a=this.planes;return a[0].copy(t),a[1].copy(e),a[2].copy(n),a[3].copy(r),a[4].copy(i),a[5].copy(o),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){for(var e=this.planes,n=0;n<6;n++)e[n].copy(t.planes[n]);return this},setFromMatrix:function(t){var e=this.planes,n=t.elements,r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],u=n[5],c=n[6],l=n[7],h=n[8],p=n[9],d=n[10],f=n[11],m=n[12],v=n[13],g=n[14],y=n[15];return e[0].setComponents(a-r,l-s,f-h,y-m).normalize(),e[1].setComponents(a+r,l+s,f+h,y+m).normalize(),e[2].setComponents(a+i,l+u,f+p,y+v).normalize(),e[3].setComponents(a-i,l-u,f-p,y-v).normalize(),e[4].setComponents(a-o,l-c,f-d,y-g).normalize(),e[5].setComponents(a+o,l+c,f+d,y+g).normalize(),this},intersectsObject:function(){var t=new nt;return function(e){var n=e.geometry;return null===n.boundingSphere&&n.computeBoundingSphere(),t.copy(n.boundingSphere).applyMatrix4(e.matrixWorld),this.intersectsSphere(t)}}(),intersectsSprite:function(){var t=new nt;return function(e){return t.center.set(0,0,0),t.radius=.7071067811865476,t.applyMatrix4(e.matrixWorld),this.intersectsSphere(t)}}(),intersectsSphere:function(t){for(var e=this.planes,n=t.center,r=-t.radius,i=0;i<6;i++){if(e[i].distanceToPoint(n)<r)return!1}return!0},intersectsBox:function(){var t=new l,e=new l;return function(n){for(var r=this.planes,i=0;i<6;i++){var o=r[i];t.x=o.normal.x>0?n.min.x:n.max.x,e.x=o.normal.x>0?n.max.x:n.min.x,t.y=o.normal.y>0?n.min.y:n.max.y,e.y=o.normal.y>0?n.max.y:n.min.y,t.z=o.normal.z>0?n.min.z:n.max.z,e.z=o.normal.z>0?n.max.z:n.min.z;var a=o.distanceToPoint(t),s=o.distanceToPoint(e);if(a<0&&s<0)return!1}return!0}}(),containsPoint:function(t){for(var e=this.planes,n=0;n<6;n++)if(e[n].distanceToPoint(t)<0)return!1;return!0}}),ut.RotationOrders=["XYZ","YZX","ZXY","XZY","YXZ","ZYX"],ut.DefaultOrder="XYZ",Object.defineProperties(ut.prototype,{x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback()}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback()}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback()}},order:{get:function(){return this._order},set:function(t){this._order=t,this.onChangeCallback()}}}),Object.assign(ut.prototype,{isEuler:!0,set:function(t,e,n,r){return this._x=t,this._y=e,this._z=n,this._order=r||this._order,this.onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._order)},copy:function(t){return this._x=t._x,this._y=t._y,this._z=t._z,this._order=t._order,this.onChangeCallback(),this},setFromRotationMatrix:function(t,e,n){var r=rs.clamp,i=t.elements,o=i[0],a=i[4],s=i[8],u=i[1],c=i[5],l=i[9],h=i[2],p=i[6],d=i[10];return"XYZ"===(e=e||this._order)?(this._y=Math.asin(r(s,-1,1)),Math.abs(s)<.99999?(this._x=Math.atan2(-l,d),this._z=Math.atan2(-a,o)):(this._x=Math.atan2(p,c),this._z=0)):"YXZ"===e?(this._x=Math.asin(-r(l,-1,1)),Math.abs(l)<.99999?(this._y=Math.atan2(s,d),this._z=Math.atan2(u,c)):(this._y=Math.atan2(-h,o),this._z=0)):"ZXY"===e?(this._x=Math.asin(r(p,-1,1)),Math.abs(p)<.99999?(this._y=Math.atan2(-h,d),this._z=Math.atan2(-a,c)):(this._y=0,this._z=Math.atan2(u,o))):"ZYX"===e?(this._y=Math.asin(-r(h,-1,1)),Math.abs(h)<.99999?(this._x=Math.atan2(p,d),this._z=Math.atan2(u,o)):(this._x=0,this._z=Math.atan2(-a,c))):"YZX"===e?(this._z=Math.asin(r(u,-1,1)),Math.abs(u)<.99999?(this._x=Math.atan2(-l,c),this._y=Math.atan2(-h,o)):(this._x=0,this._y=Math.atan2(s,d))):"XZY"===e?(this._z=Math.asin(-r(a,-1,1)),Math.abs(a)<.99999?(this._x=Math.atan2(p,c),this._y=Math.atan2(s,o)):(this._x=Math.atan2(-l,d),this._y=0)):console.warn("THREE.Euler: .setFromRotationMatrix() given unsupported order: "+e),this._order=e,!1!==n&&this.onChangeCallback(),this},setFromQuaternion:function(){var t=new h;return function(e,n,r){return t.makeRotationFromQuaternion(e),this.setFromRotationMatrix(t,n,r)}}(),setFromVector3:function(t,e){return this.set(t.x,t.y,t.z,e||this._order)},reorder:function(){var t=new c;return function(e){return t.setFromEuler(this),this.setFromQuaternion(t,e)}}(),equals:function(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._order===this._order},fromArray:function(t){return this._x=t[0],this._y=t[1],this._z=t[2],void 0!==t[3]&&(this._order=t[3]),this.onChangeCallback(),this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._order,t},toVector3:function(t){return t?t.set(this._x,this._y,this._z):new l(this._x,this._y,this._z)},onChange:function(t){return this.onChangeCallback=t,this},onChangeCallback:function(){}}),Object.assign(ct.prototype,{set:function(t){this.mask=1<<t|0},enable:function(t){this.mask|=1<<t|0},toggle:function(t){this.mask^=1<<t|0},disable:function(t){this.mask&=~(1<<t|0)},test:function(t){return 0!=(this.mask&t.mask)}});var ys=0;lt.DefaultUp=new l(0,1,0),lt.DefaultMatrixAutoUpdate=!0,Object.assign(lt.prototype,r.prototype,{isObject3D:!0,onBeforeRender:function(){},onAfterRender:function(){},applyMatrix:function(t){this.matrix.multiplyMatrices(t,this.matrix),this.matrix.decompose(this.position,this.quaternion,this.scale)},applyQuaternion:function(t){return this.quaternion.premultiply(t),this},setRotationFromAxisAngle:function(t,e){this.quaternion.setFromAxisAngle(t,e)},setRotationFromEuler:function(t){this.quaternion.setFromEuler(t,!0)},setRotationFromMatrix:function(t){this.quaternion.setFromRotationMatrix(t)},setRotationFromQuaternion:function(t){this.quaternion.copy(t)},rotateOnAxis:function(){var t=new c;return function(e,n){return t.setFromAxisAngle(e,n),this.quaternion.multiply(t),this}}(),rotateX:function(){var t=new l(1,0,0);return function(e){return this.rotateOnAxis(t,e)}}(),rotateY:function(){var t=new l(0,1,0);return function(e){return this.rotateOnAxis(t,e)}}(),rotateZ:function(){var t=new l(0,0,1);return function(e){return this.rotateOnAxis(t,e)}}(),translateOnAxis:function(){var t=new l;return function(e,n){return t.copy(e).applyQuaternion(this.quaternion),this.position.add(t.multiplyScalar(n)),this}}(),translateX:function(){var t=new l(1,0,0);return function(e){return this.translateOnAxis(t,e)}}(),translateY:function(){var t=new l(0,1,0);return function(e){return this.translateOnAxis(t,e)}}(),translateZ:function(){var t=new l(0,0,1);return function(e){return this.translateOnAxis(t,e)}}(),localToWorld:function(t){return t.applyMatrix4(this.matrixWorld)},worldToLocal:function(){var t=new h;return function(e){return e.applyMatrix4(t.getInverse(this.matrixWorld))}}(),lookAt:function(){var t=new h;return function(e){this.isCamera?t.lookAt(this.position,e,this.up):t.lookAt(e,this.position,this.up),this.quaternion.setFromRotationMatrix(t)}}(),add:function(t){if(arguments.length>1){for(var e=0;e<arguments.length;e++)this.add(arguments[e]);return this}return t===this?(console.error("THREE.Object3D.add: object can't be added as a child of itself.",t),this):(t&&t.isObject3D?(null!==t.parent&&t.parent.remove(t),t.parent=this,t.dispatchEvent({type:"added"}),this.children.push(t)):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",t),this)},remove:function(t){if(arguments.length>1){for(var e=0;e<arguments.length;e++)this.remove(arguments[e]);return this}var n=this.children.indexOf(t);return-1!==n&&(t.parent=null,t.dispatchEvent({type:"removed"}),this.children.splice(n,1)),this},getObjectById:function(t){return this.getObjectByProperty("id",t)},getObjectByName:function(t){return this.getObjectByProperty("name",t)},getObjectByProperty:function(t,e){if(this[t]===e)return this;for(var n=0,r=this.children.length;n<r;n++){var i=this.children[n].getObjectByProperty(t,e);if(void 0!==i)return i}},getWorldPosition:function(t){var e=t||new l;return this.updateMatrixWorld(!0),e.setFromMatrixPosition(this.matrixWorld)},getWorldQuaternion:function(){var t=new l,e=new l;return function(n){var r=n||new c;return this.updateMatrixWorld(!0),this.matrixWorld.decompose(t,r,e),r}}(),getWorldRotation:function(){var t=new c;return function(e){var n=e||new ut;return this.getWorldQuaternion(t),n.setFromQuaternion(t,this.rotation.order,!1)}}(),getWorldScale:function(){var t=new l,e=new c;return function(n){var r=n||new l;return this.updateMatrixWorld(!0),this.matrixWorld.decompose(t,e,r),r}}(),getWorldDirection:function(){var t=new c;return function(e){var n=e||new l;return this.getWorldQuaternion(t),n.set(0,0,1).applyQuaternion(t)}}(),raycast:function(){},traverse:function(t){t(this);for(var e=this.children,n=0,r=e.length;n<r;n++)e[n].traverse(t)},traverseVisible:function(t){if(!1!==this.visible){t(this);for(var e=this.children,n=0,r=e.length;n<r;n++)e[n].traverseVisible(t)}},traverseAncestors:function(t){var 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);for(var e=this.children,n=0,r=e.length;n<r;n++)e[n].updateMatrixWorld(t)},toJSON:function(t){function e(e,n){return void 0===e[n.uuid]&&(e[n.uuid]=n.toJSON(t)),n.uuid}function n(t){var e=[];for(var n in t){var r=t[n];delete r.metadata,e.push(r)}return e}var r=void 0===t||""===t,i={};r&&(t={geometries:{},materials:{},textures:{},images:{}},i.metadata={version:4.5,type:"Object",generator:"Object3D.toJSON"});var o={};if(o.uuid=this.uuid,o.type=this.type,""!==this.name&&(o.name=this.name),!0===this.castShadow&&(o.castShadow=!0),!0===this.receiveShadow&&(o.receiveShadow=!0),!1===this.visible&&(o.visible=!1),"{}"!==JSON.stringify(this.userData)&&(o.userData=this.userData),o.matrix=this.matrix.toArray(),void 0!==this.geometry&&(o.geometry=e(t.geometries,this.geometry)),void 0!==this.material)if(Array.isArray(this.material)){for(var a=[],s=0,u=this.material.length;s<u;s++)a.push(e(t.materials,this.material[s]));o.material=a}else o.material=e(t.materials,this.material);if(this.children.length>0){o.children=[];for(s=0;s<this.children.length;s++)o.children.push(this.children[s].toJSON(t).object)}if(r){var c=n(t.geometries),l=n(t.materials),h=n(t.textures),p=n(t.images);c.length>0&&(i.geometries=c),l.length>0&&(i.materials=l),h.length>0&&(i.textures=h),p.length>0&&(i.images=p)}return i.object=o,i},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.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(var n=0;n<t.children.length;n++){var r=t.children[n];this.add(r.clone())}return this}}),ht.prototype=Object.assign(Object.create(lt.prototype),{constructor:ht,isCamera:!0,copy:function(t,e){return lt.prototype.copy.call(this,t,e),this.matrixWorldInverse.copy(t.matrixWorldInverse),this.projectionMatrix.copy(t.projectionMatrix),this},getWorldDirection:function(){var t=new c;return function(e){var n=e||new l;return this.getWorldQuaternion(t),n.set(0,0,-1).applyQuaternion(t)}}(),updateMatrixWorld:function(t){lt.prototype.updateMatrixWorld.call(this,t),this.matrixWorldInverse.getInverse(this.matrixWorld)},clone:function(){return(new this.constructor).copy(this)}}),pt.prototype=Object.assign(Object.create(ht.prototype),{constructor:pt,isOrthographicCamera:!0,copy:function(t,e){return ht.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,r,i,o){this.view={fullWidth:t,fullHeight:e,offsetX:n,offsetY:r,width:i,height:o},this.updateProjectionMatrix()},clearViewOffset:function(){this.view=null,this.updateProjectionMatrix()},updateProjectionMatrix:function(){var t=(this.right-this.left)/(2*this.zoom),e=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,r=(this.top+this.bottom)/2,i=n-t,o=n+t,a=r+e,s=r-e;if(null!==this.view){var u=this.zoom/(this.view.width/this.view.fullWidth),c=this.zoom/(this.view.height/this.view.fullHeight),l=(this.right-this.left)/this.view.width,h=(this.top-this.bottom)/this.view.height;o=(i+=l*(this.view.offsetX/u))+l*(this.view.width/u),s=(a-=h*(this.view.offsetY/c))-h*(this.view.height/c)}this.projectionMatrix.makeOrthographic(i,o,a,s,this.near,this.far)},toJSON:function(t){var e=lt.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}}),dt.prototype=Object.assign(Object.create(ht.prototype),{constructor:dt,isPerspectiveCamera:!0,copy:function(t,e){return ht.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){var e=.5*this.getFilmHeight()/t;this.fov=2*rs.RAD2DEG*Math.atan(e),this.updateProjectionMatrix()},getFocalLength:function(){var t=Math.tan(.5*rs.DEG2RAD*this.fov);return.5*this.getFilmHeight()/t},getEffectiveFOV:function(){return 2*rs.RAD2DEG*Math.atan(Math.tan(.5*rs.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,r,i,o){this.aspect=t/e,this.view={fullWidth:t,fullHeight:e,offsetX:n,offsetY:r,width:i,height:o},this.updateProjectionMatrix()},clearViewOffset:function(){this.view=null,this.updateProjectionMatrix()},updateProjectionMatrix:function(){var t=this.near,e=t*Math.tan(.5*rs.DEG2RAD*this.fov)/this.zoom,n=2*e,r=this.aspect*n,i=-.5*r,o=this.view;if(null!==o){var a=o.fullWidth,s=o.fullHeight;i+=o.offsetX*r/a,e-=o.offsetY*n/s,r*=o.width/a,n*=o.height/s}var u=this.filmOffset;0!==u&&(i+=t*u/this.getFilmWidth()),this.projectionMatrix.makePerspective(i,i+r,e,e-n,t,this.far)},toJSON:function(t){var e=lt.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}}),Object.assign(ft.prototype,{clone:function(){return(new this.constructor).copy(this)},copy:function(t){this.a=t.a,this.b=t.b,this.c=t.c,this.normal.copy(t.normal),this.color.copy(t.color),this.materialIndex=t.materialIndex;for(var e=0,n=t.vertexNormals.length;e<n;e++)this.vertexNormals[e]=t.vertexNormals[e].clone();for(var e=0,n=t.vertexColors.length;e<n;e++)this.vertexColors[e]=t.vertexColors[e].clone();return this}});var _s=0;Object.assign(vt.prototype,r.prototype,{isGeometry:!0,applyMatrix:function(t){for(var e=(new rt).getNormalMatrix(t),n=0,r=this.vertices.length;n<r;n++){this.vertices[n].applyMatrix4(t)}for(var n=0,r=this.faces.length;n<r;n++){var i=this.faces[n];i.normal.applyMatrix3(e).normalize();for(var o=0,a=i.vertexNormals.length;o<a;o++)i.vertexNormals[o].applyMatrix3(e).normalize()}return null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this.verticesNeedUpdate=!0,this.normalsNeedUpdate=!0,this},rotateX:function(){var t=new h;return function(e){return t.makeRotationX(e),this.applyMatrix(t),this}}(),rotateY:function(){var t=new h;return function(e){return t.makeRotationY(e),this.applyMatrix(t),this}}(),rotateZ:function(){var t=new h;return function(e){return t.makeRotationZ(e),this.applyMatrix(t),this}}(),translate:function(){var t=new h;return function(e,n,r){return t.makeTranslation(e,n,r),this.applyMatrix(t),this}}(),scale:function(){var t=new h;return function(e,n,r){return t.makeScale(e,n,r),this.applyMatrix(t),this}}(),lookAt:function(){var t=new lt;return function(e){t.lookAt(e),t.updateMatrix(),this.applyMatrix(t.matrix)}}(),fromBufferGeometry:function(t){function e(t,e,r,i){var o=new ft(t,e,r,void 0!==s?[p[t].clone(),p[e].clone(),p[r].clone()]:[],void 0!==u?[n.colors[t].clone(),n.colors[e].clone(),n.colors[r].clone()]:[],i);n.faces.push(o),void 0!==c&&n.faceVertexUvs[0].push([d[t].clone(),d[e].clone(),d[r].clone()]),void 0!==h&&n.faceVertexUvs[1].push([f[t].clone(),f[e].clone(),f[r].clone()])}var n=this,r=null!==t.index?t.index.array:void 0,o=t.attributes,a=o.position.array,s=void 0!==o.normal?o.normal.array:void 0,u=void 0!==o.color?o.color.array:void 0,c=void 0!==o.uv?o.uv.array:void 0,h=void 0!==o.uv2?o.uv2.array:void 0;void 0!==h&&(this.faceVertexUvs[1]=[]);for(var p=[],d=[],f=[],m=0,v=0;m<a.length;m+=3,v+=2)n.vertices.push(new l(a[m],a[m+1],a[m+2])),void 0!==s&&p.push(new l(s[m],s[m+1],s[m+2])),void 0!==u&&n.colors.push(new q(u[m],u[m+1],u[m+2])),void 0!==c&&d.push(new i(c[v],c[v+1])),void 0!==h&&f.push(new i(h[v],h[v+1]));var g=t.groups;if(g.length>0)for(m=0;m<g.length;m++)for(var y=g[m],_=y.start,v=_,b=_+y.count;v<b;v+=3)void 0!==r?e(r[v],r[v+1],r[v+2],y.materialIndex):e(v,v+1,v+2,y.materialIndex);else if(void 0!==r)for(m=0;m<r.length;m+=3)e(r[m],r[m+1],r[m+2]);else for(m=0;m<a.length/3;m+=3)e(m,m+1,m+2);return this.computeFaceNormals(),null!==t.boundingBox&&(this.boundingBox=t.boundingBox.clone()),null!==t.boundingSphere&&(this.boundingSphere=t.boundingSphere.clone()),this},center:function(){this.computeBoundingBox();var t=this.boundingBox.getCenter().negate();return this.translate(t.x,t.y,t.z),t},normalize:function(){this.computeBoundingSphere();var t=this.boundingSphere.center,e=this.boundingSphere.radius,n=0===e?1:1/e,r=new h;return r.set(n,0,0,-n*t.x,0,n,0,-n*t.y,0,0,n,-n*t.z,0,0,0,1),this.applyMatrix(r),this},computeFaceNormals:function(){for(var t=new l,e=new l,n=0,r=this.faces.length;n<r;n++){var i=this.faces[n],o=this.vertices[i.a],a=this.vertices[i.b],s=this.vertices[i.c];t.subVectors(s,a),e.subVectors(o,a),t.cross(e),t.normalize(),i.normal.copy(t)}},computeVertexNormals:function(t){void 0===t&&(t=!0);var e,n,r,i,o,a;for(a=new Array(this.vertices.length),e=0,n=this.vertices.length;e<n;e++)a[e]=new l;if(t){var s,u,c,h=new l,p=new l;for(r=0,i=this.faces.length;r<i;r++)o=this.faces[r],s=this.vertices[o.a],u=this.vertices[o.b],c=this.vertices[o.c],h.subVectors(c,u),p.subVectors(s,u),h.cross(p),a[o.a].add(h),a[o.b].add(h),a[o.c].add(h)}else for(this.computeFaceNormals(),r=0,i=this.faces.length;r<i;r++)a[(o=this.faces[r]).a].add(o.normal),a[o.b].add(o.normal),a[o.c].add(o.normal);for(e=0,n=this.vertices.length;e<n;e++)a[e].normalize();for(r=0,i=this.faces.length;r<i;r++){var d=(o=this.faces[r]).vertexNormals;3===d.length?(d[0].copy(a[o.a]),d[1].copy(a[o.b]),d[2].copy(a[o.c])):(d[0]=a[o.a].clone(),d[1]=a[o.b].clone(),d[2]=a[o.c].clone())}this.faces.length>0&&(this.normalsNeedUpdate=!0)},computeFlatVertexNormals:function(){var t,e,n;for(this.computeFaceNormals(),t=0,e=this.faces.length;t<e;t++){var r=(n=this.faces[t]).vertexNormals;3===r.length?(r[0].copy(n.normal),r[1].copy(n.normal),r[2].copy(n.normal)):(r[0]=n.normal.clone(),r[1]=n.normal.clone(),r[2]=n.normal.clone())}this.faces.length>0&&(this.normalsNeedUpdate=!0)},computeMorphNormals:function(){var t,e,n,r,i;for(n=0,r=this.faces.length;n<r;n++)for((i=this.faces[n]).__originalFaceNormal?i.__originalFaceNormal.copy(i.normal):i.__originalFaceNormal=i.normal.clone(),i.__originalVertexNormals||(i.__originalVertexNormals=[]),t=0,e=i.vertexNormals.length;t<e;t++)i.__originalVertexNormals[t]?i.__originalVertexNormals[t].copy(i.vertexNormals[t]):i.__originalVertexNormals[t]=i.vertexNormals[t].clone();var o=new vt;for(o.faces=this.faces,t=0,e=this.morphTargets.length;t<e;t++){if(!this.morphNormals[t]){this.morphNormals[t]={},this.morphNormals[t].faceNormals=[],this.morphNormals[t].vertexNormals=[];var a=this.morphNormals[t].faceNormals,s=this.morphNormals[t].vertexNormals;for(n=0,r=this.faces.length;n<r;n++)c=new l,h={a:new l,b:new l,c:new l},a.push(c),s.push(h)}var u=this.morphNormals[t];o.vertices=this.morphTargets[t].vertices,o.computeFaceNormals(),o.computeVertexNormals();var c,h;for(n=0,r=this.faces.length;n<r;n++)i=this.faces[n],c=u.faceNormals[n],h=u.vertexNormals[n],c.copy(i.normal),h.a.copy(i.vertexNormals[0]),h.b.copy(i.vertexNormals[1]),h.c.copy(i.vertexNormals[2])}for(n=0,r=this.faces.length;n<r;n++)(i=this.faces[n]).normal=i.__originalFaceNormal,i.vertexNormals=i.__originalVertexNormals},computeLineDistances:function(){for(var t=0,e=this.vertices,n=0,r=e.length;n<r;n++)n>0&&(t+=e[n].distanceTo(e[n-1])),this.lineDistances[n]=t},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new et),this.boundingBox.setFromPoints(this.vertices)},computeBoundingSphere:function(){null===this.boundingSphere&&(this.boundingSphere=new nt),this.boundingSphere.setFromPoints(this.vertices)},merge:function(t,e,n){if(t&&t.isGeometry){var r,i=this.vertices.length,o=this.vertices,a=t.vertices,s=this.faces,u=t.faces,c=this.faceVertexUvs[0],l=t.faceVertexUvs[0],h=this.colors,p=t.colors;void 0===n&&(n=0),void 0!==e&&(r=(new rt).getNormalMatrix(e));for(var d=0,f=a.length;d<f;d++){var m=a[d].clone();void 0!==e&&m.applyMatrix4(e),o.push(m)}for(var d=0,f=p.length;d<f;d++)h.push(p[d].clone());for(d=0,f=u.length;d<f;d++){var v,g,y,_=u[d],b=_.vertexNormals,x=_.vertexColors;(v=new ft(_.a+i,_.b+i,_.c+i)).normal.copy(_.normal),void 0!==r&&v.normal.applyMatrix3(r).normalize();for(var w=0,E=b.length;w<E;w++)g=b[w].clone(),void 0!==r&&g.applyMatrix3(r).normalize(),v.vertexNormals.push(g);v.color.copy(_.color);for(var w=0,E=x.length;w<E;w++)y=x[w],v.vertexColors.push(y.clone());v.materialIndex=_.materialIndex+n,s.push(v)}for(d=0,f=l.length;d<f;d++){var M=l[d],T=[];if(void 0!==M){for(var w=0,E=M.length;w<E;w++)T.push(M[w].clone());c.push(T)}}}else console.error("THREE.Geometry.merge(): geometry not an instance of THREE.Geometry.",t)},mergeMesh:function(t){t&&t.isMesh?(t.matrixAutoUpdate&&t.updateMatrix(),this.merge(t.geometry,t.matrix)):console.error("THREE.Geometry.mergeMesh(): mesh not an instance of THREE.Mesh.",t)},mergeVertices:function(){var t,e,n,r,i,o,a,s,u={},c=[],l=[],h=Math.pow(10,4);for(n=0,r=this.vertices.length;n<r;n++)t=this.vertices[n],void 0===u[e=Math.round(t.x*h)+"_"+Math.round(t.y*h)+"_"+Math.round(t.z*h)]?(u[e]=n,c.push(this.vertices[n]),l[n]=c.length-1):l[n]=l[u[e]];var p=[];for(n=0,r=this.faces.length;n<r;n++){(i=this.faces[n]).a=l[i.a],i.b=l[i.b],i.c=l[i.c],o=[i.a,i.b,i.c];for(var d=0;d<3;d++)if(o[d]===o[(d+1)%3]){p.push(n);break}}for(n=p.length-1;n>=0;n--){var f=p[n];for(this.faces.splice(f,1),a=0,s=this.faceVertexUvs.length;a<s;a++)this.faceVertexUvs[a].splice(f,1)}var m=this.vertices.length-c.length;return this.vertices=c,m},sortFacesByMaterialIndex:function(){for(var t=this.faces,e=t.length,n=0;n<e;n++)t[n]._id=n;t.sort(function(t,e){return t.materialIndex-e.materialIndex});var r,i,o=this.faceVertexUvs[0],a=this.faceVertexUvs[1];o&&o.length===e&&(r=[]),a&&a.length===e&&(i=[]);for(n=0;n<e;n++){var s=t[n]._id;r&&r.push(o[s]),i&&i.push(a[s])}r&&(this.faceVertexUvs[0]=r),i&&(this.faceVertexUvs[1]=i)},toJSON:function(){function t(t,e,n){return n?t|1<<e:t&~(1<<e)}function e(t){var e=t.x.toString()+t.y.toString()+t.z.toString();return void 0!==p[e]?p[e]:(p[e]=h.length/3,h.push(t.x,t.y,t.z),p[e])}function n(t){var e=t.r.toString()+t.g.toString()+t.b.toString();return void 0!==f[e]?f[e]:(f[e]=d.length,d.push(t.getHex()),f[e])}function r(t){var e=t.x.toString()+t.y.toString();return void 0!==v[e]?v[e]:(v[e]=m.length/2,m.push(t.x,t.y),v[e])}var i={metadata:{version:4.5,type:"Geometry",generator:"Geometry.toJSON"}};if(i.uuid=this.uuid,i.type=this.type,""!==this.name&&(i.name=this.name),void 0!==this.parameters){var o=this.parameters;for(var a in o)void 0!==o[a]&&(i[a]=o[a]);return i}for(var s=[],u=0;u<this.vertices.length;u++){var c=this.vertices[u];s.push(c.x,c.y,c.z)}for(var l=[],h=[],p={},d=[],f={},m=[],v={},u=0;u<this.faces.length;u++){var g=this.faces[u],y=void 0!==this.faceVertexUvs[0][u],_=g.normal.length()>0,b=g.vertexNormals.length>0,x=1!==g.color.r||1!==g.color.g||1!==g.color.b,w=g.vertexColors.length>0,E=0;if(E=t(E,0,0),E=t(E,1,!0),E=t(E,2,!1),E=t(E,3,y),E=t(E,4,_),E=t(E,5,b),E=t(E,6,x),E=t(E,7,w),l.push(E),l.push(g.a,g.b,g.c),l.push(g.materialIndex),y){var M=this.faceVertexUvs[0][u];l.push(r(M[0]),r(M[1]),r(M[2]))}if(_&&l.push(e(g.normal)),b){var T=g.vertexNormals;l.push(e(T[0]),e(T[1]),e(T[2]))}if(x&&l.push(n(g.color)),w){var S=g.vertexColors;l.push(n(S[0]),n(S[1]),n(S[2]))}}return i.data={},i.data.vertices=s,i.data.normals=h,d.length>0&&(i.data.colors=d),m.length>0&&(i.data.uvs=[m]),i.data.faces=l,i},clone:function(){return(new vt).copy(this)},copy:function(t){var e,n,r,i,o,a;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;var s=t.vertices;for(e=0,n=s.length;e<n;e++)this.vertices.push(s[e].clone());var u=t.colors;for(e=0,n=u.length;e<n;e++)this.colors.push(u[e].clone());var c=t.faces;for(e=0,n=c.length;e<n;e++)this.faces.push(c[e].clone());for(e=0,n=t.faceVertexUvs.length;e<n;e++){var l=t.faceVertexUvs[e];for(void 0===this.faceVertexUvs[e]&&(this.faceVertexUvs[e]=[]),r=0,i=l.length;r<i;r++){var h=l[r],p=[];for(o=0,a=h.length;o<a;o++){var d=h[o];p.push(d.clone())}this.faceVertexUvs[e].push(p)}}var f=t.morphTargets;for(e=0,n=f.length;e<n;e++){var m={};if(m.name=f[e].name,void 0!==f[e].vertices)for(m.vertices=[],r=0,i=f[e].vertices.length;r<i;r++)m.vertices.push(f[e].vertices[r].clone());if(void 0!==f[e].normals)for(m.normals=[],r=0,i=f[e].normals.length;r<i;r++)m.normals.push(f[e].normals[r].clone());this.morphTargets.push(m)}var v=t.morphNormals;for(e=0,n=v.length;e<n;e++){var g={};if(void 0!==v[e].vertexNormals)for(g.vertexNormals=[],r=0,i=v[e].vertexNormals.length;r<i;r++){var y=v[e].vertexNormals[r],_={};_.a=y.a.clone(),_.b=y.b.clone(),_.c=y.c.clone(),g.vertexNormals.push(_)}if(void 0!==v[e].faceNormals)for(g.faceNormals=[],r=0,i=v[e].faceNormals.length;r<i;r++)g.faceNormals.push(v[e].faceNormals[r].clone());this.morphNormals.push(g)}var b=t.skinWeights;for(e=0,n=b.length;e<n;e++)this.skinWeights.push(b[e].clone());var x=t.skinIndices;for(e=0,n=x.length;e<n;e++)this.skinIndices.push(x[e].clone());var w=t.lineDistances;for(e=0,n=w.length;e<n;e++)this.lineDistances.push(w[e]);var E=t.boundingBox;null!==E&&(this.boundingBox=E.clone());var M=t.boundingSphere;return null!==M&&(this.boundingSphere=M.clone()),this.elementsNeedUpdate=t.elementsNeedUpdate,this.verticesNeedUpdate=t.verticesNeedUpdate,this.uvsNeedUpdate=t.uvsNeedUpdate,this.normalsNeedUpdate=t.normalsNeedUpdate,this.colorsNeedUpdate=t.colorsNeedUpdate,this.lineDistancesNeedUpdate=t.lineDistancesNeedUpdate,this.groupsNeedUpdate=t.groupsNeedUpdate,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Object.defineProperty(gt.prototype,"needsUpdate",{set:function(t){!0===t&&this.version++}}),Object.assign(gt.prototype,{isBufferAttribute:!0,setArray:function(t){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.count=void 0!==t?t.length/this.itemSize:0,this.array=t},setDynamic:function(t){return this.dynamic=t,this},copy:function(t){return this.array=new t.array.constructor(t.array),this.itemSize=t.itemSize,this.count=t.count,this.normalized=t.normalized,this.dynamic=t.dynamic,this},copyAt:function(t,e,n){t*=this.itemSize,n*=e.itemSize;for(var r=0,i=this.itemSize;r<i;r++)this.array[t+r]=e.array[n+r];return this},copyArray:function(t){return this.array.set(t),this},copyColorsArray:function(t){for(var e=this.array,n=0,r=0,i=t.length;r<i;r++){var o=t[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyColorsArray(): color is undefined",r),o=new q),e[n++]=o.r,e[n++]=o.g,e[n++]=o.b}return this},copyIndicesArray:function(t){for(var e=this.array,n=0,r=0,i=t.length;r<i;r++){var o=t[r];e[n++]=o.a,e[n++]=o.b,e[n++]=o.c}return this},copyVector2sArray:function(t){for(var e=this.array,n=0,r=0,o=t.length;r<o;r++){var a=t[r];void 0===a&&(console.warn("THREE.BufferAttribute.copyVector2sArray(): vector is undefined",r),a=new i),e[n++]=a.x,e[n++]=a.y}return this},copyVector3sArray:function(t){for(var e=this.array,n=0,r=0,i=t.length;r<i;r++){var o=t[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyVector3sArray(): vector is undefined",r),o=new l),e[n++]=o.x,e[n++]=o.y,e[n++]=o.z}return this},copyVector4sArray:function(t){for(var e=this.array,n=0,r=0,i=t.length;r<i;r++){var o=t[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyVector4sArray(): vector is undefined",r),o=new a),e[n++]=o.x,e[n++]=o.y,e[n++]=o.z,e[n++]=o.w}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,r){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=n,this.array[t+2]=r,this},setXYZW:function(t,e,n,r,i){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=n,this.array[t+2]=r,this.array[t+3]=i,this},onUpload:function(t){return this.onUploadCallback=t,this},clone:function(){return new this.constructor(this.array,this.itemSize).copy(this)}}),(yt.prototype=Object.create(gt.prototype)).constructor=yt,(_t.prototype=Object.create(gt.prototype)).constructor=_t,(bt.prototype=Object.create(gt.prototype)).constructor=bt,(xt.prototype=Object.create(gt.prototype)).constructor=xt,(wt.prototype=Object.create(gt.prototype)).constructor=wt,(Et.prototype=Object.create(gt.prototype)).constructor=Et,(Mt.prototype=Object.create(gt.prototype)).constructor=Mt,(Tt.prototype=Object.create(gt.prototype)).constructor=Tt,(St.prototype=Object.create(gt.prototype)).constructor=St,Object.assign(Ct.prototype,{computeGroups:function(t){for(var e,n=[],r=void 0,i=t.faces,o=0;o<i.length;o++){var a=i[o];a.materialIndex!==r&&(r=a.materialIndex,void 0!==e&&(e.count=3*o-e.start,n.push(e)),e={start:3*o,materialIndex:r})}void 0!==e&&(e.count=3*o-e.start,n.push(e)),this.groups=n},fromGeometry:function(t){var e,n=t.faces,r=t.vertices,o=t.faceVertexUvs,a=o[0]&&o[0].length>0,s=o[1]&&o[1].length>0,u=t.morphTargets,c=u.length;if(c>0){e=[];for(g=0;g<c;g++)e[g]=[];this.morphTargets.position=e}var l,h=t.morphNormals,p=h.length;if(p>0){l=[];for(g=0;g<p;g++)l[g]=[];this.morphTargets.normal=l}for(var d=t.skinIndices,f=t.skinWeights,m=d.length===r.length,v=f.length===r.length,g=0;g<n.length;g++){var y=n[g];this.vertices.push(r[y.a],r[y.b],r[y.c]);var _=y.vertexNormals;if(3===_.length)this.normals.push(_[0],_[1],_[2]);else{var b=y.normal;this.normals.push(b,b,b)}var x=y.vertexColors;if(3===x.length)this.colors.push(x[0],x[1],x[2]);else{var w=y.color;this.colors.push(w,w,w)}if(!0===a){void 0!==(E=o[0][g])?this.uvs.push(E[0],E[1],E[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv ",g),this.uvs.push(new i,new i,new i))}if(!0===s){var E=o[1][g];void 0!==E?this.uvs2.push(E[0],E[1],E[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv2 ",g),this.uvs2.push(new i,new i,new i))}for(T=0;T<c;T++){var M=u[T].vertices;e[T].push(M[y.a],M[y.b],M[y.c])}for(var T=0;T<p;T++){var S=h[T].vertexNormals[g];l[T].push(S.a,S.b,S.c)}m&&this.skinIndices.push(d[y.a],d[y.b],d[y.c]),v&&this.skinWeights.push(f[y.a],f[y.b],f[y.c])}return this.computeGroups(t),this.verticesNeedUpdate=t.verticesNeedUpdate,this.normalsNeedUpdate=t.normalsNeedUpdate,this.colorsNeedUpdate=t.colorsNeedUpdate,this.uvsNeedUpdate=t.uvsNeedUpdate,this.groupsNeedUpdate=t.groupsNeedUpdate,this}}),Pt.MaxIndex=65535,Object.assign(Pt.prototype,r.prototype,{isBufferGeometry:!0,getIndex:function(){return this.index},setIndex:function(t){Array.isArray(t)?this.index=new(At(t)>65535?Mt:wt)(t,1):this.index=t},addAttribute:function(t,e){return e&&e.isBufferAttribute||e&&e.isInterleavedBufferAttribute?"index"===t?(console.warn("THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute."),void this.setIndex(e)):(this.attributes[t]=e,this):(console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."),void this.addAttribute(t,new gt(arguments[1],arguments[2])))},getAttribute:function(t){return this.attributes[t]},removeAttribute: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},applyMatrix:function(t){var e=this.attributes.position;void 0!==e&&(t.applyToBufferAttribute(e),e.needsUpdate=!0);var n=this.attributes.normal;if(void 0!==n){(new rt).getNormalMatrix(t).applyToBufferAttribute(n),n.needsUpdate=!0}return null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this},rotateX:function(){var t=new h;return function(e){return t.makeRotationX(e),this.applyMatrix(t),this}}(),rotateY:function(){var t=new h;return function(e){return t.makeRotationY(e),this.applyMatrix(t),this}}(),rotateZ:function(){var t=new h;return function(e){return t.makeRotationZ(e),this.applyMatrix(t),this}}(),translate:function(){var t=new h;return function(e,n,r){return t.makeTranslation(e,n,r),this.applyMatrix(t),this}}(),scale:function(){var t=new h;return function(e,n,r){return t.makeScale(e,n,r),this.applyMatrix(t),this}}(),lookAt:function(){var t=new lt;return function(e){t.lookAt(e),t.updateMatrix(),this.applyMatrix(t.matrix)}}(),center:function(){this.computeBoundingBox();var t=this.boundingBox.getCenter().negate();return this.translate(t.x,t.y,t.z),t},setFromObject:function(t){var e=t.geometry;if(t.isPoints||t.isLine){var n=new Tt(3*e.vertices.length,3),r=new Tt(3*e.colors.length,3);if(this.addAttribute("position",n.copyVector3sArray(e.vertices)),this.addAttribute("color",r.copyColorsArray(e.colors)),e.lineDistances&&e.lineDistances.length===e.vertices.length){var i=new Tt(e.lineDistances.length,1);this.addAttribute("lineDistance",i.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},updateFromObject:function(t){var e=t.geometry;if(t.isMesh){var n=e.__directGeometry;if(!0===e.elementsNeedUpdate&&(n=void 0,e.elementsNeedUpdate=!1),void 0===n)return this.fromGeometry(e);n.verticesNeedUpdate=e.verticesNeedUpdate,n.normalsNeedUpdate=e.normalsNeedUpdate,n.colorsNeedUpdate=e.colorsNeedUpdate,n.uvsNeedUpdate=e.uvsNeedUpdate,n.groupsNeedUpdate=e.groupsNeedUpdate,e.verticesNeedUpdate=!1,e.normalsNeedUpdate=!1,e.colorsNeedUpdate=!1,e.uvsNeedUpdate=!1,e.groupsNeedUpdate=!1,e=n}var r;return!0===e.verticesNeedUpdate&&(void 0!==(r=this.attributes.position)&&(r.copyVector3sArray(e.vertices),r.needsUpdate=!0),e.verticesNeedUpdate=!1),!0===e.normalsNeedUpdate&&(void 0!==(r=this.attributes.normal)&&(r.copyVector3sArray(e.normals),r.needsUpdate=!0),e.normalsNeedUpdate=!1),!0===e.colorsNeedUpdate&&(void 0!==(r=this.attributes.color)&&(r.copyColorsArray(e.colors),r.needsUpdate=!0),e.colorsNeedUpdate=!1),e.uvsNeedUpdate&&(void 0!==(r=this.attributes.uv)&&(r.copyVector2sArray(e.uvs),r.needsUpdate=!0),e.uvsNeedUpdate=!1),e.lineDistancesNeedUpdate&&(void 0!==(r=this.attributes.lineDistance)&&(r.copyArray(e.lineDistances),r.needsUpdate=!0),e.lineDistancesNeedUpdate=!1),e.groupsNeedUpdate&&(e.computeGroups(t.geometry),this.groups=e.groups,e.groupsNeedUpdate=!1),this},fromGeometry:function(t){return t.__directGeometry=(new Ct).fromGeometry(t),this.fromDirectGeometry(t.__directGeometry)},fromDirectGeometry:function(t){var e=new Float32Array(3*t.vertices.length);if(this.addAttribute("position",new gt(e,3).copyVector3sArray(t.vertices)),t.normals.length>0){var n=new Float32Array(3*t.normals.length);this.addAttribute("normal",new gt(n,3).copyVector3sArray(t.normals))}if(t.colors.length>0){var r=new Float32Array(3*t.colors.length);this.addAttribute("color",new gt(r,3).copyColorsArray(t.colors))}if(t.uvs.length>0){var i=new Float32Array(2*t.uvs.length);this.addAttribute("uv",new gt(i,2).copyVector2sArray(t.uvs))}if(t.uvs2.length>0){var o=new Float32Array(2*t.uvs2.length);this.addAttribute("uv2",new gt(o,2).copyVector2sArray(t.uvs2))}if(t.indices.length>0){var a=new(At(t.indices)>65535?Uint32Array:Uint16Array)(3*t.indices.length);this.setIndex(new gt(a,1).copyIndicesArray(t.indices))}this.groups=t.groups;for(var s in t.morphTargets){for(var u=[],c=t.morphTargets[s],l=0,h=c.length;l<h;l++){var p=c[l],d=new Tt(3*p.length,3);u.push(d.copyVector3sArray(p))}this.morphAttributes[s]=u}if(t.skinIndices.length>0){var f=new Tt(4*t.skinIndices.length,4);this.addAttribute("skinIndex",f.copyVector4sArray(t.skinIndices))}if(t.skinWeights.length>0){var m=new Tt(4*t.skinWeights.length,4);this.addAttribute("skinWeight",m.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 et);var t=this.attributes.position;void 0!==t?this.boundingBox.setFromBufferAttribute(t):this.boundingBox.makeEmpty(),(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&console.error('THREE.BufferGeometry.computeBoundingBox: Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)},computeBoundingSphere:function(){var t=new et,e=new l;return function(){null===this.boundingSphere&&(this.boundingSphere=new nt);var n=this.attributes.position;if(n){var r=this.boundingSphere.center;t.setFromBufferAttribute(n),t.getCenter(r);for(var i=0,o=0,a=n.count;o<a;o++)e.x=n.getX(o),e.y=n.getY(o),e.z=n.getZ(o),i=Math.max(i,r.distanceToSquared(e));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(){var t=this.index,e=this.attributes,n=this.groups;if(e.position){var r=e.position.array;if(void 0===e.normal)this.addAttribute("normal",new gt(new Float32Array(r.length),3));else for(var i=e.normal.array,o=0,a=i.length;o<a;o++)i[o]=0;var s,u,c,h=e.normal.array,p=new l,d=new l,f=new l,m=new l,v=new l;if(t){var g=t.array;0===n.length&&this.addGroup(0,g.length);for(var y=0,_=n.length;y<_;++y)for(var b=n[y],x=b.start,o=x,a=x+b.count;o<a;o+=3)s=3*g[o+0],u=3*g[o+1],c=3*g[o+2],p.fromArray(r,s),d.fromArray(r,u),f.fromArray(r,c),m.subVectors(f,d),v.subVectors(p,d),m.cross(v),h[s]+=m.x,h[s+1]+=m.y,h[s+2]+=m.z,h[u]+=m.x,h[u+1]+=m.y,h[u+2]+=m.z,h[c]+=m.x,h[c+1]+=m.y,h[c+2]+=m.z}else for(var o=0,a=r.length;o<a;o+=9)p.fromArray(r,o),d.fromArray(r,o+3),f.fromArray(r,o+6),m.subVectors(f,d),v.subVectors(p,d),m.cross(v),h[o]=m.x,h[o+1]=m.y,h[o+2]=m.z,h[o+3]=m.x,h[o+4]=m.y,h[o+5]=m.z,h[o+6]=m.x,h[o+7]=m.y,h[o+8]=m.z;this.normalizeNormals(),e.normal.needsUpdate=!0}},merge:function(t,e){if(t&&t.isBufferGeometry){void 0===e&&(e=0);var n=this.attributes;for(var r in n)if(void 0!==t.attributes[r])for(var i=n[r].array,o=t.attributes[r],a=o.array,s=0,u=o.itemSize*e;s<a.length;s++,u++)i[u]=a[s];return this}console.error("THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.",t)},normalizeNormals:function(){var t=new l;return function(){for(var e=this.attributes.normal,n=0,r=e.count;n<r;n++)t.x=e.getX(n),t.y=e.getY(n),t.z=e.getZ(n),t.normalize(),e.setXYZ(n,t.x,t.y,t.z)}}(),toNonIndexed:function(){if(null===this.index)return console.warn("THREE.BufferGeometry.toNonIndexed(): Geometry is already non-indexed."),this;var t=new Pt,e=this.index.array,n=this.attributes;for(var r in n){for(var i=n[r],o=i.array,a=i.itemSize,s=new o.constructor(e.length*a),u=0,c=0,l=0,h=e.length;l<h;l++){u=e[l]*a;for(var p=0;p<a;p++)s[c++]=o[u++]}t.addAttribute(r,new gt(s,a))}return t},toJSON:function(){var t={metadata:{version:4.5,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(t.uuid=this.uuid,t.type=this.type,""!==this.name&&(t.name=this.name),void 0!==this.parameters){var e=this.parameters;for(var n in e)void 0!==e[n]&&(t[n]=e[n]);return t}t.data={attributes:{}};var r=this.index;if(null!==r){a=Array.prototype.slice.call(r.array);t.data.index={type:r.array.constructor.name,array:a}}var i=this.attributes;for(var n in i){var o=i[n],a=Array.prototype.slice.call(o.array);t.data.attributes[n]={itemSize:o.itemSize,type:o.array.constructor.name,array:a,normalized:o.normalized}}var s=this.groups;s.length>0&&(t.data.groups=JSON.parse(JSON.stringify(s)));var u=this.boundingSphere;return null!==u&&(t.data.boundingSphere={center:u.center.toArray(),radius:u.radius}),t},clone:function(){return(new Pt).copy(this)},copy:function(t){var e,n,r;this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.name=t.name;var i=t.index;null!==i&&this.setIndex(i.clone());var o=t.attributes;for(e in o){var a=o[e];this.addAttribute(e,a.clone())}var s=t.morphAttributes;for(e in s){var u=[],c=s[e];for(n=0,r=c.length;n<r;n++)u.push(c[n].clone());this.morphAttributes[e]=u}var l=t.groups;for(n=0,r=l.length;n<r;n++){var h=l[n];this.addGroup(h.start,h.count,h.materialIndex)}var p=t.boundingBox;null!==p&&(this.boundingBox=p.clone());var d=t.boundingSphere;return null!==d&&(this.boundingSphere=d.clone()),this.drawRange.start=t.drawRange.start,this.drawRange.count=t.drawRange.count,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),(Rt.prototype=Object.create(vt.prototype)).constructor=Rt,(Lt.prototype=Object.create(Pt.prototype)).constructor=Lt,(It.prototype=Object.create(vt.prototype)).constructor=It,(Ot.prototype=Object.create(Pt.prototype)).constructor=Ot,(Nt.prototype=Object.create(J.prototype)).constructor=Nt,Nt.prototype.isMeshBasicMaterial=!0,Nt.prototype.copy=function(t){return J.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},Object.assign(Dt.prototype,{set:function(t,e){return this.origin.copy(t),this.direction.copy(e),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.origin.copy(t.origin),this.direction.copy(t.direction),this},at:function(t,e){return(e||new l).copy(this.direction).multiplyScalar(t).add(this.origin)},lookAt:function(t){return this.direction.copy(t).sub(this.origin).normalize(),this},recast:function(){var t=new l;return function(e){return this.origin.copy(this.at(e,t)),this}}(),closestPointToPoint:function(t,e){var n=e||new l;n.subVectors(t,this.origin);var r=n.dot(this.direction);return r<0?n.copy(this.origin):n.copy(this.direction).multiplyScalar(r).add(this.origin)},distanceToPoint:function(t){return Math.sqrt(this.distanceSqToPoint(t))},distanceSqToPoint:function(){var t=new l;return function(e){var n=t.subVectors(e,this.origin).dot(this.direction);return n<0?this.origin.distanceToSquared(e):(t.copy(this.direction).multiplyScalar(n).add(this.origin),t.distanceToSquared(e))}}(),distanceSqToSegment:function(){var t=new l,e=new l,n=new l;return function(r,i,o,a){t.copy(r).add(i).multiplyScalar(.5),e.copy(i).sub(r).normalize(),n.copy(this.origin).sub(t);var s,u,c,l,h=.5*r.distanceTo(i),p=-this.direction.dot(e),d=n.dot(this.direction),f=-n.dot(e),m=n.lengthSq(),v=Math.abs(1-p*p);if(v>0)if(s=p*f-d,u=p*d-f,l=h*v,s>=0)if(u>=-l)if(u<=l){var g=1/v;c=(s*=g)*(s+p*(u*=g)+2*d)+u*(p*s+u+2*f)+m}else u=h,c=-(s=Math.max(0,-(p*u+d)))*s+u*(u+2*f)+m;else u=-h,c=-(s=Math.max(0,-(p*u+d)))*s+u*(u+2*f)+m;else u<=-l?c=-(s=Math.max(0,-(-p*h+d)))*s+(u=s>0?-h:Math.min(Math.max(-h,-f),h))*(u+2*f)+m:u<=l?(s=0,c=(u=Math.min(Math.max(-h,-f),h))*(u+2*f)+m):c=-(s=Math.max(0,-(p*h+d)))*s+(u=s>0?h:Math.min(Math.max(-h,-f),h))*(u+2*f)+m;else u=p>0?-h:h,c=-(s=Math.max(0,-(p*u+d)))*s+u*(u+2*f)+m;return o&&o.copy(this.direction).multiplyScalar(s).add(this.origin),a&&a.copy(e).multiplyScalar(u).add(t),c}}(),intersectSphere:function(){var t=new l;return function(e,n){t.subVectors(e.center,this.origin);var r=t.dot(this.direction),i=t.dot(t)-r*r,o=e.radius*e.radius;if(i>o)return null;var a=Math.sqrt(o-i),s=r-a,u=r+a;return s<0&&u<0?null:s<0?this.at(u,n):this.at(s,n)}}(),intersectsSphere:function(t){return this.distanceToPoint(t.center)<=t.radius},distanceToPlane:function(t){var e=t.normal.dot(this.direction);if(0===e)return 0===t.distanceToPoint(this.origin)?0:null;var n=-(this.origin.dot(t.normal)+t.constant)/e;return n>=0?n:null},intersectPlane:function(t,e){var n=this.distanceToPlane(t);return null===n?null:this.at(n,e)},intersectsPlane:function(t){var e=t.distanceToPoint(this.origin);if(0===e)return!0;return t.normal.dot(this.direction)*e<0},intersectBox:function(t,e){var n,r,i,o,a,s,u=1/this.direction.x,c=1/this.direction.y,l=1/this.direction.z,h=this.origin;return u>=0?(n=(t.min.x-h.x)*u,r=(t.max.x-h.x)*u):(n=(t.max.x-h.x)*u,r=(t.min.x-h.x)*u),c>=0?(i=(t.min.y-h.y)*c,o=(t.max.y-h.y)*c):(i=(t.max.y-h.y)*c,o=(t.min.y-h.y)*c),n>o||i>r?null:((i>n||n!=n)&&(n=i),(o<r||r!=r)&&(r=o),l>=0?(a=(t.min.z-h.z)*l,s=(t.max.z-h.z)*l):(a=(t.max.z-h.z)*l,s=(t.min.z-h.z)*l),n>s||a>r?null:((a>n||n!=n)&&(n=a),(s<r||r!=r)&&(r=s),r<0?null:this.at(n>=0?n:r,e)))},intersectsBox:function(){var t=new l;return function(e){return null!==this.intersectBox(e,t)}}(),intersectTriangle:function(){var t=new l,e=new l,n=new l,r=new l;return function(i,o,a,s,u){e.subVectors(o,i),n.subVectors(a,i),r.crossVectors(e,n);var c,l=this.direction.dot(r);if(l>0){if(s)return null;c=1}else{if(!(l<0))return null;c=-1,l=-l}t.subVectors(this.origin,i);var h=c*this.direction.dot(n.crossVectors(t,n));if(h<0)return null;var p=c*this.direction.dot(e.cross(t));if(p<0)return null;if(h+p>l)return null;var d=-c*t.dot(r);return d<0?null:this.at(d/l,u)}}(),applyMatrix4:function(t){return this.origin.applyMatrix4(t),this.direction.transformDirection(t),this},equals:function(t){return t.origin.equals(this.origin)&&t.direction.equals(this.direction)}}),Object.assign(Ut.prototype,{set:function(t,e){return this.start.copy(t),this.end.copy(e),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.start.copy(t.start),this.end.copy(t.end),this},getCenter:function(t){return(t||new l).addVectors(this.start,this.end).multiplyScalar(.5)},delta:function(t){return(t||new l).subVectors(this.end,this.start)},distanceSq:function(){return this.start.distanceToSquared(this.end)},distance:function(){return this.start.distanceTo(this.end)},at:function(t,e){var n=e||new l;return this.delta(n).multiplyScalar(t).add(this.start)},closestPointToPointParameter:function(){var t=new l,e=new l;return function(n,r){t.subVectors(n,this.start),e.subVectors(this.end,this.start);var i=e.dot(e),o=e.dot(t)/i;return r&&(o=rs.clamp(o,0,1)),o}}(),closestPointToPoint:function(t,e,n){var r=this.closestPointToPointParameter(t,e),i=n||new l;return this.delta(i).multiplyScalar(r).add(this.start)},applyMatrix4:function(t){return this.start.applyMatrix4(t),this.end.applyMatrix4(t),this},equals:function(t){return t.start.equals(this.start)&&t.end.equals(this.end)}}),Object.assign(Ft,{normal:function(){var t=new l;return function(e,n,r,i){var o=i||new l;o.subVectors(r,n),t.subVectors(e,n),o.cross(t);var a=o.lengthSq();return a>0?o.multiplyScalar(1/Math.sqrt(a)):o.set(0,0,0)}}(),barycoordFromPoint:function(){var t=new l,e=new l,n=new l;return function(r,i,o,a,s){t.subVectors(a,i),e.subVectors(o,i),n.subVectors(r,i);var u=t.dot(t),c=t.dot(e),h=t.dot(n),p=e.dot(e),d=e.dot(n),f=u*p-c*c,m=s||new l;if(0===f)return m.set(-2,-1,-1);var v=1/f,g=(p*h-c*d)*v,y=(u*d-c*h)*v;return m.set(1-g-y,y,g)}}(),containsPoint:function(){var t=new l;return function(e,n,r,i){var o=Ft.barycoordFromPoint(e,n,r,i,t);return o.x>=0&&o.y>=0&&o.x+o.y<=1}}()}),Object.assign(Ft.prototype,{set:function(t,e,n){return this.a.copy(t),this.b.copy(e),this.c.copy(n),this},setFromPointsAndIndices:function(t,e,n,r){return this.a.copy(t[e]),this.b.copy(t[n]),this.c.copy(t[r]),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.a.copy(t.a),this.b.copy(t.b),this.c.copy(t.c),this},area:function(){var t=new l,e=new l;return function(){return t.subVectors(this.c,this.b),e.subVectors(this.a,this.b),.5*t.cross(e).length()}}(),midpoint:function(t){return(t||new l).addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)},normal:function(t){return Ft.normal(this.a,this.b,this.c,t)},plane:function(t){return(t||new it).setFromCoplanarPoints(this.a,this.b,this.c)},barycoordFromPoint:function(t,e){return Ft.barycoordFromPoint(t,this.a,this.b,this.c,e)},containsPoint:function(t){return Ft.containsPoint(t,this.a,this.b,this.c)},closestPointToPoint:function(){var t=new it,e=[new Ut,new Ut,new Ut],n=new l,r=new l;return function(i,o){var a=o||new l,s=1/0;if(t.setFromCoplanarPoints(this.a,this.b,this.c),t.projectPoint(i,n),!0===this.containsPoint(n))a.copy(n);else{e[0].set(this.a,this.b),e[1].set(this.b,this.c),e[2].set(this.c,this.a);for(var u=0;u<e.length;u++){e[u].closestPointToPoint(n,!0,r);var c=n.distanceToSquared(r);c<s&&(s=c,a.copy(r))}}return a}}(),equals:function(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}}),kt.prototype=Object.assign(Object.create(lt.prototype),{constructor:kt,isMesh:!0,setDrawMode:function(t){this.drawMode=t},copy:function(t){return lt.prototype.copy.call(this,t),this.drawMode=t.drawMode,this},updateMorphTargets:function(){var t,e,n,r=this.geometry;if(r.isBufferGeometry){var i=r.morphAttributes,o=Object.keys(i);if(o.length>0){var a=i[o[0]];if(void 0!==a)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},t=0,e=a.length;t<e;t++)n=a[t].name||String(t),this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=t}}else{var s=r.morphTargets;if(void 0!==s&&s.length>0)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},t=0,e=s.length;t<e;t++)n=s[t].name||String(t),this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=t}},raycast:function(){function t(t,e,n,r,i,o,a){return Ft.barycoordFromPoint(t,e,n,r,y),i.multiplyScalar(y.x),o.multiplyScalar(y.y),a.multiplyScalar(y.z),i.add(o).add(a),i.clone()}function e(t,e,n,r,i,o,a,s){if(null===(e.side===Ji?r.intersectTriangle(a,o,i,!0,s):r.intersectTriangle(i,o,a,e.side!==Qi,s)))return null;b.copy(s),b.applyMatrix4(t.matrixWorld);var u=n.ray.origin.distanceTo(b);return u<n.near||u>n.far?null:{distance:u,point:b.clone(),object:t}}function n(n,r,i,o,a,l,h,p){s.fromBufferAttribute(o,l),u.fromBufferAttribute(o,h),c.fromBufferAttribute(o,p);var d=e(n,n.material,r,i,s,u,c,_);return d&&(a&&(m.fromBufferAttribute(a,l),v.fromBufferAttribute(a,h),g.fromBufferAttribute(a,p),d.uv=t(_,s,u,c,m,v,g)),d.face=new ft(l,h,p,Ft.normal(s,u,c)),d.faceIndex=l),d}var r=new h,o=new Dt,a=new nt,s=new l,u=new l,c=new l,p=new l,d=new l,f=new l,m=new i,v=new i,g=new i,y=new l,_=new l,b=new l;return function(i,l){var h=this.geometry,y=this.material,b=this.matrixWorld;if(void 0!==y&&(null===h.boundingSphere&&h.computeBoundingSphere(),a.copy(h.boundingSphere),a.applyMatrix4(b),!1!==i.ray.intersectsSphere(a)&&(r.getInverse(b),o.copy(i.ray).applyMatrix4(r),null===h.boundingBox||!1!==o.intersectsBox(h.boundingBox)))){var x;if(h.isBufferGeometry){var w,E,M,T,S,C=h.index,A=h.attributes.position,P=h.attributes.uv;if(null!==C)for(T=0,S=C.count;T<S;T+=3)w=C.getX(T),E=C.getX(T+1),M=C.getX(T+2),(x=n(this,i,o,A,P,w,E,M))&&(x.faceIndex=Math.floor(T/3),l.push(x));else for(T=0,S=A.count;T<S;T+=3)(x=n(this,i,o,A,P,w=T,E=T+1,M=T+2))&&(x.index=w,l.push(x))}else if(h.isGeometry){var R,L,I,O,N=Array.isArray(y),D=h.vertices,U=h.faces,F=h.faceVertexUvs[0];F.length>0&&(O=F);for(var k=0,z=U.length;k<z;k++){var B=U[k],H=N?y[B.materialIndex]:y;if(void 0!==H){if(R=D[B.a],L=D[B.b],I=D[B.c],!0===H.morphTargets){var G=h.morphTargets,j=this.morphTargetInfluences;s.set(0,0,0),u.set(0,0,0),c.set(0,0,0);for(var V=0,W=G.length;V<W;V++){var q=j[V];if(0!==q){var X=G[V].vertices;s.addScaledVector(p.subVectors(X[B.a],R),q),u.addScaledVector(d.subVectors(X[B.b],L),q),c.addScaledVector(f.subVectors(X[B.c],I),q)}}s.add(R),u.add(L),c.add(I),R=s,L=u,I=c}if(x=e(this,H,i,o,R,L,I,_)){if(O&&O[k]){var Y=O[k];m.copy(Y[0]),v.copy(Y[1]),g.copy(Y[2]),x.uv=t(_,R,L,I,m,v,g)}x.face=B,x.faceIndex=k,l.push(x)}}}}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}});var bs=0;te.prototype=Object.assign(Object.create(dt.prototype),{constructor:te,isArrayCamera:!0}),re.prototype.isFogExp2=!0,re.prototype.clone=function(){return new re(this.color.getHex(),this.density)},re.prototype.toJSON=function(t){return{type:"FogExp2",color:this.color.getHex(),density:this.density}},ie.prototype.isFog=!0,ie.prototype.clone=function(){return new ie(this.color.getHex(),this.near,this.far)},ie.prototype.toJSON=function(t){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}},oe.prototype=Object.assign(Object.create(lt.prototype),{constructor:oe,copy:function(t,e){return lt.prototype.copy.call(this,t,e),null!==t.background&&(this.background=t.background.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:function(t){var e=lt.prototype.toJSON.call(this,t);return null!==this.background&&(e.object.background=this.background.toJSON(t)),null!==this.fog&&(e.object.fog=this.fog.toJSON()),e}}),ae.prototype=Object.assign(Object.create(lt.prototype),{constructor:ae,isLensFlare:!0,copy:function(t){lt.prototype.copy.call(this,t),this.positionScreen.copy(t.positionScreen),this.customUpdateCallback=t.customUpdateCallback;for(var e=0,n=t.lensFlares.length;e<n;e++)this.lensFlares.push(t.lensFlares[e]);return this},add:function(t,e,n,r,i,o){void 0===e&&(e=-1),void 0===n&&(n=0),void 0===o&&(o=1),void 0===i&&(i=new q(16777215)),void 0===r&&(r=oo),n=Math.min(n,Math.max(0,n)),this.lensFlares.push({texture:t,size:e,distance:n,x:0,y:0,z:0,scale:1,rotation:0,opacity:o,color:i,blending:r})},updateLensFlares:function(){var t,e,n=this.lensFlares.length,r=2*-this.positionScreen.x,i=2*-this.positionScreen.y;for(t=0;t<n;t++)(e=this.lensFlares[t]).x=this.positionScreen.x+r*e.distance,e.y=this.positionScreen.y+i*e.distance,e.wantedRotation=e.x*Math.PI*.25,e.rotation+=.25*(e.wantedRotation-e.rotation)}}),(se.prototype=Object.create(J.prototype)).constructor=se,se.prototype.isSpriteMaterial=!0,se.prototype.copy=function(t){return J.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.rotation=t.rotation,this},ue.prototype=Object.assign(Object.create(lt.prototype),{constructor:ue,isSprite:!0,raycast:function(){var t=new l,e=new l,n=new l;return function(r,i){e.setFromMatrixPosition(this.matrixWorld),r.ray.closestPointToPoint(e,t),n.setFromMatrixScale(this.matrixWorld);var o=n.x*n.y/4;if(!(e.distanceToSquared(t)>o)){var a=r.ray.origin.distanceTo(t);a<r.near||a>r.far||i.push({distance:a,point:t.clone(),face:null,object:this})}}}(),clone:function(){return new this.constructor(this.material).copy(this)}}),ce.prototype=Object.assign(Object.create(lt.prototype),{constructor:ce,copy:function(t){lt.prototype.copy.call(this,t,!1);for(var e=t.levels,n=0,r=e.length;n<r;n++){var i=e[n];this.addLevel(i.object.clone(),i.distance)}return this},addLevel:function(t,e){void 0===e&&(e=0),e=Math.abs(e);for(var n=this.levels,r=0;r<n.length&&!(e<n[r].distance);r++);n.splice(r,0,{distance:e,object:t}),this.add(t)},getObjectForDistance:function(t){for(var e=this.levels,n=1,r=e.length;n<r&&!(t<e[n].distance);n++);return e[n-1].object},raycast:function(){var t=new l;return function(e,n){t.setFromMatrixPosition(this.matrixWorld);var r=e.ray.origin.distanceTo(t);this.getObjectForDistance(r).raycast(e,n)}}(),update:function(){var t=new l,e=new l;return function(n){var r=this.levels;if(r.length>1){t.setFromMatrixPosition(n.matrixWorld),e.setFromMatrixPosition(this.matrixWorld);var i=t.distanceTo(e);r[0].object.visible=!0;for(var o=1,a=r.length;o<a&&i>=r[o].distance;o++)r[o-1].object.visible=!1,r[o].object.visible=!0;for(;o<a;o++)r[o].object.visible=!1}}}(),toJSON:function(t){var e=lt.prototype.toJSON.call(this,t);e.object.levels=[];for(var n=this.levels,r=0,i=n.length;r<i;r++){var o=n[r];e.object.levels.push({object:o.object.uuid,distance:o.distance})}return e}}),Object.assign(le.prototype,{calculateInverses:function(){this.boneInverses=[];for(var t=0,e=this.bones.length;t<e;t++){var n=new h;this.bones[t]&&n.getInverse(this.bones[t].matrixWorld),this.boneInverses.push(n)}},pose:function(){var t,e,n;for(e=0,n=this.bones.length;e<n;e++)(t=this.bones[e])&&t.matrixWorld.getInverse(this.boneInverses[e]);for(e=0,n=this.bones.length;e<n;e++)(t=this.bones[e])&&(t.parent&&t.parent.isBone?(t.matrix.getInverse(t.parent.matrixWorld),t.matrix.multiply(t.matrixWorld)):t.matrix.copy(t.matrixWorld),t.matrix.decompose(t.position,t.quaternion,t.scale))},update:function(){var t=new h,e=new h;return function(){for(var n=this.bones,r=this.boneInverses,i=this.boneMatrices,o=this.boneTexture,a=0,s=n.length;a<s;a++){var u=n[a]?n[a].matrixWorld:e;t.multiplyMatrices(u,r[a]),t.toArray(i,16*a)}void 0!==o&&(o.needsUpdate=!0)}}(),clone:function(){return new le(this.bones,this.boneInverses)}}),he.prototype=Object.assign(Object.create(lt.prototype),{constructor:he,isBone:!0}),pe.prototype=Object.assign(Object.create(kt.prototype),{constructor:pe,isSkinnedMesh:!0,initBones:function(){var t,e,n,r,i=[];if(this.geometry&&void 0!==this.geometry.bones){for(n=0,r=this.geometry.bones.length;n<r;n++)e=this.geometry.bones[n],t=new he,i.push(t),t.name=e.name,t.position.fromArray(e.pos),t.quaternion.fromArray(e.rotq),void 0!==e.scl&&t.scale.fromArray(e.scl);for(n=0,r=this.geometry.bones.length;n<r;n++)-1!==(e=this.geometry.bones[n]).parent&&null!==e.parent&&void 0!==i[e.parent]?i[e.parent].add(i[n]):this.add(i[n])}return this.updateMatrixWorld(!0),i},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(){var t,e;if(this.geometry&&this.geometry.isGeometry)for(e=0;e<this.geometry.skinWeights.length;e++){var n=this.geometry.skinWeights[e];(t=1/n.lengthManhattan())!==1/0?n.multiplyScalar(t):n.set(1,0,0,0)}else if(this.geometry&&this.geometry.isBufferGeometry){var r=new a,i=this.geometry.attributes.skinWeight;for(e=0;e<i.count;e++)r.x=i.getX(e),r.y=i.getY(e),r.z=i.getZ(e),r.w=i.getW(e),(t=1/r.lengthManhattan())!==1/0?r.multiplyScalar(t):r.set(1,0,0,0),i.setXYZW(e,r.x,r.y,r.z,r.w)}},updateMatrixWorld:function(t){kt.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)},clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),(de.prototype=Object.create(J.prototype)).constructor=de,de.prototype.isLineBasicMaterial=!0,de.prototype.copy=function(t){return J.prototype.copy.call(this,t),this.color.copy(t.color),this.linewidth=t.linewidth,this.linecap=t.linecap,this.linejoin=t.linejoin,this},fe.prototype=Object.assign(Object.create(lt.prototype),{constructor:fe,isLine:!0,raycast:function(){var t=new h,e=new Dt,n=new nt;return function(r,i){var o=r.linePrecision,a=o*o,s=this.geometry,u=this.matrixWorld;if(null===s.boundingSphere&&s.computeBoundingSphere(),n.copy(s.boundingSphere),n.applyMatrix4(u),!1!==r.ray.intersectsSphere(n)){t.getInverse(u),e.copy(r.ray).applyMatrix4(t);var c=new l,h=new l,p=new l,d=new l,f=this&&this.isLineSegments?2:1;if(s.isBufferGeometry){var m=s.index,v=s.attributes.position.array;if(null!==m)for(var g=m.array,y=0,_=g.length-1;y<_;y+=f){var b=g[y],x=g[y+1];c.fromArray(v,3*b),h.fromArray(v,3*x);if(!((M=e.distanceSqToSegment(c,h,d,p))>a)){d.applyMatrix4(this.matrixWorld);(T=r.ray.origin.distanceTo(d))<r.near||T>r.far||i.push({distance:T,point:p.clone().applyMatrix4(this.matrixWorld),index:y,face:null,faceIndex:null,object:this})}}else for(var y=0,_=v.length/3-1;y<_;y+=f){c.fromArray(v,3*y),h.fromArray(v,3*y+3);if(!((M=e.distanceSqToSegment(c,h,d,p))>a)){d.applyMatrix4(this.matrixWorld);(T=r.ray.origin.distanceTo(d))<r.near||T>r.far||i.push({distance:T,point:p.clone().applyMatrix4(this.matrixWorld),index:y,face:null,faceIndex:null,object:this})}}}else if(s.isGeometry)for(var w=s.vertices,E=w.length,y=0;y<E-1;y+=f){var M=e.distanceSqToSegment(w[y],w[y+1],d,p);if(!(M>a)){d.applyMatrix4(this.matrixWorld);var T=r.ray.origin.distanceTo(d);T<r.near||T>r.far||i.push({distance:T,point:p.clone().applyMatrix4(this.matrixWorld),index:y,face:null,faceIndex:null,object:this})}}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),me.prototype=Object.assign(Object.create(fe.prototype),{constructor:me,isLineSegments:!0}),ve.prototype=Object.assign(Object.create(fe.prototype),{constructor:ve,isLineLoop:!0}),(ge.prototype=Object.create(J.prototype)).constructor=ge,ge.prototype.isPointsMaterial=!0,ge.prototype.copy=function(t){return J.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.size=t.size,this.sizeAttenuation=t.sizeAttenuation,this},ye.prototype=Object.assign(Object.create(lt.prototype),{constructor:ye,isPoints:!0,raycast:function(){var t=new h,e=new Dt,n=new nt;return function(r,i){function o(t,n){var o=e.distanceSqToPoint(t);if(o<p){var s=e.closestPointToPoint(t);s.applyMatrix4(u);var c=r.ray.origin.distanceTo(s);if(c<r.near||c>r.far)return;i.push({distance:c,distanceToRay:Math.sqrt(o),point:s.clone(),index:n,face:null,object:a})}}var a=this,s=this.geometry,u=this.matrixWorld,c=r.params.Points.threshold;if(null===s.boundingSphere&&s.computeBoundingSphere(),n.copy(s.boundingSphere),n.applyMatrix4(u),n.radius+=c,!1!==r.ray.intersectsSphere(n)){t.getInverse(u),e.copy(r.ray).applyMatrix4(t);var h=c/((this.scale.x+this.scale.y+this.scale.z)/3),p=h*h,d=new l;if(s.isBufferGeometry){var f=s.index,m=s.attributes.position.array;if(null!==f)for(var v=f.array,g=0,y=v.length;g<y;g++){var _=v[g];d.fromArray(m,3*_),o(d,_)}else for(var g=0,b=m.length/3;g<b;g++)d.fromArray(m,3*g),o(d,g)}else for(var x=s.vertices,g=0,b=x.length;g<b;g++)o(x[g],g)}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),_e.prototype=Object.assign(Object.create(lt.prototype),{constructor:_e}),(be.prototype=Object.create(o.prototype)).constructor=be,(xe.prototype=Object.create(o.prototype)).constructor=xe,xe.prototype.isCompressedTexture=!0,(we.prototype=Object.create(o.prototype)).constructor=we,we.prototype.isDepthTexture=!0,(Ee.prototype=Object.create(Pt.prototype)).constructor=Ee,(Me.prototype=Object.create(vt.prototype)).constructor=Me,(Te.prototype=Object.create(Pt.prototype)).constructor=Te,(Se.prototype=Object.create(vt.prototype)).constructor=Se,(Ce.prototype=Object.create(Pt.prototype)).constructor=Ce,(Ae.prototype=Object.create(vt.prototype)).constructor=Ae,(Pe.prototype=Object.create(Ce.prototype)).constructor=Pe,(Re.prototype=Object.create(vt.prototype)).constructor=Re,(Le.prototype=Object.create(Ce.prototype)).constructor=Le,(Ie.prototype=Object.create(vt.prototype)).constructor=Ie,(Oe.prototype=Object.create(Ce.prototype)).constructor=Oe,(Ne.prototype=Object.create(vt.prototype)).constructor=Ne,(De.prototype=Object.create(Ce.prototype)).constructor=De,(Ue.prototype=Object.create(vt.prototype)).constructor=Ue,(Fe.prototype=Object.create(Pt.prototype)).constructor=Fe,(ke.prototype=Object.create(vt.prototype)).constructor=ke,(ze.prototype=Object.create(Pt.prototype)).constructor=ze,(Be.prototype=Object.create(vt.prototype)).constructor=Be,(He.prototype=Object.create(Pt.prototype)).constructor=He;var xs={area:function(t){for(var e=t.length,n=0,r=e-1,i=0;i<e;r=i++)n+=t[r].x*t[i].y-t[i].x*t[r].y;return.5*n},triangulate:function(){function t(t,e,n,r,i,o){var a,s,u,c,l,h,p,d,f;if(s=t[o[e]].x,u=t[o[e]].y,c=t[o[n]].x,l=t[o[n]].y,h=t[o[r]].x,p=t[o[r]].y,(c-s)*(p-u)-(l-u)*(h-s)<=0)return!1;var m,v,g,y,_,b,x,w,E,M,T,S,C,A,P;for(m=h-c,v=p-l,g=s-h,y=u-p,_=c-s,b=l-u,a=0;a<i;a++)if(d=t[o[a]].x,f=t[o[a]].y,!(d===s&&f===u||d===c&&f===l||d===h&&f===p)&&(x=d-s,w=f-u,E=d-c,M=f-l,T=d-h,S=f-p,P=m*M-v*E,C=_*w-b*x,A=g*S-y*T,P>=-Number.EPSILON&&A>=-Number.EPSILON&&C>=-Number.EPSILON))return!1;return!0}return function(e,n){var r=e.length;if(r<3)return null;var i,o,a,s=[],u=[],c=[];if(xs.area(e)>0)for(o=0;o<r;o++)u[o]=o;else for(o=0;o<r;o++)u[o]=r-1-o;var l=r,h=2*l;for(o=l-1;l>2;){if(h--<=0)return console.warn("THREE.ShapeUtils: Unable to triangulate polygon! in triangulate()"),n?c:s;if(i=o,l<=i&&(i=0),o=i+1,l<=o&&(o=0),a=o+1,l<=a&&(a=0),t(e,i,o,a,l,u)){var p,d,f,m,v;for(p=u[i],d=u[o],f=u[a],s.push([e[p],e[d],e[f]]),c.push([u[i],u[o],u[a]]),m=o,v=o+1;v<l;m++,v++)u[m]=u[v];h=2*--l}}return n?c:s}}(),triangulateShape:function(t,e){function n(t){var e=t.length;e>2&&t[e-1].equals(t[0])&&t.pop()}function r(t,e,n){return t.x!==e.x?t.x<e.x?t.x<=n.x&&n.x<=e.x:e.x<=n.x&&n.x<=t.x:t.y<e.y?t.y<=n.y&&n.y<=e.y:e.y<=n.y&&n.y<=t.y}function i(t,e,n,i,o){var a=e.x-t.x,s=e.y-t.y,u=i.x-n.x,c=i.y-n.y,l=t.x-n.x,h=t.y-n.y,p=s*u-a*c,d=s*l-a*h;if(Math.abs(p)>Number.EPSILON){var f;if(p>0){if(d<0||d>p)return[];if((f=c*l-u*h)<0||f>p)return[]}else{if(d>0||d<p)return[];if((f=c*l-u*h)>0||f<p)return[]}if(0===f)return!o||0!==d&&d!==p?[t]:[];if(f===p)return!o||0!==d&&d!==p?[e]:[];if(0===d)return[n];if(d===p)return[i];var m=f/p;return[{x:t.x+m*a,y:t.y+m*s}]}if(0!==d||c*l!=u*h)return[];var v=0===a&&0===s,g=0===u&&0===c;if(v&&g)return t.x!==n.x||t.y!==n.y?[]:[t];if(v)return r(n,i,t)?[t]:[];if(g)return r(t,e,n)?[n]:[];var y,_,b,x,w,E,M,T;return 0!==a?(t.x<e.x?(y=t,b=t.x,_=e,x=e.x):(y=e,b=e.x,_=t,x=t.x),n.x<i.x?(w=n,M=n.x,E=i,T=i.x):(w=i,M=i.x,E=n,T=n.x)):(t.y<e.y?(y=t,b=t.y,_=e,x=e.y):(y=e,b=e.y,_=t,x=t.y),n.y<i.y?(w=n,M=n.y,E=i,T=i.y):(w=i,M=i.y,E=n,T=n.y)),b<=M?x<M?[]:x===M?o?[]:[w]:x<=T?[w,_]:[w,E]:b>T?[]:b===T?o?[]:[y]:x<=T?[y,_]:[y,E]}function o(t,e,n,r){var i=e.x-t.x,o=e.y-t.y,a=n.x-t.x,s=n.y-t.y,u=r.x-t.x,c=r.y-t.y,l=i*s-o*a,h=i*c-o*u;if(Math.abs(l)>Number.EPSILON){var p=u*s-c*a;return l>0?h>=0&&p>=0:h>=0||p>=0}return h>0}n(t),e.forEach(n);for(var a,s,u,c,l,h,p={},d=t.concat(),f=0,m=e.length;f<m;f++)Array.prototype.push.apply(d,e[f]);for(a=0,s=d.length;a<s;a++)void 0!==p[l=d[a].x+":"+d[a].y]&&console.warn("THREE.ShapeUtils: Duplicate point",l,a),p[l]=a;var v=function(t,e){function n(t,e){var n=y.length-1,r=t-1;r<0&&(r=n);var i=t+1;i>n&&(i=0);var a=o(y[t],y[r],y[i],s[e]);if(!a)return!1;var u=s.length-1,c=e-1;c<0&&(c=u);var l=e+1;return l>u&&(l=0),!!(a=o(s[e],s[c],s[l],y[t]))}function r(t,e){var n,r;for(n=0;n<y.length;n++)if(r=n+1,r%=y.length,i(t,e,y[n],y[r],!0).length>0)return!0;return!1}function a(t,n){var r,o,a,s;for(r=0;r<_.length;r++)for(o=e[_[r]],a=0;a<o.length;a++)if(s=a+1,s%=o.length,i(t,n,o[a],o[s],!0).length>0)return!0;return!1}for(var s,u,c,l,h,p,d,f,m,v,g,y=t.concat(),_=[],b=[],x=0,w=e.length;x<w;x++)_.push(x);for(var E=0,M=2*_.length;_.length>0;){if(--M<0){console.log('THREE.ShapeUtils: Infinite Loop! Holes left:" + indepHoles.length + ", Probably Hole outside Shape!');break}for(c=E;c<y.length;c++){for(l=y[c],u=-1,x=0;x<_.length;x++)if(p=_[x],d=l.x+":"+l.y+":"+p,void 0===b[d]){s=e[p];for(var T=0;T<s.length;T++)if(h=s[T],n(c,T)&&!r(l,h)&&!a(l,h)){u=T,_.splice(x,1),f=y.slice(0,c+1),m=y.slice(c),v=s.slice(u),g=s.slice(0,u+1),y=f.concat(v).concat(g).concat(m),E=c;break}if(u>=0)break;b[d]=!0}if(u>=0)break}}return y}(t,e),g=xs.triangulate(v,!1);for(a=0,s=g.length;a<s;a++)for(c=g[a],u=0;u<3;u++)void 0!==(h=p[l=c[u].x+":"+c[u].y])&&(c[u]=h);return g.concat()},isClockWise:function(t){return xs.area(t)<0}};(Ge.prototype=Object.create(vt.prototype)).constructor=Ge,(je.prototype=Object.create(Pt.prototype)).constructor=je,je.prototype.getArrays=function(){var t=this.getAttribute("position"),e=t?Array.prototype.slice.call(t.array):[],n=this.getAttribute("uv"),r=n?Array.prototype.slice.call(n.array):[],i=this.index;return{position:e,uv:r,index:i?Array.prototype.slice.call(i.array):[]}},je.prototype.addShapeList=function(t,e){var n=t.length;e.arrays=this.getArrays();for(var r=0;r<n;r++){var i=t[r];this.addShape(i,e)}this.setIndex(e.arrays.index),this.addAttribute("position",new Tt(e.arrays.position,3)),this.addAttribute("uv",new Tt(e.arrays.uv,2))},je.prototype.addShape=function(t,e){function n(t,e,n){return e||console.error("THREE.ExtrudeGeometry: vec does not exist"),e.clone().multiplyScalar(n).add(t)}function r(t,e,n){var r,o,a,s=t.x-e.x,u=t.y-e.y,c=n.x-t.x,l=n.y-t.y,h=s*s+u*u,p=s*l-u*c;if(Math.abs(p)>Number.EPSILON){var d=Math.sqrt(h),f=Math.sqrt(c*c+l*l),m=e.x-u/d,v=e.y+s/d,g=((n.x-l/f-m)*l-(n.y+c/f-v)*c)/(s*l-u*c),y=(r=m+s*g-t.x)*r+(o=v+u*g-t.y)*o;if(y<=2)return new i(r,o);a=Math.sqrt(y/2)}else{var _=!1;s>Number.EPSILON?c>Number.EPSILON&&(_=!0):s<-Number.EPSILON?c<-Number.EPSILON&&(_=!0):Math.sign(u)===Math.sign(l)&&(_=!0),_?(r=-u,o=s,a=Math.sqrt(h)):(r=s,o=u,a=Math.sqrt(h/2))}return new i(r/a,o/a)}function o(t,e){var n,r;for(K=t.length;--K>=0;){n=K,(r=K-1)<0&&(r=t.length-1);var i=0,o=C+2*M;for(i=0;i<o;i++){var a=q*i,s=q*(i+1);!function(t,e,n,r,i,o,a,s,l){u(t),u(e),u(r),u(e),u(n),u(r);var h=g.length/3,p=R.generateSideWallUV(N,g,h-6,h-3,h-2,h-1);c(p[0]),c(p[1]),c(p[3]),c(p[1]),c(p[2]),c(p[3])}(e+n+a,e+r+a,e+r+s,e+n+s)}}}function a(t,e,n){b.push(t),b.push(e),b.push(n)}function s(t,e,n){u(t),u(e),u(n);var r=g.length/3,i=R.generateTopUV(N,g,r-3,r-2,r-1);c(i[0]),c(i[1]),c(i[2])}function u(t){y.push(g.length/3),g.push(b[3*t+0]),g.push(b[3*t+1]),g.push(b[3*t+2])}function c(t){_.push(t.x),_.push(t.y)}var h,p,d,f,m,v=e.arrays?e.arrays:this.getArrays(),g=v.position,y=v.index,_=v.uv,b=[],x=void 0!==e.amount?e.amount:100,w=void 0!==e.bevelThickness?e.bevelThickness:6,E=void 0!==e.bevelSize?e.bevelSize:w-2,M=void 0!==e.bevelSegments?e.bevelSegments:3,T=void 0===e.bevelEnabled||e.bevelEnabled,S=void 0!==e.curveSegments?e.curveSegments:12,C=void 0!==e.steps?e.steps:1,A=e.extrudePath,P=!1,R=void 0!==e.UVGenerator?e.UVGenerator:Ge.WorldUVGenerator;A&&(h=A.getSpacedPoints(C),P=!0,T=!1,p=void 0!==e.frames?e.frames:A.computeFrenetFrames(C,!1),d=new l,f=new l,m=new l),T||(M=0,w=0,E=0);var L,I,O,N=this,D=t.extractPoints(S),U=D.shape,F=D.holes;if(!xs.isClockWise(U))for(U=U.reverse(),I=0,O=F.length;I<O;I++)L=F[I],xs.isClockWise(L)&&(F[I]=L.reverse());var k=xs.triangulateShape(U,F),z=U;for(I=0,O=F.length;I<O;I++)L=F[I],U=U.concat(L);for(var B,H,G,j,V,W,q=U.length,X=k.length,Y=[],K=0,Z=z.length,J=Z-1,Q=K+1;K<Z;K++,J++,Q++)J===Z&&(J=0),Q===Z&&(Q=0),Y[K]=r(z[K],z[J],z[Q]);var $,tt=[],et=Y.concat();for(I=0,O=F.length;I<O;I++){for(L=F[I],$=[],K=0,J=(Z=L.length)-1,Q=K+1;K<Z;K++,J++,Q++)J===Z&&(J=0),Q===Z&&(Q=0),$[K]=r(L[K],L[J],L[Q]);tt.push($),et=et.concat($)}for(B=0;B<M;B++){for(G=B/M,j=w*Math.cos(G*Math.PI/2),H=E*Math.sin(G*Math.PI/2),K=0,Z=z.length;K<Z;K++)a((V=n(z[K],Y[K],H)).x,V.y,-j);for(I=0,O=F.length;I<O;I++)for(L=F[I],$=tt[I],K=0,Z=L.length;K<Z;K++)a((V=n(L[K],$[K],H)).x,V.y,-j)}for(H=E,K=0;K<q;K++)V=T?n(U[K],et[K],H):U[K],P?(f.copy(p.normals[0]).multiplyScalar(V.x),d.copy(p.binormals[0]).multiplyScalar(V.y),m.copy(h[0]).add(f).add(d),a(m.x,m.y,m.z)):a(V.x,V.y,0);var nt;for(nt=1;nt<=C;nt++)for(K=0;K<q;K++)V=T?n(U[K],et[K],H):U[K],P?(f.copy(p.normals[nt]).multiplyScalar(V.x),d.copy(p.binormals[nt]).multiplyScalar(V.y),m.copy(h[nt]).add(f).add(d),a(m.x,m.y,m.z)):a(V.x,V.y,x/C*nt);for(B=M-1;B>=0;B--){for(G=B/M,j=w*Math.cos(G*Math.PI/2),H=E*Math.sin(G*Math.PI/2),K=0,Z=z.length;K<Z;K++)a((V=n(z[K],Y[K],H)).x,V.y,x+j);for(I=0,O=F.length;I<O;I++)for(L=F[I],$=tt[I],K=0,Z=L.length;K<Z;K++)V=n(L[K],$[K],H),P?a(V.x,V.y+h[C-1].y,h[C-1].x+j):a(V.x,V.y,x+j)}!function(){var t=g.length/3;if(T){var n=0,r=q*n;for(K=0;K<X;K++)s((W=k[K])[2]+r,W[1]+r,W[0]+r);for(r=q*(n=C+2*M),K=0;K<X;K++)s((W=k[K])[0]+r,W[1]+r,W[2]+r)}else{for(K=0;K<X;K++)s((W=k[K])[2],W[1],W[0]);for(K=0;K<X;K++)s((W=k[K])[0]+q*C,W[1]+q*C,W[2]+q*C)}N.addGroup(t,g.length/3-t,void 0!==e.material?e.material:0)}(),function(){var t=g.length/3,n=0;for(o(z,n),n+=z.length,I=0,O=F.length;I<O;I++)o(L=F[I],n),n+=L.length;N.addGroup(t,g.length/3-t,void 0!==e.extrudeMaterial?e.extrudeMaterial:1)}(),e.arrays||(this.setIndex(y),this.addAttribute("position",new Tt(g,3)),this.addAttribute("uv",new Tt(e.arrays.uv,2)))},Ge.WorldUVGenerator={generateTopUV:function(t,e,n,r,o){var a=e[3*n],s=e[3*n+1],u=e[3*r],c=e[3*r+1],l=e[3*o],h=e[3*o+1];return[new i(a,s),new i(u,c),new i(l,h)]},generateSideWallUV:function(t,e,n,r,o,a){var s=e[3*n],u=e[3*n+1],c=e[3*n+2],l=e[3*r],h=e[3*r+1],p=e[3*r+2],d=e[3*o],f=e[3*o+1],m=e[3*o+2],v=e[3*a],g=e[3*a+1],y=e[3*a+2];return Math.abs(u-h)<.01?[new i(s,1-c),new i(l,1-p),new i(d,1-m),new i(v,1-y)]:[new i(u,1-c),new i(h,1-p),new i(f,1-m),new i(g,1-y)]}},(Ve.prototype=Object.create(vt.prototype)).constructor=Ve,(We.prototype=Object.create(je.prototype)).constructor=We,(qe.prototype=Object.create(vt.prototype)).constructor=qe,(Xe.prototype=Object.create(Pt.prototype)).constructor=Xe,(Ye.prototype=Object.create(vt.prototype)).constructor=Ye,(Ke.prototype=Object.create(Pt.prototype)).constructor=Ke,(Ze.prototype=Object.create(vt.prototype)).constructor=Ze,(Je.prototype=Object.create(Pt.prototype)).constructor=Je,(Qe.prototype=Object.create(vt.prototype)).constructor=Qe,($e.prototype=Object.create(Pt.prototype)).constructor=$e,(tn.prototype=Object.create(Pt.prototype)).constructor=tn,(en.prototype=Object.create(vt.prototype)).constructor=en,(nn.prototype=Object.create(Pt.prototype)).constructor=nn,(rn.prototype=Object.create(en.prototype)).constructor=rn,(on.prototype=Object.create(nn.prototype)).constructor=on,(an.prototype=Object.create(vt.prototype)).constructor=an,(sn.prototype=Object.create(Pt.prototype)).constructor=sn;var ws=Object.freeze({WireframeGeometry:Ee,ParametricGeometry:Me,ParametricBufferGeometry:Te,TetrahedronGeometry:Ae,TetrahedronBufferGeometry:Pe,OctahedronGeometry:Re,OctahedronBufferGeometry:Le,IcosahedronGeometry:Ie,IcosahedronBufferGeometry:Oe,DodecahedronGeometry:Ne,DodecahedronBufferGeometry:De,PolyhedronGeometry:Se,PolyhedronBufferGeometry:Ce,TubeGeometry:Ue,TubeBufferGeometry:Fe,TorusKnotGeometry:ke,TorusKnotBufferGeometry:ze,TorusGeometry:Be,TorusBufferGeometry:He,TextGeometry:Ve,TextBufferGeometry:We,SphereGeometry:qe,SphereBufferGeometry:Xe,RingGeometry:Ye,RingBufferGeometry:Ke,PlaneGeometry:It,PlaneBufferGeometry:Ot,LatheGeometry:Ze,LatheBufferGeometry:Je,ShapeGeometry:Qe,ShapeBufferGeometry:$e,ExtrudeGeometry:Ge,ExtrudeBufferGeometry:je,EdgesGeometry:tn,ConeGeometry:rn,ConeBufferGeometry:on,CylinderGeometry:en,CylinderBufferGeometry:nn,CircleGeometry:an,CircleBufferGeometry:sn,BoxGeometry:Rt,BoxBufferGeometry:Lt});(un.prototype=Object.create(J.prototype)).constructor=un,un.prototype.isShadowMaterial=!0,(cn.prototype=Object.create(Q.prototype)).constructor=cn,cn.prototype.isRawShaderMaterial=!0,(ln.prototype=Object.create(J.prototype)).constructor=ln,ln.prototype.isMeshStandardMaterial=!0,ln.prototype.copy=function(t){return J.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.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},(hn.prototype=Object.create(ln.prototype)).constructor=hn,hn.prototype.isMeshPhysicalMaterial=!0,hn.prototype.copy=function(t){return ln.prototype.copy.call(this,t),this.defines={PHYSICAL:""},this.reflectivity=t.reflectivity,this.clearCoat=t.clearCoat,this.clearCoatRoughness=t.clearCoatRoughness,this},(pn.prototype=Object.create(J.prototype)).constructor=pn,pn.prototype.isMeshPhongMaterial=!0,pn.prototype.copy=function(t){return J.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.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},(dn.prototype=Object.create(pn.prototype)).constructor=dn,dn.prototype.isMeshToonMaterial=!0,dn.prototype.copy=function(t){return pn.prototype.copy.call(this,t),this.gradientMap=t.gradientMap,this},(fn.prototype=Object.create(J.prototype)).constructor=fn,fn.prototype.isMeshNormalMaterial=!0,fn.prototype.copy=function(t){return J.prototype.copy.call(this,t),this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,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},(mn.prototype=Object.create(J.prototype)).constructor=mn,mn.prototype.isMeshLambertMaterial=!0,mn.prototype.copy=function(t){return J.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},(vn.prototype=Object.create(de.prototype)).constructor=vn,vn.prototype.isLineDashedMaterial=!0,vn.prototype.copy=function(t){return de.prototype.copy.call(this,t),this.scale=t.scale,this.dashSize=t.dashSize,this.gapSize=t.gapSize,this};var Es=Object.freeze({ShadowMaterial:un,SpriteMaterial:se,RawShaderMaterial:cn,ShaderMaterial:Q,PointsMaterial:ge,MeshPhysicalMaterial:hn,MeshStandardMaterial:ln,MeshPhongMaterial:pn,MeshToonMaterial:dn,MeshNormalMaterial:fn,MeshLambertMaterial:mn,MeshDepthMaterial:$,MeshDistanceMaterial:tt,MeshBasicMaterial:Nt,LineDashedMaterial:vn,LineBasicMaterial:de,Material:J}),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={}}},Ts=new gn;Object.assign(yn.prototype,{load:function(t,e,n,r){void 0===t&&(t=""),void 0!==this.path&&(t=this.path+t);var i=this,o=Ms.get(t);if(void 0!==o)return i.manager.itemStart(t),setTimeout(function(){e&&e(o),i.manager.itemEnd(t)},0),o;var a=t.match(/^data:(.*?)(;base64)?,(.*)$/);if(a){var s=a[1],u=!!a[2],c=a[3];c=window.decodeURIComponent(c),u&&(c=window.atob(c));try{var l,h=(this.responseType||"").toLowerCase();switch(h){case"arraybuffer":case"blob":l=new ArrayBuffer(c.length);for(var p=new Uint8Array(l),d=0;d<c.length;d++)p[d]=c.charCodeAt(d);"blob"===h&&(l=new Blob([l],{type:s}));break;case"document":var f=new DOMParser;l=f.parseFromString(c,s);break;case"json":l=JSON.parse(c);break;default:l=c}window.setTimeout(function(){e&&e(l),i.manager.itemEnd(t)},0)}catch(e){window.setTimeout(function(){r&&r(e),i.manager.itemEnd(t),i.manager.itemError(t)},0)}}else{var m=new XMLHttpRequest;m.open("GET",t,!0),m.addEventListener("load",function(n){var o=n.target.response;Ms.add(t,o),200===this.status?(e&&e(o),i.manager.itemEnd(t)):0===this.status?(console.warn("THREE.FileLoader: HTTP Status 0 received."),e&&e(o),i.manager.itemEnd(t)):(r&&r(n),i.manager.itemEnd(t),i.manager.itemError(t))},!1),void 0!==n&&m.addEventListener("progress",function(t){n(t)},!1),m.addEventListener("error",function(e){r&&r(e),i.manager.itemEnd(t),i.manager.itemError(t)},!1),void 0!==this.responseType&&(m.responseType=this.responseType),void 0!==this.withCredentials&&(m.withCredentials=this.withCredentials),m.overrideMimeType&&m.overrideMimeType(void 0!==this.mimeType?this.mimeType:"text/plain");for(var v in this.requestHeader)m.setRequestHeader(v,this.requestHeader[v]);m.send(null)}return i.manager.itemStart(t),m},setPath:function(t){return this.path=t,this},setResponseType:function(t){return this.responseType=t,this},setWithCredentials:function(t){return this.withCredentials=t,this},setMimeType:function(t){return this.mimeType=t,this},setRequestHeader:function(t){return this.requestHeader=t,this}}),Object.assign(_n.prototype,{load:function(t,e,n,r){function i(i){u.load(t[i],function(t){var n=o._parser(t,!0);a[i]={width:n.width,height:n.height,format:n.format,mipmaps:n.mipmaps},6===(c+=1)&&(1===n.mipmapCount&&(s.minFilter=ra),s.format=n.format,s.needsUpdate=!0,e&&e(s))},n,r)}var o=this,a=[],s=new xe;s.image=a;var u=new yn(this.manager);if(u.setPath(this.path),u.setResponseType("arraybuffer"),Array.isArray(t))for(var c=0,l=0,h=t.length;l<h;++l)i(l);else u.load(t,function(t){var n=o._parser(t,!0);if(n.isCubemap)for(var r=n.mipmaps.length/n.mipmapCount,i=0;i<r;i++){a[i]={mipmaps:[]};for(var u=0;u<n.mipmapCount;u++)a[i].mipmaps.push(n.mipmaps[i*n.mipmapCount+u]),a[i].format=n.format,a[i].width=n.width,a[i].height=n.height}else s.image.width=n.width,s.image.height=n.height,s.mipmaps=n.mipmaps;1===n.mipmapCount&&(s.minFilter=ra),s.format=n.format,s.needsUpdate=!0,e&&e(s)},n,r);return s},setPath:function(t){return this.path=t,this}}),Object.assign(bn.prototype,{load:function(t,e,n,r){var i=this,o=new p,a=new yn(this.manager);return a.setResponseType("arraybuffer"),a.load(t,function(t){var n=i._parser(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:Qo,o.wrapT=void 0!==n.wrapT?n.wrapT:Qo,o.magFilter=void 0!==n.magFilter?n.magFilter:ra,o.minFilter=void 0!==n.minFilter?n.minFilter:oa,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),1===n.mipmapCount&&(o.minFilter=ra),o.needsUpdate=!0,e&&e(o,n))},n,r),o}}),Object.assign(xn.prototype,{crossOrigin:"Anonymous",load:function(t,e,n,r){void 0===t&&(t=""),void 0!==this.path&&(t=this.path+t);var i=this,o=Ms.get(t);if(void 0!==o)return i.manager.itemStart(t),setTimeout(function(){e&&e(o),i.manager.itemEnd(t)},0),o;var a=document.createElementNS("http://www.w3.org/1999/xhtml","img");return a.addEventListener("load",function(){Ms.add(t,this),e&&e(this),i.manager.itemEnd(t)},!1),a.addEventListener("error",function(e){r&&r(e),i.manager.itemEnd(t),i.manager.itemError(t)},!1),"data:"!==t.substr(0,5)&&void 0!==this.crossOrigin&&(a.crossOrigin=this.crossOrigin),i.manager.itemStart(t),a.src=t,a},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(wn.prototype,{crossOrigin:"Anonymous",load:function(t,e,n,r){function i(n){a.load(t[n],function(t){o.images[n]=t,6===++s&&(o.needsUpdate=!0,e&&e(o))},void 0,r)}var o=new d,a=new xn(this.manager);a.setCrossOrigin(this.crossOrigin),a.setPath(this.path);for(var s=0,u=0;u<t.length;++u)i(u);return o},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(En.prototype,{crossOrigin:"Anonymous",load:function(t,e,n,r){var i=new xn(this.manager);i.setCrossOrigin(this.crossOrigin),i.setPath(this.path);var a=new o;return a.image=i.load(t,function(){var n=t.search(/\.(jpg|jpeg)$/)>0||0===t.search(/^data\:image\/jpeg/);a.format=n?_a:ba,a.needsUpdate=!0,void 0!==e&&e(a)},n,r),a},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Mn.prototype=Object.assign(Object.create(lt.prototype),{constructor:Mn,isLight:!0,copy:function(t){return lt.prototype.copy.call(this,t),this.color.copy(t.color),this.intensity=t.intensity,this},toJSON:function(t){var e=lt.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}}),Tn.prototype=Object.assign(Object.create(Mn.prototype),{constructor:Tn,isHemisphereLight:!0,copy:function(t){return Mn.prototype.copy.call(this,t),this.groundColor.copy(t.groundColor),this}}),Object.assign(Sn.prototype,{copy:function(t){return this.camera=t.camera.clone(),this.bias=t.bias,this.radius=t.radius,this.mapSize.copy(t.mapSize),this},clone:function(){return(new this.constructor).copy(this)},toJSON:function(){var t={};return 0!==this.bias&&(t.bias=this.bias),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}}),Cn.prototype=Object.assign(Object.create(Sn.prototype),{constructor:Cn,isSpotLightShadow:!0,update:function(t){var e=this.camera,n=2*rs.RAD2DEG*t.angle,r=this.mapSize.width/this.mapSize.height,i=t.distance||e.far;n===e.fov&&r===e.aspect&&i===e.far||(e.fov=n,e.aspect=r,e.far=i,e.updateProjectionMatrix())}}),An.prototype=Object.assign(Object.create(Mn.prototype),{constructor:An,isSpotLight:!0,copy:function(t){return Mn.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}}),Pn.prototype=Object.assign(Object.create(Mn.prototype),{constructor:Pn,isPointLight:!0,copy:function(t){return Mn.prototype.copy.call(this,t),this.distance=t.distance,this.decay=t.decay,this.shadow=t.shadow.clone(),this}}),Rn.prototype=Object.assign(Object.create(Sn.prototype),{constructor:Rn}),Ln.prototype=Object.assign(Object.create(Mn.prototype),{constructor:Ln,isDirectionalLight:!0,copy:function(t){return Mn.prototype.copy.call(this,t),this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}),In.prototype=Object.assign(Object.create(Mn.prototype),{constructor:In,isAmbientLight:!0}),On.prototype=Object.assign(Object.create(Mn.prototype),{constructor:On,isRectAreaLight:!0,copy:function(t){return Mn.prototype.copy.call(this,t),this.width=t.width,this.height=t.height,this},toJSON:function(t){var e=Mn.prototype.toJSON.call(this,t);return e.object.width=this.width,e.object.height=this.height,e}});var Ss={arraySlice:function(t,e,n){return Ss.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){for(var e=t.length,n=new Array(e),r=0;r!==e;++r)n[r]=r;return n.sort(function(e,n){return t[e]-t[n]}),n},sortedArray:function(t,e,n){for(var r=t.length,i=new t.constructor(r),o=0,a=0;a!==r;++o)for(var s=n[o]*e,u=0;u!==e;++u)i[a++]=t[s+u];return i},flattenJSON:function(t,e,n,r){for(var i=1,o=t[0];void 0!==o&&void 0===o[r];)o=t[i++];if(void 0!==o){var a=o[r];if(void 0!==a)if(Array.isArray(a))do{void 0!==(a=o[r])&&(e.push(o.time),n.push.apply(n,a)),o=t[i++]}while(void 0!==o);else if(void 0!==a.toArray)do{void 0!==(a=o[r])&&(e.push(o.time),a.toArray(n,n.length)),o=t[i++]}while(void 0!==o);else do{void 0!==(a=o[r])&&(e.push(o.time),n.push(a)),o=t[i++]}while(void 0!==o)}}};Object.assign(Nn.prototype,{evaluate:function(t){var e=this.parameterPositions,n=this._cachedIndex,r=e[n],i=e[n-1];t:{e:{var o;n:{r:if(!(t<r)){for(s=n+2;;){if(void 0===r){if(t<i)break r;return n=e.length,this._cachedIndex=n,this.afterEnd_(n-1,t,i)}if(n===s)break;if(i=r,r=e[++n],t<r)break e}o=e.length;break n}if(t>=i)break t;var a=e[1];t<a&&(n=2,i=a);for(var s=n-2;;){if(void 0===i)return this._cachedIndex=0,this.beforeStart_(0,t,r);if(n===s)break;if(r=i,i=e[--n-1],t>=i)break e}o=n,n=0}for(;n<o;){var u=n+o>>>1;t<e[u]?o=u:n=u+1}if(r=e[n],void 0===(i=e[n-1]))return this._cachedIndex=0,this.beforeStart_(0,t,r);if(void 0===r)return n=e.length,this._cachedIndex=n,this.afterEnd_(n-1,i,t)}this._cachedIndex=n,this.intervalChanged_(n,i,r)}return this.interpolate_(n,i,t,r)},settings:null,DefaultSettings_:{},getSettings_:function(){return this.settings||this.DefaultSettings_},copySampleValue_:function(t){for(var e=this.resultBuffer,n=this.sampleValues,r=this.valueSize,i=t*r,o=0;o!==r;++o)e[o]=n[i+o];return e},interpolate_:function(t,e,n,r){throw new Error("call to abstract method")},intervalChanged_:function(t,e,n){}}),
//!\ DECLARE ALIAS AFTER assign prototype !
Object.assign(Nn.prototype,{beforeStart_:Nn.prototype.copySampleValue_,afterEnd_:Nn.prototype.copySampleValue_}),Dn.prototype=Object.assign(Object.create(Nn.prototype),{constructor:Dn,DefaultSettings_:{endingStart:Ha,endingEnd:Ha},intervalChanged_:function(t,e,n){var r=this.parameterPositions,i=t-2,o=t+1,a=r[i],s=r[o];if(void 0===a)switch(this.getSettings_().endingStart){case Ga:i=t,a=2*e-n;break;case ja:a=e+r[i=r.length-2]-r[i+1];break;default:i=t,a=n}if(void 0===s)switch(this.getSettings_().endingEnd){case Ga:o=t,s=2*n-e;break;case ja:o=1,s=n+r[1]-r[0];break;default:o=t-1,s=e}var u=.5*(n-e),c=this.valueSize;this._weightPrev=u/(e-a),this._weightNext=u/(s-n),this._offsetPrev=i*c,this._offsetNext=o*c},interpolate_:function(t,e,n,r){for(var i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=t*a,u=s-a,c=this._offsetPrev,l=this._offsetNext,h=this._weightPrev,p=this._weightNext,d=(n-e)/(r-e),f=d*d,m=f*d,v=-h*m+2*h*f-h*d,g=(1+h)*m+(-1.5-2*h)*f+(-.5+h)*d+1,y=(-1-p)*m+(1.5+p)*f+.5*d,_=p*m-p*f,b=0;b!==a;++b)i[b]=v*o[c+b]+g*o[u+b]+y*o[s+b]+_*o[l+b];return i}}),Un.prototype=Object.assign(Object.create(Nn.prototype),{constructor:Un,interpolate_:function(t,e,n,r){for(var i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=t*a,u=s-a,c=(n-e)/(r-e),l=1-c,h=0;h!==a;++h)i[h]=o[u+h]*l+o[s+h]*c;return i}}),Fn.prototype=Object.assign(Object.create(Nn.prototype),{constructor:Fn,interpolate_:function(t,e,n,r){return this.copySampleValue_(t-1)}});var Cs;Cs={TimeBufferType:Float32Array,ValueBufferType:Float32Array,DefaultInterpolation:za,InterpolantFactoryMethodDiscrete:function(t){return new Fn(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodLinear:function(t){return new Un(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodSmooth:function(t){return new Dn(this.times,this.values,this.getValueSize(),t)},setInterpolation:function(t){var e;switch(t){case ka:e=this.InterpolantFactoryMethodDiscrete;break;case za:e=this.InterpolantFactoryMethodLinear;break;case Ba:e=this.InterpolantFactoryMethodSmooth}if(void 0!==e)this.createInterpolant=e;else{var n="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(void 0===this.createInterpolant){if(t===this.DefaultInterpolation)throw new Error(n);this.setInterpolation(this.DefaultInterpolation)}console.warn("THREE.KeyframeTrackPrototype:",n)}},getInterpolation:function(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return ka;case this.InterpolantFactoryMethodLinear:return za;case this.InterpolantFactoryMethodSmooth:return Ba}},getValueSize:function(){return this.values.length/this.times.length},shift:function(t){if(0!==t)for(var e=this.times,n=0,r=e.length;n!==r;++n)e[n]+=t;return this},scale:function(t){if(1!==t)for(var e=this.times,n=0,r=e.length;n!==r;++n)e[n]*=t;return this},trim:function(t,e){for(var n=this.times,r=n.length,i=0,o=r-1;i!==r&&n[i]<t;)++i;for(;-1!==o&&n[o]>e;)--o;if(++o,0!==i||o!==r){i>=o&&(o=Math.max(o,1),i=o-1);var a=this.getValueSize();this.times=Ss.arraySlice(n,i,o),this.values=Ss.arraySlice(this.values,i*a,o*a)}return this},validate:function(){var t=!0,e=this.getValueSize();e-Math.floor(e)!=0&&(console.error("THREE.KeyframeTrackPrototype: Invalid value size in track.",this),t=!1);var n=this.times,r=this.values,i=n.length;0===i&&(console.error("THREE.KeyframeTrackPrototype: Track is empty.",this),t=!1);for(var o=null,a=0;a!==i;a++){var s=n[a];if("number"==typeof s&&isNaN(s)){console.error("THREE.KeyframeTrackPrototype: Time is not a valid number.",this,a,s),t=!1;break}if(null!==o&&o>s){console.error("THREE.KeyframeTrackPrototype: Out of order keys.",this,a,s,o),t=!1;break}o=s}if(void 0!==r&&Ss.isTypedArray(r))for(var a=0,u=r.length;a!==u;++a){var c=r[a];if(isNaN(c)){console.error("THREE.KeyframeTrackPrototype: Value is not a valid number.",this,a,c),t=!1;break}}return t},optimize:function(){for(var t=this.times,e=this.values,n=this.getValueSize(),r=this.getInterpolation()===Ba,i=1,o=t.length-1,a=1;a<o;++a){var s=!1,u=t[a];if(u!==t[a+1]&&(1!==a||u!==u[0]))if(r)s=!0;else for(var c=a*n,l=c-n,h=c+n,p=0;p!==n;++p){var d=e[c+p];if(d!==e[l+p]||d!==e[h+p]){s=!0;break}}if(s){if(a!==i){t[i]=t[a];for(var f=a*n,m=i*n,p=0;p!==n;++p)e[m+p]=e[f+p]}++i}}if(o>0){t[i]=t[o];for(var f=o*n,m=i*n,p=0;p!==n;++p)e[m+p]=e[f+p];++i}return i!==t.length&&(this.times=Ss.arraySlice(t,0,i),this.values=Ss.arraySlice(e,0,i*n)),this}},zn.prototype=Object.assign(Object.create(Cs),{constructor:zn,ValueTypeName:"vector"}),Bn.prototype=Object.assign(Object.create(Nn.prototype),{constructor:Bn,interpolate_:function(t,e,n,r){for(var i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=t*a,u=(n-e)/(r-e),l=s+a;s!==l;s+=4)c.slerpFlat(i,0,o,s-a,o,s,u);return i}}),Hn.prototype=Object.assign(Object.create(Cs),{constructor:Hn,ValueTypeName:"quaternion",DefaultInterpolation:za,InterpolantFactoryMethodLinear:function(t){return new Bn(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodSmooth:void 0}),Gn.prototype=Object.assign(Object.create(Cs),{constructor:Gn,ValueTypeName:"number"}),jn.prototype=Object.assign(Object.create(Cs),{constructor:jn,ValueTypeName:"string",ValueBufferType:Array,DefaultInterpolation:ka,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),Vn.prototype=Object.assign(Object.create(Cs),{constructor:Vn,ValueTypeName:"bool",ValueBufferType:Array,DefaultInterpolation:ka,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),Wn.prototype=Object.assign(Object.create(Cs),{constructor:Wn,ValueTypeName:"color"}),qn.prototype=Cs,Cs.constructor=qn,Object.assign(qn,{parse:function(t){if(void 0===t.type)throw new Error("track type undefined, can not parse");var e=qn._getTrackTypeForValueTypeName(t.type);if(void 0===t.times){var n=[],r=[];Ss.flattenJSON(t.keys,n,r,"value"),t.times=n,t.values=r}return void 0!==e.parse?e.parse(t):new e(t.name,t.times,t.values,t.interpolation)},toJSON:function(t){var e,n=t.constructor;if(void 0!==n.toJSON)e=n.toJSON(t);else{e={name:t.name,times:Ss.convertArray(t.times,Array),values:Ss.convertArray(t.values,Array)};var r=t.getInterpolation();r!==t.DefaultInterpolation&&(e.interpolation=r)}return e.type=t.ValueTypeName,e},_getTrackTypeForValueTypeName:function(t){switch(t.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return Gn;case"vector":case"vector2":case"vector3":case"vector4":return zn;case"color":return Wn;case"quaternion":return Hn;case"bool":case"boolean":return Vn;case"string":return jn}throw new Error("Unsupported typeName: "+t)}}),Object.assign(Xn,{parse:function(t){for(var e=[],n=t.tracks,r=1/(t.fps||1),i=0,o=n.length;i!==o;++i)e.push(qn.parse(n[i]).scale(r));return new Xn(t.name,t.duration,e)},toJSON:function(t){for(var e=[],n=t.tracks,r={name:t.name,duration:t.duration,tracks:e},i=0,o=n.length;i!==o;++i)e.push(qn.toJSON(n[i]));return r},CreateFromMorphTargetSequence:function(t,e,n,r){for(var i=e.length,o=[],a=0;a<i;a++){var s=[],u=[];s.push((a+i-1)%i,a,(a+1)%i),u.push(0,1,0);var c=Ss.getKeyframeOrder(s);s=Ss.sortedArray(s,1,c),u=Ss.sortedArray(u,1,c),r||0!==s[0]||(s.push(i),u.push(u[0])),o.push(new Gn(".morphTargetInfluences["+e[a].name+"]",s,u).scale(1/n))}return new Xn(t,-1,o)},findByName:function(t,e){var n=t;if(!Array.isArray(t)){var r=t;n=r.geometry&&r.geometry.animations||r.animations}for(var i=0;i<n.length;i++)if(n[i].name===e)return n[i];return null},CreateClipsFromMorphTargetSequences:function(t,e,n){for(var r={},i=/^([\w-]*?)([\d]+)$/,o=0,a=t.length;o<a;o++){var s=t[o],u=s.name.match(i);if(u&&u.length>1){var c=r[h=u[1]];c||(r[h]=c=[]),c.push(s)}}var l=[];for(var h in r)l.push(Xn.CreateFromMorphTargetSequence(h,r[h],e,n));return l},parseAnimation:function(t,e){if(!t)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;for(var n=function(t,e,n,r,i){if(0!==n.length){var o=[],a=[];Ss.flattenJSON(n,o,a,r),0!==o.length&&i.push(new t(e,o,a))}},r=[],i=t.name||"default",o=t.length||-1,a=t.fps||30,s=t.hierarchy||[],u=0;u<s.length;u++){var c=s[u].keys;if(c&&0!==c.length)if(c[0].morphTargets){for(var l={},h=0;h<c.length;h++)if(c[h].morphTargets)for(m=0;m<c[h].morphTargets.length;m++)l[c[h].morphTargets[m]]=-1;for(var p in l){for(var d=[],f=[],m=0;m!==c[h].morphTargets.length;++m){var v=c[h];d.push(v.time),f.push(v.morphTarget===p?1:0)}r.push(new Gn(".morphTargetInfluence["+p+"]",d,f))}o=l.length*(a||1)}else{var g=".bones["+e[u].name+"]";n(zn,g+".position",c,"pos",r),n(Hn,g+".quaternion",c,"rot",r),n(zn,g+".scale",c,"scl",r)}}if(0===r.length)return null;return new Xn(i,o,r)}}),Object.assign(Xn.prototype,{resetDuration:function(){for(var t=0,e=0,n=this.tracks.length;e!==n;++e){var r=this.tracks[e];t=Math.max(t,r.times[r.times.length-1])}this.duration=t},trim:function(){for(var t=0;t<this.tracks.length;t++)this.tracks[t].trim(0,this.duration);return this},optimize:function(){for(var t=0;t<this.tracks.length;t++)this.tracks[t].optimize();return this}}),Object.assign(Yn.prototype,{load:function(t,e,n,r){var i=this;new yn(i.manager).load(t,function(t){e(i.parse(JSON.parse(t)))},n,r)},setTextures:function(t){this.textures=t},parse:function(t){function e(t){return void 0===n[t]&&console.warn("THREE.MaterialLoader: Undefined texture",t),n[t]}var n=this.textures,r=new Es[t.type];if(void 0!==t.uuid&&(r.uuid=t.uuid),void 0!==t.name&&(r.name=t.name),void 0!==t.color&&r.color.setHex(t.color),void 0!==t.roughness&&(r.roughness=t.roughness),void 0!==t.metalness&&(r.metalness=t.metalness),void 0!==t.emissive&&r.emissive.setHex(t.emissive),void 0!==t.specular&&r.specular.setHex(t.specular),void 0!==t.shininess&&(r.shininess=t.shininess),void 0!==t.clearCoat&&(r.clearCoat=t.clearCoat),void 0!==t.clearCoatRoughness&&(r.clearCoatRoughness=t.clearCoatRoughness),void 0!==t.uniforms&&(r.uniforms=t.uniforms),void 0!==t.vertexShader&&(r.vertexShader=t.vertexShader),void 0!==t.fragmentShader&&(r.fragmentShader=t.fragmentShader),void 0!==t.vertexColors&&(r.vertexColors=t.vertexColors),void 0!==t.fog&&(r.fog=t.fog),void 0!==t.flatShading&&(r.flatShading=t.flatShading),void 0!==t.blending&&(r.blending=t.blending),void 0!==t.side&&(r.side=t.side),void 0!==t.opacity&&(r.opacity=t.opacity),void 0!==t.transparent&&(r.transparent=t.transparent),void 0!==t.alphaTest&&(r.alphaTest=t.alphaTest),void 0!==t.depthTest&&(r.depthTest=t.depthTest),void 0!==t.depthWrite&&(r.depthWrite=t.depthWrite),void 0!==t.colorWrite&&(r.colorWrite=t.colorWrite),void 0!==t.wireframe&&(r.wireframe=t.wireframe),void 0!==t.wireframeLinewidth&&(r.wireframeLinewidth=t.wireframeLinewidth),void 0!==t.wireframeLinecap&&(r.wireframeLinecap=t.wireframeLinecap),void 0!==t.wireframeLinejoin&&(r.wireframeLinejoin=t.wireframeLinejoin),void 0!==t.skinning&&(r.skinning=t.skinning),void 0!==t.morphTargets&&(r.morphTargets=t.morphTargets),void 0!==t.dithering&&(r.dithering=t.dithering),void 0!==t.visible&&(r.visible=t.visible),void 0!==t.userData&&(r.userData=t.userData),void 0!==t.shading&&(r.flatShading=1===t.shading),void 0!==t.size&&(r.size=t.size),void 0!==t.sizeAttenuation&&(r.sizeAttenuation=t.sizeAttenuation),void 0!==t.map&&(r.map=e(t.map)),void 0!==t.alphaMap&&(r.alphaMap=e(t.alphaMap),r.transparent=!0),void 0!==t.bumpMap&&(r.bumpMap=e(t.bumpMap)),void 0!==t.bumpScale&&(r.bumpScale=t.bumpScale),void 0!==t.normalMap&&(r.normalMap=e(t.normalMap)),void 0!==t.normalScale){var o=t.normalScale;!1===Array.isArray(o)&&(o=[o,o]),r.normalScale=(new i).fromArray(o)}return void 0!==t.displacementMap&&(r.displacementMap=e(t.displacementMap)),void 0!==t.displacementScale&&(r.displacementScale=t.displacementScale),void 0!==t.displacementBias&&(r.displacementBias=t.displacementBias),void 0!==t.roughnessMap&&(r.roughnessMap=e(t.roughnessMap)),void 0!==t.metalnessMap&&(r.metalnessMap=e(t.metalnessMap)),void 0!==t.emissiveMap&&(r.emissiveMap=e(t.emissiveMap)),void 0!==t.emissiveIntensity&&(r.emissiveIntensity=t.emissiveIntensity),void 0!==t.specularMap&&(r.specularMap=e(t.specularMap)),void 0!==t.envMap&&(r.envMap=e(t.envMap)),void 0!==t.reflectivity&&(r.reflectivity=t.reflectivity),void 0!==t.lightMap&&(r.lightMap=e(t.lightMap)),void 0!==t.lightMapIntensity&&(r.lightMapIntensity=t.lightMapIntensity),void 0!==t.aoMap&&(r.aoMap=e(t.aoMap)),void 0!==t.aoMapIntensity&&(r.aoMapIntensity=t.aoMapIntensity),void 0!==t.gradientMap&&(r.gradientMap=e(t.gradientMap)),r}}),Object.assign(Kn.prototype,{load:function(t,e,n,r){var i=this;new yn(i.manager).load(t,function(t){e(i.parse(JSON.parse(t)))},n,r)},parse:function(t){var e=new Pt,n=t.data.index;if(void 0!==n){a=new As[n.type](n.array);e.setIndex(new gt(a,1))}var r=t.data.attributes;for(var i in r){var o=r[i],a=new As[o.type](o.array);e.addAttribute(i,new gt(a,o.itemSize,o.normalized))}var s=t.data.groups||t.data.drawcalls||t.data.offsets;if(void 0!==s)for(var u=0,c=s.length;u!==c;++u){var h=s[u];e.addGroup(h.start,h.count,h.materialIndex)}var p=t.data.boundingSphere;if(void 0!==p){var d=new l;void 0!==p.center&&d.fromArray(p.center),e.boundingSphere=new nt(d,p.radius)}return e}});var As={Int8Array:Int8Array,Uint8Array:Uint8Array,Uint8ClampedArray:"undefined"!=typeof Uint8ClampedArray?Uint8ClampedArray:Uint8Array,Int16Array:Int16Array,Uint16Array:Uint16Array,Int32Array:Int32Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array};Zn.Handlers={handlers:[],add:function(t,e){this.handlers.push(t,e)},get:function(t){for(var e=this.handlers,n=0,r=e.length;n<r;n+=2){var i=e[n],o=e[n+1];if(i.test(t))return o}return null}},Object.assign(Zn.prototype,{crossOrigin:void 0,extractUrlBase:function(t){var e=t.split("/");return 1===e.length?"./":(e.pop(),e.join("/")+"/")},initMaterials:function(t,e,n){for(var r=[],i=0;i<t.length;++i)r[i]=this.createMaterial(t[i],e,n);return r},createMaterial:function(){var t={NoBlending:io,NormalBlending:oo,AdditiveBlending:ao,SubtractiveBlending:so,MultiplyBlending:uo,CustomBlending:co},e=new q,n=new En,r=new Yn;return function(i,o,a){function s(t,e,r,i,s){var c,l=o+t,h=Zn.Handlers.get(l);null!==h?c=h.load(l):(n.setCrossOrigin(a),c=n.load(l)),void 0!==e&&(c.repeat.fromArray(e),1!==e[0]&&(c.wrapS=Jo),1!==e[1]&&(c.wrapT=Jo)),void 0!==r&&c.offset.fromArray(r),void 0!==i&&("repeat"===i[0]&&(c.wrapS=Jo),"mirror"===i[0]&&(c.wrapS=$o),"repeat"===i[1]&&(c.wrapT=Jo),"mirror"===i[1]&&(c.wrapT=$o)),void 0!==s&&(c.anisotropy=s);var p=rs.generateUUID();return u[p]=c,p}var u={},c={uuid:rs.generateUUID(),type:"MeshLambertMaterial"};for(var l in i){var h=i[l];switch(l){case"DbgColor":case"DbgIndex":case"opticalDensity":case"illumination":break;case"DbgName":c.name=h;break;case"blending":c.blending=t[h];break;case"colorAmbient":case"mapAmbient":console.warn("THREE.Loader.createMaterial:",l,"is no longer supported.");break;case"colorDiffuse":c.color=e.fromArray(h).getHex();break;case"colorSpecular":c.specular=e.fromArray(h).getHex();break;case"colorEmissive":c.emissive=e.fromArray(h).getHex();break;case"specularCoef":c.shininess=h;break;case"shading":"basic"===h.toLowerCase()&&(c.type="MeshBasicMaterial"),"phong"===h.toLowerCase()&&(c.type="MeshPhongMaterial"),"standard"===h.toLowerCase()&&(c.type="MeshStandardMaterial");break;case"mapDiffuse":c.map=s(h,i.mapDiffuseRepeat,i.mapDiffuseOffset,i.mapDiffuseWrap,i.mapDiffuseAnisotropy);break;case"mapDiffuseRepeat":case"mapDiffuseOffset":case"mapDiffuseWrap":case"mapDiffuseAnisotropy":break;case"mapEmissive":c.emissiveMap=s(h,i.mapEmissiveRepeat,i.mapEmissiveOffset,i.mapEmissiveWrap,i.mapEmissiveAnisotropy);break;case"mapEmissiveRepeat":case"mapEmissiveOffset":case"mapEmissiveWrap":case"mapEmissiveAnisotropy":break;case"mapLight":c.lightMap=s(h,i.mapLightRepeat,i.mapLightOffset,i.mapLightWrap,i.mapLightAnisotropy);break;case"mapLightRepeat":case"mapLightOffset":case"mapLightWrap":case"mapLightAnisotropy":break;case"mapAO":c.aoMap=s(h,i.mapAORepeat,i.mapAOOffset,i.mapAOWrap,i.mapAOAnisotropy);break;case"mapAORepeat":case"mapAOOffset":case"mapAOWrap":case"mapAOAnisotropy":break;case"mapBump":c.bumpMap=s(h,i.mapBumpRepeat,i.mapBumpOffset,i.mapBumpWrap,i.mapBumpAnisotropy);break;case"mapBumpScale":c.bumpScale=h;break;case"mapBumpRepeat":case"mapBumpOffset":case"mapBumpWrap":case"mapBumpAnisotropy":break;case"mapNormal":c.normalMap=s(h,i.mapNormalRepeat,i.mapNormalOffset,i.mapNormalWrap,i.mapNormalAnisotropy);break;case"mapNormalFactor":c.normalScale=[h,h];break;case"mapNormalRepeat":case"mapNormalOffset":case"mapNormalWrap":case"mapNormalAnisotropy":break;case"mapSpecular":c.specularMap=s(h,i.mapSpecularRepeat,i.mapSpecularOffset,i.mapSpecularWrap,i.mapSpecularAnisotropy);break;case"mapSpecularRepeat":case"mapSpecularOffset":case"mapSpecularWrap":case"mapSpecularAnisotropy":break;case"mapMetalness":c.metalnessMap=s(h,i.mapMetalnessRepeat,i.mapMetalnessOffset,i.mapMetalnessWrap,i.mapMetalnessAnisotropy);break;case"mapMetalnessRepeat":case"mapMetalnessOffset":case"mapMetalnessWrap":case"mapMetalnessAnisotropy":break;case"mapRoughness":c.roughnessMap=s(h,i.mapRoughnessRepeat,i.mapRoughnessOffset,i.mapRoughnessWrap,i.mapRoughnessAnisotropy);break;case"mapRoughnessRepeat":case"mapRoughnessOffset":case"mapRoughnessWrap":case"mapRoughnessAnisotropy":break;case"mapAlpha":c.alphaMap=s(h,i.mapAlphaRepeat,i.mapAlphaOffset,i.mapAlphaWrap,i.mapAlphaAnisotropy);break;case"mapAlphaRepeat":case"mapAlphaOffset":case"mapAlphaWrap":case"mapAlphaAnisotropy":break;case"flipSided":c.side=Ji;break;case"doubleSided":c.side=Qi;break;case"transparency":console.warn("THREE.Loader.createMaterial: transparency has been renamed to opacity"),c.opacity=h;break;case"depthTest":case"depthWrite":case"colorWrite":case"opacity":case"reflectivity":case"transparent":case"visible":case"wireframe":c[l]=h;break;case"vertexColors":!0===h&&(c.vertexColors=ro),"face"===h&&(c.vertexColors=no);break;default:console.error("THREE.Loader.createMaterial: Unsupported",l,h)}}return"MeshBasicMaterial"===c.type&&delete c.emissive,"MeshPhongMaterial"!==c.type&&delete c.specular,c.opacity<1&&(c.transparent=!0),r.setTextures(u),r.parse(c)}}()}),Object.assign(Jn.prototype,{load:function(t,e,n,r){var i=this,o=this.texturePath&&"string"==typeof this.texturePath?this.texturePath:Zn.prototype.extractUrlBase(t),a=new yn(this.manager);a.setWithCredentials(this.withCredentials),a.load(t,function(n){var r=JSON.parse(n),a=r.metadata;if(void 0!==a){var s=a.type;if(void 0!==s){if("object"===s.toLowerCase())return void console.error("THREE.JSONLoader: "+t+" should be loaded with THREE.ObjectLoader instead.");if("scene"===s.toLowerCase())return void console.error("THREE.JSONLoader: "+t+" should be loaded with THREE.SceneLoader instead.")}}var u=i.parse(r,o);e(u.geometry,u.materials)},n,r)},setTexturePath:function(t){this.texturePath=t},parse:function(){return function(t,e){void 0!==t.data&&(t=t.data),void 0!==t.scale?t.scale=1/t.scale:t.scale=1;var n=new vt;if(function(t,e){function n(t,e){return t&1<<e}var r,o,a,s,u,c,h,p,d,f,m,v,g,y,_,b,x,w,E,M,T,S,C,A,P,R=t.faces,L=t.vertices,I=t.normals,O=t.colors,N=t.scale,D=0;if(void 0!==t.uvs){for(r=0;r<t.uvs.length;r++)t.uvs[r].length&&D++;for(r=0;r<D;r++)e.faceVertexUvs[r]=[]}for(s=0,u=L.length;s<u;)(w=new l).x=L[s++]*N,w.y=L[s++]*N,w.z=L[s++]*N,e.vertices.push(w);for(s=0,u=R.length;s<u;)if(f=R[s++],m=n(f,0),v=n(f,1),g=n(f,3),y=n(f,4),_=n(f,5),b=n(f,6),x=n(f,7),m){if(M=new ft,M.a=R[s],M.b=R[s+1],M.c=R[s+3],T=new ft,T.a=R[s+1],T.b=R[s+2],T.c=R[s+3],s+=4,v&&(d=R[s++],M.materialIndex=d,T.materialIndex=d),a=e.faces.length,g)for(r=0;r<D;r++)for(A=t.uvs[r],e.faceVertexUvs[r][a]=[],e.faceVertexUvs[r][a+1]=[],o=0;o<4;o++)P=new i(A[2*(p=R[s++])],A[2*p+1]),2!==o&&e.faceVertexUvs[r][a].push(P),0!==o&&e.faceVertexUvs[r][a+1].push(P);if(y&&(h=3*R[s++],M.normal.set(I[h++],I[h++],I[h]),T.normal.copy(M.normal)),_)for(r=0;r<4;r++)h=3*R[s++],C=new l(I[h++],I[h++],I[h]),2!==r&&M.vertexNormals.push(C),0!==r&&T.vertexNormals.push(C);if(b&&(S=O[c=R[s++]],M.color.setHex(S),T.color.setHex(S)),x)for(r=0;r<4;r++)S=O[c=R[s++]],2!==r&&M.vertexColors.push(new q(S)),0!==r&&T.vertexColors.push(new q(S));e.faces.push(M),e.faces.push(T)}else{if(E=new ft,E.a=R[s++],E.b=R[s++],E.c=R[s++],v&&(d=R[s++],E.materialIndex=d),a=e.faces.length,g)for(r=0;r<D;r++)for(A=t.uvs[r],e.faceVertexUvs[r][a]=[],o=0;o<3;o++)P=new i(A[2*(p=R[s++])],A[2*p+1]),e.faceVertexUvs[r][a].push(P);if(y&&(h=3*R[s++],E.normal.set(I[h++],I[h++],I[h])),_)for(r=0;r<3;r++)h=3*R[s++],C=new l(I[h++],I[h++],I[h]),E.vertexNormals.push(C);if(b&&(c=R[s++],E.color.setHex(O[c])),x)for(r=0;r<3;r++)c=R[s++],E.vertexColors.push(new q(O[c]));e.faces.push(E)}}(t,n),function(t,e){var n=void 0!==t.influencesPerVertex?t.influencesPerVertex:2;if(t.skinWeights)for(var r=0,i=t.skinWeights.length;r<i;r+=n){var o=t.skinWeights[r],s=n>1?t.skinWeights[r+1]:0,u=n>2?t.skinWeights[r+2]:0,c=n>3?t.skinWeights[r+3]:0;e.skinWeights.push(new a(o,s,u,c))}if(t.skinIndices)for(var r=0,i=t.skinIndices.length;r<i;r+=n){var l=t.skinIndices[r],h=n>1?t.skinIndices[r+1]:0,p=n>2?t.skinIndices[r+2]:0,d=n>3?t.skinIndices[r+3]:0;e.skinIndices.push(new a(l,h,p,d))}e.bones=t.bones,e.bones&&e.bones.length>0&&(e.skinWeights.length!==e.skinIndices.length||e.skinIndices.length!==e.vertices.length)&&console.warn("When skinning, number of vertices ("+e.vertices.length+"), skinIndices ("+e.skinIndices.length+"), and skinWeights ("+e.skinWeights.length+") should match.")}(t,n),function(t,e){var n=t.scale;if(void 0!==t.morphTargets)for(var r=0,i=t.morphTargets.length;r<i;r++){e.morphTargets[r]={},e.morphTargets[r].name=t.morphTargets[r].name,e.morphTargets[r].vertices=[];for(var o=e.morphTargets[r].vertices,a=t.morphTargets[r].vertices,s=0,u=a.length;s<u;s+=3){var c=new l;c.x=a[s]*n,c.y=a[s+1]*n,c.z=a[s+2]*n,o.push(c)}}if(void 0!==t.morphColors&&t.morphColors.length>0){console.warn('THREE.JSONLoader: "morphColors" no longer supported. Using them as face colors.');for(var h=e.faces,p=t.morphColors[0].colors,r=0,i=h.length;r<i;r++)h[r].color.fromArray(p,3*r)}}(t,n),function(t,e){var n=[],r=[];void 0!==t.animation&&r.push(t.animation),void 0!==t.animations&&(t.animations.length?r=r.concat(t.animations):r.push(t.animations));for(var i=0;i<r.length;i++){var o=Xn.parseAnimation(r[i],e.bones);o&&n.push(o)}if(e.morphTargets){var a=Xn.CreateClipsFromMorphTargetSequences(e.morphTargets,10);n=n.concat(a)}n.length>0&&(e.animations=n)}(t,n),n.computeFaceNormals(),n.computeBoundingSphere(),void 0===t.materials||0===t.materials.length)return{geometry:n};return{geometry:n,materials:Zn.prototype.initMaterials(t.materials,e,this.crossOrigin)}}}()}),Object.assign(Qn.prototype,{load:function(t,e,n,r){""===this.texturePath&&(this.texturePath=t.substring(0,t.lastIndexOf("/")+1));var i=this;new yn(i.manager).load(t,function(n){var o=null;try{o=JSON.parse(n)}catch(e){return void 0!==r&&r(e),void console.error("THREE:ObjectLoader: Can't parse "+t+".",e.message)}var a=o.metadata;void 0!==a&&void 0!==a.type&&"geometry"!==a.type.toLowerCase()?i.parse(o,e):console.error("THREE.ObjectLoader: Can't load "+t+". Use THREE.JSONLoader instead.")},n,r)},setTexturePath:function(t){this.texturePath=t},setCrossOrigin:function(t){this.crossOrigin=t},parse:function(t,e){var n=this.parseGeometries(t.geometries),r=this.parseImages(t.images,function(){void 0!==e&&e(a)}),i=this.parseTextures(t.textures,r),o=this.parseMaterials(t.materials,i),a=this.parseObject(t.object,n,o);return t.animations&&(a.animations=this.parseAnimations(t.animations)),void 0!==t.images&&0!==t.images.length||void 0!==e&&e(a),a},parseGeometries:function(t){var e={};if(void 0!==t)for(var n=new Jn,r=new Kn,i=0,o=t.length;i<o;i++){var a,s=t[i];switch(s.type){case"PlaneGeometry":case"PlaneBufferGeometry":a=new ws[s.type](s.width,s.height,s.widthSegments,s.heightSegments);break;case"BoxGeometry":case"BoxBufferGeometry":case"CubeGeometry":a=new ws[s.type](s.width,s.height,s.depth,s.widthSegments,s.heightSegments,s.depthSegments);break;case"CircleGeometry":case"CircleBufferGeometry":a=new ws[s.type](s.radius,s.segments,s.thetaStart,s.thetaLength);break;case"CylinderGeometry":case"CylinderBufferGeometry":a=new ws[s.type](s.radiusTop,s.radiusBottom,s.height,s.radialSegments,s.heightSegments,s.openEnded,s.thetaStart,s.thetaLength);break;case"ConeGeometry":case"ConeBufferGeometry":a=new ws[s.type](s.radius,s.height,s.radialSegments,s.heightSegments,s.openEnded,s.thetaStart,s.thetaLength);break;case"SphereGeometry":case"SphereBufferGeometry":a=new ws[s.type](s.radius,s.widthSegments,s.heightSegments,s.phiStart,s.phiLength,s.thetaStart,s.thetaLength);break;case"DodecahedronGeometry":case"IcosahedronGeometry":case"OctahedronGeometry":case"TetrahedronGeometry":a=new ws[s.type](s.radius,s.detail);break;case"RingGeometry":case"RingBufferGeometry":a=new ws[s.type](s.innerRadius,s.outerRadius,s.thetaSegments,s.phiSegments,s.thetaStart,s.thetaLength);break;case"TorusGeometry":case"TorusBufferGeometry":a=new ws[s.type](s.radius,s.tube,s.radialSegments,s.tubularSegments,s.arc);break;case"TorusKnotGeometry":case"TorusKnotBufferGeometry":a=new ws[s.type](s.radius,s.tube,s.tubularSegments,s.radialSegments,s.p,s.q);break;case"LatheGeometry":case"LatheBufferGeometry":a=new ws[s.type](s.points,s.segments,s.phiStart,s.phiLength);break;case"BufferGeometry":a=r.parse(s);break;case"Geometry":a=n.parse(s,this.texturePath).geometry;break;default:console.warn('THREE.ObjectLoader: Unsupported geometry type "'+s.type+'"');continue}a.uuid=s.uuid,void 0!==s.name&&(a.name=s.name),e[s.uuid]=a}return e},parseMaterials:function(t,e){var n={};if(void 0!==t){var r=new Yn;r.setTextures(e);for(var i=0,o=t.length;i<o;i++){var a=t[i];if("MultiMaterial"===a.type){for(var s=[],u=0;u<a.materials.length;u++)s.push(r.parse(a.materials[u]));n[a.uuid]=s}else n[a.uuid]=r.parse(a)}}return n},parseAnimations:function(t){for(var e=[],n=0;n<t.length;n++){var r=Xn.parse(t[n]);e.push(r)}return e},parseImages:function(t,e){function n(t){return r.manager.itemStart(t),o.load(t,function(){r.manager.itemEnd(t)},void 0,function(){r.manager.itemEnd(t),r.manager.itemError(t)})}var r=this,i={};if(void 0!==t&&t.length>0){var o=new xn(new gn(e));o.setCrossOrigin(this.crossOrigin);for(var a=0,s=t.length;a<s;a++){var u=t[a],c=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(u.url)?u.url:r.texturePath+u.url;i[u.uuid]=n(c)}}return i},parseTextures:function(t,e){function n(t,e){return"number"==typeof t?t:(console.warn("THREE.ObjectLoader.parseTexture: Constant should be in numeric form.",t),e[t])}var r={};if(void 0!==t)for(var i=0,a=t.length;i<a;i++){var s=t[i];void 0===s.image&&console.warn('THREE.ObjectLoader: No "image" specified for',s.uuid),void 0===e[s.image]&&console.warn("THREE.ObjectLoader: Undefined image",s.image);var u=new o(e[s.image]);u.needsUpdate=!0,u.uuid=s.uuid,void 0!==s.name&&(u.name=s.name),void 0!==s.mapping&&(u.mapping=n(s.mapping,Ps)),void 0!==s.offset&&u.offset.fromArray(s.offset),void 0!==s.repeat&&u.repeat.fromArray(s.repeat),void 0!==s.wrap&&(u.wrapS=n(s.wrap[0],Rs),u.wrapT=n(s.wrap[1],Rs)),void 0!==s.minFilter&&(u.minFilter=n(s.minFilter,Ls)),void 0!==s.magFilter&&(u.magFilter=n(s.magFilter,Ls)),void 0!==s.anisotropy&&(u.anisotropy=s.anisotropy),void 0!==s.flipY&&(u.flipY=s.flipY),r[s.uuid]=u}return r},parseObject:function(){var t=new h;return function(e,n,r){function i(t){return void 0===n[t]&&console.warn("THREE.ObjectLoader: Undefined geometry",t),n[t]}function o(t){if(void 0!==t){if(Array.isArray(t)){for(var e=[],n=0,i=t.length;n<i;n++){var o=t[n];void 0===r[o]&&console.warn("THREE.ObjectLoader: Undefined material",o),e.push(r[o])}return e}return void 0===r[t]&&console.warn("THREE.ObjectLoader: Undefined material",t),r[t]}}var a;switch(e.type){case"Scene":a=new oe,void 0!==e.background&&Number.isInteger(e.background)&&(a.background=new q(e.background)),void 0!==e.fog&&("Fog"===e.fog.type?a.fog=new ie(e.fog.color,e.fog.near,e.fog.far):"FogExp2"===e.fog.type&&(a.fog=new re(e.fog.color,e.fog.density)));break;case"PerspectiveCamera":a=new dt(e.fov,e.aspect,e.near,e.far),void 0!==e.focus&&(a.focus=e.focus),void 0!==e.zoom&&(a.zoom=e.zoom),void 0!==e.filmGauge&&(a.filmGauge=e.filmGauge),void 0!==e.filmOffset&&(a.filmOffset=e.filmOffset),void 0!==e.view&&(a.view=Object.assign({},e.view));break;case"OrthographicCamera":a=new pt(e.left,e.right,e.top,e.bottom,e.near,e.far);break;case"AmbientLight":a=new In(e.color,e.intensity);break;case"DirectionalLight":a=new Ln(e.color,e.intensity);break;case"PointLight":a=new Pn(e.color,e.intensity,e.distance,e.decay);break;case"RectAreaLight":a=new On(e.color,e.intensity,e.width,e.height);break;case"SpotLight":a=new An(e.color,e.intensity,e.distance,e.angle,e.penumbra,e.decay);break;case"HemisphereLight":a=new Tn(e.color,e.groundColor,e.intensity);break;case"SkinnedMesh":console.warn("THREE.ObjectLoader.parseObject() does not support SkinnedMesh yet.");case"Mesh":var s=i(e.geometry),u=o(e.material);a=s.bones&&s.bones.length>0?new pe(s,u):new kt(s,u);break;case"LOD":a=new ce;break;case"Line":a=new fe(i(e.geometry),o(e.material),e.mode);break;case"LineLoop":a=new ve(i(e.geometry),o(e.material));break;case"LineSegments":a=new me(i(e.geometry),o(e.material));break;case"PointCloud":case"Points":a=new ye(i(e.geometry),o(e.material));break;case"Sprite":a=new ue(o(e.material));break;case"Group":a=new _e;break;default:a=new lt}if(a.uuid=e.uuid,void 0!==e.name&&(a.name=e.name),void 0!==e.matrix?(t.fromArray(e.matrix),t.decompose(a.position,a.quaternion,a.scale)):(void 0!==e.position&&a.position.fromArray(e.position),void 0!==e.rotation&&a.rotation.fromArray(e.rotation),void 0!==e.quaternion&&a.quaternion.fromArray(e.quaternion),void 0!==e.scale&&a.scale.fromArray(e.scale)),void 0!==e.castShadow&&(a.castShadow=e.castShadow),void 0!==e.receiveShadow&&(a.receiveShadow=e.receiveShadow),e.shadow&&(void 0!==e.shadow.bias&&(a.shadow.bias=e.shadow.bias),void 0!==e.shadow.radius&&(a.shadow.radius=e.shadow.radius),void 0!==e.shadow.mapSize&&a.shadow.mapSize.fromArray(e.shadow.mapSize),void 0!==e.shadow.camera&&(a.shadow.camera=this.parseObject(e.shadow.camera))),void 0!==e.visible&&(a.visible=e.visible),void 0!==e.userData&&(a.userData=e.userData),void 0!==e.children)for(var c=e.children,l=0;l<c.length;l++)a.add(this.parseObject(c[l],n,r));if("LOD"===e.type)for(var h=e.levels,p=0;p<h.length;p++){var d=h[p],f=a.getObjectByProperty("uuid",d.object);void 0!==f&&a.addLevel(f,d.distance)}return a}}()});var Ps={UVMapping:jo,CubeReflectionMapping:Vo,CubeRefractionMapping:Wo,EquirectangularReflectionMapping:qo,EquirectangularRefractionMapping:Xo,SphericalReflectionMapping:Yo,CubeUVReflectionMapping:Ko,CubeUVRefractionMapping:Zo},Rs={RepeatWrapping:Jo,ClampToEdgeWrapping:Qo,MirroredRepeatWrapping:$o},Ls={NearestFilter:ta,NearestMipMapNearestFilter:ea,NearestMipMapLinearFilter:na,LinearFilter:ra,LinearMipMapNearestFilter:ia,LinearMipMapLinearFilter:oa};Object.assign(nr.prototype,{getPoint:function(){return console.warn("THREE.Curve: .getPoint() not implemented."),null},getPointAt:function(t){var e=this.getUtoTmapping(t);return this.getPoint(e)},getPoints:function(t){void 0===t&&(t=5);for(var e=[],n=0;n<=t;n++)e.push(this.getPoint(n/t));return e},getSpacedPoints:function(t){void 0===t&&(t=5);for(var e=[],n=0;n<=t;n++)e.push(this.getPointAt(n/t));return e},getLength:function(){var 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;var e,n,r=[],i=this.getPoint(0),o=0;for(r.push(0),n=1;n<=t;n++)o+=(e=this.getPoint(n/t)).distanceTo(i),r.push(o),i=e;return this.cacheArcLengths=r,r},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()},getUtoTmapping:function(t,e){var n,r=this.getLengths(),i=0,o=r.length;n=e||t*r[o-1];for(var a,s=0,u=o-1;s<=u;)if(i=Math.floor(s+(u-s)/2),(a=r[i]-n)<0)s=i+1;else{if(!(a>0)){u=i;break}u=i-1}if(i=u,r[i]===n)return i/(o-1);var c=r[i];return(i+(n-c)/(r[i+1]-c))/(o-1)},getTangent:function(t){var e=t-1e-4,n=t+1e-4;e<0&&(e=0),n>1&&(n=1);var r=this.getPoint(e);return this.getPoint(n).clone().sub(r).normalize()},getTangentAt:function(t){var e=this.getUtoTmapping(t);return this.getTangent(e)},computeFrenetFrames:function(t,e){var n,r,i,o=new l,a=[],s=[],u=[],c=new l,p=new h;for(n=0;n<=t;n++)r=n/t,a[n]=this.getTangentAt(r),a[n].normalize();s[0]=new l,u[0]=new l;var d=Number.MAX_VALUE,f=Math.abs(a[0].x),m=Math.abs(a[0].y),v=Math.abs(a[0].z);for(f<=d&&(d=f,o.set(1,0,0)),m<=d&&(d=m,o.set(0,1,0)),v<=d&&o.set(0,0,1),c.crossVectors(a[0],o).normalize(),s[0].crossVectors(a[0],c),u[0].crossVectors(a[0],s[0]),n=1;n<=t;n++)s[n]=s[n-1].clone(),u[n]=u[n-1].clone(),c.crossVectors(a[n-1],a[n]),c.length()>Number.EPSILON&&(c.normalize(),i=Math.acos(rs.clamp(a[n-1].dot(a[n]),-1,1)),s[n].applyMatrix4(p.makeRotationAxis(c,i))),u[n].crossVectors(a[n],s[n]);if(!0===e)for(i=Math.acos(rs.clamp(s[0].dot(s[t]),-1,1)),i/=t,a[0].dot(c.crossVectors(s[0],s[t]))>0&&(i=-i),n=1;n<=t;n++)s[n].applyMatrix4(p.makeRotationAxis(a[n],i*n)),u[n].crossVectors(a[n],s[n]);return{tangents:a,normals:s,binormals:u}}}),(rr.prototype=Object.create(nr.prototype)).constructor=rr,rr.prototype.isLineCurve=!0,rr.prototype.getPoint=function(t){if(1===t)return this.v2.clone();var e=this.v2.clone().sub(this.v1);return e.multiplyScalar(t).add(this.v1),e},rr.prototype.getPointAt=function(t){return this.getPoint(t)},rr.prototype.getTangent=function(t){return this.v2.clone().sub(this.v1).normalize()},ir.prototype=Object.assign(Object.create(nr.prototype),{constructor:ir,add:function(t){this.curves.push(t)},closePath:function(){var t=this.curves[0].getPoint(0),e=this.curves[this.curves.length-1].getPoint(1);t.equals(e)||this.curves.push(new rr(e,t))},getPoint:function(t){for(var e=t*this.getLength(),n=this.getCurveLengths(),r=0;r<n.length;){if(n[r]>=e){var i=n[r]-e,o=this.curves[r],a=o.getLength(),s=0===a?0:1-i/a;return o.getPointAt(s)}r++}return null},getLength:function(){var t=this.getCurveLengths();return t[t.length-1]},updateArcLengths:function(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()},getCurveLengths:function(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;for(var t=[],e=0,n=0,r=this.curves.length;n<r;n++)e+=this.curves[n].getLength(),t.push(e);return this.cacheLengths=t,t},getSpacedPoints:function(t){void 0===t&&(t=40);for(var e=[],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;for(var e,n=[],r=0,i=this.curves;r<i.length;r++)for(var o=i[r],a=o&&o.isEllipseCurve?2*t:o&&o.isLineCurve?1:o&&o.isSplineCurve?t*o.points.length:t,s=o.getPoints(a),u=0;u<s.length;u++){var c=s[u];e&&e.equals(c)||(n.push(c),e=c)}return this.autoClose&&n.length>1&&!n[n.length-1].equals(n[0])&&n.push(n[0]),n},createPointsGeometry:function(t){var e=this.getPoints(t);return this.createGeometry(e)},createSpacedPointsGeometry:function(t){var e=this.getSpacedPoints(t);return this.createGeometry(e)},createGeometry:function(t){for(var e=new vt,n=0,r=t.length;n<r;n++){var i=t[n];e.vertices.push(new l(i.x,i.y,i.z||0))}return e}}),(or.prototype=Object.create(nr.prototype)).constructor=or,or.prototype.isEllipseCurve=!0,or.prototype.getPoint=function(t){for(var e=2*Math.PI,n=this.aEndAngle-this.aStartAngle,r=Math.abs(n)<Number.EPSILON;n<0;)n+=e;for(;n>e;)n-=e;n<Number.EPSILON&&(n=r?0:e),!0!==this.aClockwise||r||(n===e?n=-e:n-=e);var o=this.aStartAngle+t*n,a=this.aX+this.xRadius*Math.cos(o),s=this.aY+this.yRadius*Math.sin(o);if(0!==this.aRotation){var u=Math.cos(this.aRotation),c=Math.sin(this.aRotation),l=a-this.aX,h=s-this.aY;a=l*u-h*c+this.aX,s=l*c+h*u+this.aY}return new i(a,s)},(ar.prototype=Object.create(nr.prototype)).constructor=ar,ar.prototype.isSplineCurve=!0,ar.prototype.getPoint=function(t){var e=this.points,n=(e.length-1)*t,r=Math.floor(n),o=n-r,a=e[0===r?r:r-1],s=e[r],u=e[r>e.length-2?e.length-1:r+1],c=e[r>e.length-3?e.length-1:r+2];return new i($n(o,a.x,s.x,u.x,c.x),$n(o,a.y,s.y,u.y,c.y))},(sr.prototype=Object.create(nr.prototype)).constructor=sr,sr.prototype.getPoint=function(t){var e=this.v0,n=this.v1,r=this.v2,o=this.v3;return new i(er(t,e.x,n.x,r.x,o.x),er(t,e.y,n.y,r.y,o.y))},(ur.prototype=Object.create(nr.prototype)).constructor=ur,ur.prototype.getPoint=function(t){var e=this.v0,n=this.v1,r=this.v2;return new i(tr(t,e.x,n.x,r.x),tr(t,e.y,n.y,r.y))};var Is=Object.assign(Object.create(ir.prototype),{fromPoints:function(t){this.moveTo(t[0].x,t[0].y);for(var e=1,n=t.length;e<n;e++)this.lineTo(t[e].x,t[e].y)},moveTo:function(t,e){this.currentPoint.set(t,e)},lineTo:function(t,e){var n=new rr(this.currentPoint.clone(),new i(t,e));this.curves.push(n),this.currentPoint.set(t,e)},quadraticCurveTo:function(t,e,n,r){var o=new ur(this.currentPoint.clone(),new i(t,e),new i(n,r));this.curves.push(o),this.currentPoint.set(n,r)},bezierCurveTo:function(t,e,n,r,o,a){var s=new sr(this.currentPoint.clone(),new i(t,e),new i(n,r),new i(o,a));this.curves.push(s),this.currentPoint.set(o,a)},splineThru:function(t){var e=new ar([this.currentPoint.clone()].concat(t));this.curves.push(e),this.currentPoint.copy(t[t.length-1])},arc:function(t,e,n,r,i,o){var a=this.currentPoint.x,s=this.currentPoint.y;this.absarc(t+a,e+s,n,r,i,o)},absarc:function(t,e,n,r,i,o){this.absellipse(t,e,n,n,r,i,o)},ellipse:function(t,e,n,r,i,o,a,s){var u=this.currentPoint.x,c=this.currentPoint.y;this.absellipse(t+u,e+c,n,r,i,o,a,s)},absellipse:function(t,e,n,r,i,o,a,s){var u=new or(t,e,n,r,i,o,a,s);if(this.curves.length>0){var c=u.getPoint(0);c.equals(this.currentPoint)||this.lineTo(c.x,c.y)}this.curves.push(u);var l=u.getPoint(1);this.currentPoint.copy(l)}});cr.prototype=Is,Is.constructor=cr,lr.prototype=Object.assign(Object.create(Is),{constructor:lr,getPointsHoles:function(t){for(var e=[],n=0,r=this.holes.length;n<r;n++)e[n]=this.holes[n].getPoints(t);return e},extractAllPoints:function(t){return{shape:this.getPoints(t),holes:this.getPointsHoles(t)}},extractPoints:function(t){return this.extractAllPoints(t)}}),Object.assign(hr.prototype,{moveTo:function(t,e){this.currentPath=new cr,this.subPaths.push(this.currentPath),this.currentPath.moveTo(t,e)},lineTo:function(t,e){this.currentPath.lineTo(t,e)},quadraticCurveTo:function(t,e,n,r){this.currentPath.quadraticCurveTo(t,e,n,r)},bezierCurveTo:function(t,e,n,r,i,o){this.currentPath.bezierCurveTo(t,e,n,r,i,o)},splineThru:function(t){this.currentPath.splineThru(t)},toShapes:function(t,e){function n(t){for(var e=[],n=0,r=t.length;n<r;n++){var i=t[n],o=new lr;o.curves=i.curves,e.push(o)}return e}function r(t,e){for(var n=e.length,r=!1,i=n-1,o=0;o<n;i=o++){var a=e[i],s=e[o],u=s.x-a.x,c=s.y-a.y;if(Math.abs(c)>Number.EPSILON){if(c<0&&(a=e[o],u=-u,s=e[i],c=-c),t.y<a.y||t.y>s.y)continue;if(t.y===a.y){if(t.x===a.x)return!0}else{var l=c*(t.x-a.x)-u*(t.y-a.y);if(0===l)return!0;if(l<0)continue;r=!r}}else{if(t.y!==a.y)continue;if(s.x<=t.x&&t.x<=a.x||a.x<=t.x&&t.x<=s.x)return!0}}return r}var i=xs.isClockWise,o=this.subPaths;if(0===o.length)return[];if(!0===e)return n(o);var a,s,u,c=[];if(1===o.length)return s=o[0],u=new lr,u.curves=s.curves,c.push(u),c;var l=!i(o[0].getPoints());l=t?!l:l;var h,p=[],d=[],f=[],m=0;d[m]=void 0,f[m]=[];for(var v=0,g=o.length;v<g;v++)a=i(h=(s=o[v]).getPoints()),(a=t?!a:a)?(!l&&d[m]&&m++,d[m]={s:new lr,p:h},d[m].s.curves=s.curves,l&&m++,f[m]=[]):f[m].push({h:s,p:h[0]});if(!d[0])return n(o);if(d.length>1){for(var y=!1,_=[],b=0,x=d.length;b<x;b++)p[b]=[];for(var b=0,x=d.length;b<x;b++)for(var w=f[b],E=0;E<w.length;E++){for(var M=w[E],T=!0,S=0;S<d.length;S++)r(M.p,d[S].p)&&(b!==S&&_.push({froms:b,tos:S,hole:E}),T?(T=!1,p[S].push(M)):y=!0);T&&p[b].push(M)}_.length>0&&(y||(f=p))}for(var C,v=0,A=d.length;v<A;v++){u=d[v].s,c.push(u);for(var P=0,R=(C=f[v]).length;P<R;P++)u.holes.push(C[P].h)}return c}}),Object.assign(pr.prototype,{isFont:!0,generateShapes:function(t,e,n){function r(t){for(var r=String(t).split(""),o=e/i.resolution,a=(i.boundingBox.yMax-i.boundingBox.yMin+i.underlineThickness)*o,s=0,u=0,c=[],l=0;l<r.length;l++){var h=r[l];if("\n"===h)s=0,u-=a;else{var p=function(t,e,r,o){var a=i.glyphs[t]||i.glyphs["?"];if(!a)return;var s,u,c,l,h,p,d,f,m,v,g,y=new hr,_=[];if(a.o)for(var b=a._cachedOutline||(a._cachedOutline=a.o.split(" ")),x=0,w=b.length;x<w;){switch(b[x++]){case"m":s=b[x++]*e+r,u=b[x++]*e+o,y.moveTo(s,u);break;case"l":s=b[x++]*e+r,u=b[x++]*e+o,y.lineTo(s,u);break;case"q":if(c=b[x++]*e+r,l=b[x++]*e+o,d=b[x++]*e+r,f=b[x++]*e+o,y.quadraticCurveTo(d,f,c,l),g=_[_.length-1]){h=g.x,p=g.y;for(E=1;E<=n;E++){tr(M=E/n,h,d,c),tr(M,p,f,l)}}break;case"b":if(c=b[x++]*e+r,l=b[x++]*e+o,d=b[x++]*e+r,f=b[x++]*e+o,m=b[x++]*e+r,v=b[x++]*e+o,y.bezierCurveTo(d,f,m,v,c,l),g=_[_.length-1]){h=g.x,p=g.y;for(var E=1;E<=n;E++){var M=E/n;er(M,h,d,m,c),er(M,p,f,v,l)}}}}return{offsetX:a.ha*e,path:y}}(h,o,s,u);s+=p.offsetX,c.push(p.path)}}return c}void 0===e&&(e=100),void 0===n&&(n=4);for(var i=this.data,o=r(t),a=[],s=0,u=o.length;s<u;s++)Array.prototype.push.apply(a,o[s].toShapes());return a}}),Object.assign(dr.prototype,{load:function(t,e,n,r){var i=this;new yn(this.manager).load(t,function(t){var 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))}var r=i.parse(n);e&&e(r)},n,r)},parse:function(t){return new pr(t)}});var Os,Ns={getContext:function(){return void 0===Os&&(Os=new(window.AudioContext||window.webkitAudioContext)),Os},setContext:function(t){Os=t}};Object.assign(fr.prototype,{load:function(t,e,n,r){var i=new yn(this.manager);i.setResponseType("arraybuffer"),i.load(t,function(t){Ns.getContext().decodeAudioData(t,function(t){e(t)})},n,r)}}),Object.assign(mr.prototype,{update:function(){var t,e,n,r,i,o,a,s,u=new h,c=new h;return function(l){if(t!==this||e!==l.focus||n!==l.fov||r!==l.aspect*this.aspect||i!==l.near||o!==l.far||a!==l.zoom||s!==this.eyeSep){t=this,e=l.focus,n=l.fov,r=l.aspect*this.aspect,i=l.near,o=l.far,a=l.zoom;var h,p,d=l.projectionMatrix.clone(),f=(s=this.eyeSep/2)*i/e,m=i*Math.tan(rs.DEG2RAD*n*.5)/a;c.elements[12]=-s,u.elements[12]=s,h=-m*r+f,p=m*r+f,d.elements[0]=2*i/(p-h),d.elements[8]=(p+h)/(p-h),this.cameraL.projectionMatrix.copy(d),h=-m*r-f,p=m*r-f,d.elements[0]=2*i/(p-h),d.elements[8]=(p+h)/(p-h),this.cameraR.projectionMatrix.copy(d)}this.cameraL.matrixWorld.copy(l.matrixWorld).multiply(c),this.cameraR.matrixWorld.copy(l.matrixWorld).multiply(u)}}()}),(vr.prototype=Object.create(lt.prototype)).constructor=vr,gr.prototype=Object.assign(Object.create(lt.prototype),{constructor:gr,getInput:function(){return this.gain},removeFilter:function(){null!==this.filter&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null)},getFilter:function(){return this.filter},setFilter:function(t){null!==this.filter?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=t,this.gain.connect(this.filter),this.filter.connect(this.context.destination)},getMasterVolume:function(){return this.gain.gain.value},setMasterVolume:function(t){this.gain.gain.value=t},updateMatrixWorld:function(){var t=new l,e=new c,n=new l,r=new l;return function(i){lt.prototype.updateMatrixWorld.call(this,i);var o=this.context.listener,a=this.up;this.matrixWorld.decompose(t,e,n),r.set(0,0,-1).applyQuaternion(e),o.positionX?(o.positionX.setValueAtTime(t.x,this.context.currentTime),o.positionY.setValueAtTime(t.y,this.context.currentTime),o.positionZ.setValueAtTime(t.z,this.context.currentTime),o.forwardX.setValueAtTime(r.x,this.context.currentTime),o.forwardY.setValueAtTime(r.y,this.context.currentTime),o.forwardZ.setValueAtTime(r.z,this.context.currentTime),o.upX.setValueAtTime(a.x,this.context.currentTime),o.upY.setValueAtTime(a.y,this.context.currentTime),o.upZ.setValueAtTime(a.z,this.context.currentTime)):(o.setPosition(t.x,t.y,t.z),o.setOrientation(r.x,r.y,r.z,a.x,a.y,a.z))}}()}),yr.prototype=Object.assign(Object.create(lt.prototype),{constructor:yr,getOutput:function(){return this.gain},setNodeSource:function(t){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=t,this.connect(),this},setBuffer:function(t){return this.buffer=t,this.sourceType="buffer",this.autoplay&&this.play(),this},play:function(){if(!0!==this.isPlaying){if(!1!==this.hasPlaybackControl){var t=this.context.createBufferSource();return t.buffer=this.buffer,t.loop=this.loop,t.onended=this.onEnded.bind(this),t.playbackRate.setValueAtTime(this.playbackRate,this.startTime),t.start(0,this.startTime),this.isPlaying=!0,this.source=t,this.connect()}console.warn("THREE.Audio: this Audio has no playback control.")}else console.warn("THREE.Audio: Audio is already playing.")},pause:function(){if(!1!==this.hasPlaybackControl)return this.source.stop(),this.startTime=this.context.currentTime,this.isPlaying=!1,this;console.warn("THREE.Audio: this Audio has no playback control.")},stop:function(){if(!1!==this.hasPlaybackControl)return this.source.stop(),this.startTime=0,this.isPlaying=!1,this;console.warn("THREE.Audio: this Audio has no playback control.")},connect:function(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(var t=1,e=this.filters.length;t<e;t++)this.filters[t-1].connect(this.filters[t]);this.filters[this.filters.length-1].connect(this.getOutput())}else this.source.connect(this.getOutput());return this},disconnect:function(){if(this.filters.length>0){this.source.disconnect(this.filters[0]);for(var t=1,e=this.filters.length;t<e;t++)this.filters[t-1].disconnect(this.filters[t]);this.filters[this.filters.length-1].disconnect(this.getOutput())}else this.source.disconnect(this.getOutput());return this},getFilters:function(){return this.filters},setFilters:function(t){return t||(t=[]),!0===this.isPlaying?(this.disconnect(),this.filters=t,this.connect()):this.filters=t,this},getFilter:function(){return this.getFilters()[0]},setFilter:function(t){return this.setFilters(t?[t]:[])},setPlaybackRate:function(t){if(!1!==this.hasPlaybackControl)return this.playbackRate=t,!0===this.isPlaying&&this.source.playbackRate.setValueAtTime(this.playbackRate,this.context.currentTime),this;console.warn("THREE.Audio: this Audio has no playback control.")},getPlaybackRate:function(){return this.playbackRate},onEnded:function(){this.isPlaying=!1},getLoop:function(){return!1===this.hasPlaybackControl?(console.warn("THREE.Audio: this Audio has no playback control."),!1):this.loop},setLoop:function(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.")},getVolume:function(){return this.gain.gain.value},setVolume:function(t){return this.gain.gain.value=t,this}}),_r.prototype=Object.assign(Object.create(yr.prototype),{constructor:_r,getOutput:function(){return this.panner},getRefDistance:function(){return this.panner.refDistance},setRefDistance:function(t){this.panner.refDistance=t},getRolloffFactor:function(){return this.panner.rolloffFactor},setRolloffFactor:function(t){this.panner.rolloffFactor=t},getDistanceModel:function(){return this.panner.distanceModel},setDistanceModel:function(t){this.panner.distanceModel=t},getMaxDistance:function(){return this.panner.maxDistance},setMaxDistance:function(t){this.panner.maxDistance=t},updateMatrixWorld:function(){var t=new l;return function(e){lt.prototype.updateMatrixWorld.call(this,e),t.setFromMatrixPosition(this.matrixWorld),this.panner.setPosition(t.x,t.y,t.z)}}()}),Object.assign(br.prototype,{getFrequencyData:function(){return this.analyser.getByteFrequencyData(this.data),this.data},getAverageFrequency:function(){for(var t=0,e=this.getFrequencyData(),n=0;n<e.length;n++)t+=e[n];return t/e.length}}),Object.assign(xr.prototype,{accumulate:function(t,e){var n=this.buffer,r=this.valueSize,i=t*r+r,o=this.cumulativeWeight;if(0===o){for(var a=0;a!==r;++a)n[i+a]=n[a];o=e}else{var s=e/(o+=e);this._mixBufferRegion(n,i,0,s,r)}this.cumulativeWeight=o},apply:function(t){var e=this.valueSize,n=this.buffer,r=t*e+e,i=this.cumulativeWeight,o=this.binding;if(this.cumulativeWeight=0,i<1){var a=3*e;this._mixBufferRegion(n,r,a,1-i,e)}for(var s=e,u=e+e;s!==u;++s)if(n[s]!==n[s+e]){o.setValue(n,r);break}},saveOriginalState:function(){var t=this.binding,e=this.buffer,n=this.valueSize,r=3*n;t.getValue(e,r);for(var i=n,o=r;i!==o;++i)e[i]=e[r+i%n];this.cumulativeWeight=0},restoreOriginalState:function(){var t=3*this.valueSize;this.binding.setValue(this.buffer,t)},_select:function(t,e,n,r,i){if(r>=.5)for(var o=0;o!==i;++o)t[e+o]=t[n+o]},_slerp:function(t,e,n,r){c.slerpFlat(t,e,t,e,t,n,r)},_lerp:function(t,e,n,r,i){for(var o=1-r,a=0;a!==i;++a){var s=e+a;t[s]=t[s]*o+t[n+a]*r}}}),Object.assign(wr.prototype,{getValue:function(t,e){this.bind();var n=this._targetGroup.nCachedObjects_,r=this._bindings[n];void 0!==r&&r.getValue(t,e)},setValue:function(t,e){for(var n=this._bindings,r=this._targetGroup.nCachedObjects_,i=n.length;r!==i;++r)n[r].setValue(t,e)},bind:function(){for(var t=this._bindings,e=this._targetGroup.nCachedObjects_,n=t.length;e!==n;++e)t[e].bind()},unbind:function(){for(var t=this._bindings,e=this._targetGroup.nCachedObjects_,n=t.length;e!==n;++e)t[e].unbind()}}),Object.assign(Er,{Composite:wr,create:function(t,e,n){return t&&t.isAnimationObjectGroup?new Er.Composite(t,e,n):new Er(t,e,n)},sanitizeNodeName:function(t){return t.replace(/\s/g,"_").replace(/[^\w-]/g,"")},parseTrackName:function(){var t=new RegExp("^"+/((?:[\w-]+[\/:])*)/.source+/([\w-\.]+)?/.source+/(?:\.([\w-]+)(?:\[(.+)\])?)?/.source+/\.([\w-]+)(?:\[(.+)\])?/.source+"$"),e=["material","materials","bones"];return function(n){var r=t.exec(n);if(!r)throw new Error("PropertyBinding: Cannot parse trackName: "+n);var i={nodeName:r[2],objectName:r[3],objectIndex:r[4],propertyName:r[5],propertyIndex:r[6]},o=i.nodeName&&i.nodeName.lastIndexOf(".");if(void 0!==o&&-1!==o){var a=i.nodeName.substring(o+1);-1!==e.indexOf(a)&&(i.nodeName=i.nodeName.substring(0,o),i.objectName=a)}if(null===i.propertyName||0===i.propertyName.length)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+n);return i}}(),findNode:function(t,e){if(!e||""===e||"root"===e||"."===e||-1===e||e===t.name||e===t.uuid)return t;if(t.skeleton){var n=function(t){for(var n=0;n<t.bones.length;n++){var r=t.bones[n];if(r.name===e)return r}return null}(t.skeleton);if(n)return n}if(t.children){var r=function(t){for(var n=0;n<t.length;n++){var i=t[n];if(i.name===e||i.uuid===e)return i;var o=r(i.children);if(o)return o}return null},i=r(t.children);if(i)return i}return null}}),Object.assign(Er.prototype,{_getValue_unavailable:function(){},_setValue_unavailable:function(){},BindingType:{Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},Versioning:{None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},GetterByBindingType:[function(t,e){t[e]=this.node[this.propertyName]},function(t,e){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)t[e++]=n[r]},function(t,e){t[e]=this.resolvedProperty[this.propertyIndex]},function(t,e){this.resolvedProperty.toArray(t,e)}],SetterByBindingTypeAndVersioning:[[function(t,e){this.node[this.propertyName]=t[e]},function(t,e){this.node[this.propertyName]=t[e],this.targetObject.needsUpdate=!0},function(t,e){this.node[this.propertyName]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}],[function(t,e){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)n[r]=t[e++]},function(t,e){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)n[r]=t[e++];this.targetObject.needsUpdate=!0},function(t,e){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)n[r]=t[e++];this.targetObject.matrixWorldNeedsUpdate=!0}],[function(t,e){this.resolvedProperty[this.propertyIndex]=t[e]},function(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.needsUpdate=!0},function(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}],[function(t,e){this.resolvedProperty.fromArray(t,e)},function(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.needsUpdate=!0},function(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.matrixWorldNeedsUpdate=!0}]],getValue:function(t,e){this.bind(),this.getValue(t,e)},setValue:function(t,e){this.bind(),this.setValue(t,e)},bind:function(){var t=this.node,e=this.parsedPath,n=e.objectName,r=e.propertyName,i=e.propertyIndex;if(t||(t=Er.findNode(this.rootNode,e.nodeName)||this.rootNode,this.node=t),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,t){if(n){var o=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(c=0;c<t.length;c++)if(t[c].name===o){o=c;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!==o){if(void 0===t[o])return void console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,t);t=t[o]}}var a=t[r];if(void 0!==a){var s=this.Versioning.None;void 0!==t.needsUpdate?(s=this.Versioning.NeedsUpdate,this.targetObject=t):void 0!==t.matrixWorldNeedsUpdate&&(s=this.Versioning.MatrixWorldNeedsUpdate,this.targetObject=t);var u=this.BindingType.Direct;if(void 0!==i){if("morphTargetInfluences"===r){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){if(!t.geometry.morphAttributes)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);for(c=0;c<this.node.geometry.morphAttributes.position.length;c++)if(t.geometry.morphAttributes.position[c].name===i){i=c;break}}else{if(!t.geometry.morphTargets)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphTargets.",this);for(var c=0;c<this.node.geometry.morphTargets.length;c++)if(t.geometry.morphTargets[c].name===i){i=c;break}}}u=this.BindingType.ArrayElement,this.resolvedProperty=a,this.propertyIndex=i}else void 0!==a.fromArray&&void 0!==a.toArray?(u=this.BindingType.HasFromToArray,this.resolvedProperty=a):Array.isArray(a)?(u=this.BindingType.EntireArray,this.resolvedProperty=a):this.propertyName=r;this.getValue=this.GetterByBindingType[u],this.setValue=this.SetterByBindingTypeAndVersioning[u][s]}else{var l=e.nodeName;console.error("THREE.PropertyBinding: Trying to update property for track: "+l+"."+r+" but it wasn't found.",t)}}else console.error("THREE.PropertyBinding: Trying to update node for track: "+this.path+" but it wasn't found.")},unbind:function(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}),
//!\ DECLARE ALIAS AFTER assign prototype !
Object.assign(Er.prototype,{_getValue_unbound:Er.prototype.getValue,_setValue_unbound:Er.prototype.setValue}),Object.assign(Mr.prototype,{isAnimationObjectGroup:!0,add:function(t){for(var e=this._objects,n=e.length,r=this.nCachedObjects_,i=this._indicesByUUID,o=this._paths,a=this._parsedPaths,s=this._bindings,u=s.length,c=0,l=arguments.length;c!==l;++c){var h=arguments[c],p=h.uuid,d=i[p],f=void 0;if(void 0===d){d=n++,i[p]=d,e.push(h);for(var m=0,v=u;m!==v;++m)s[m].push(new Er(h,o[m],a[m]))}else if(d<r){f=e[d];var g=--r,y=e[g];i[y.uuid]=d,e[d]=y,i[p]=g,e[g]=h;for(var m=0,v=u;m!==v;++m){var _=s[m],b=_[g],x=_[d];_[d]=b,void 0===x&&(x=new Er(h,o[m],a[m])),_[g]=x}}else e[d]!==f&&console.error("THREE.AnimationObjectGroup: Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes.")}this.nCachedObjects_=r},remove:function(t){for(var e=this._objects,n=this.nCachedObjects_,r=this._indicesByUUID,i=this._bindings,o=i.length,a=0,s=arguments.length;a!==s;++a){var u=arguments[a],c=u.uuid,l=r[c];if(void 0!==l&&l>=n){var h=n++,p=e[h];r[p.uuid]=l,e[l]=p,r[c]=h,e[h]=u;for(var d=0,f=o;d!==f;++d){var m=i[d],v=m[h],g=m[l];m[l]=v,m[h]=g}}}this.nCachedObjects_=n},uncache:function(t){for(var e=this._objects,n=e.length,r=this.nCachedObjects_,i=this._indicesByUUID,o=this._bindings,a=o.length,s=0,u=arguments.length;s!==u;++s){var c=arguments[s].uuid,l=i[c];if(void 0!==l)if(delete i[c],l<r){var h=--r,p=e[h],d=e[y=--n];i[p.uuid]=l,e[l]=p,i[d.uuid]=h,e[h]=d,e.pop();for(var f=0,m=a;f!==m;++f){var v=(_=o[f])[h],g=_[y];_[l]=v,_[h]=g,_.pop()}}else{var y=--n;i[(d=e[y]).uuid]=l,e[l]=d,e.pop();for(var f=0,m=a;f!==m;++f){var _=o[f];_[l]=_[y],_.pop()}}}this.nCachedObjects_=r},subscribe_:function(t,e){var n=this._bindingsIndicesByPath,r=n[t],i=this._bindings;if(void 0!==r)return i[r];var o=this._paths,a=this._parsedPaths,s=this._objects,u=s.length,c=this.nCachedObjects_,l=new Array(u);r=i.length,n[t]=r,o.push(t),a.push(e),i.push(l);for(var h=c,p=s.length;h!==p;++h){var d=s[h];l[h]=new Er(d,t,e)}return l},unsubscribe_:function(t){var e=this._bindingsIndicesByPath,n=e[t];if(void 0!==n){var r=this._paths,i=this._parsedPaths,o=this._bindings,a=o.length-1,s=o[a];e[t[a]]=n,o[n]=s,o.pop(),i[n]=i[a],i.pop(),r[n]=r[a],r.pop()}}}),Object.assign(Tr.prototype,{play:function(){return this._mixer._activateAction(this),this},stop:function(){return this._mixer._deactivateAction(this),this.reset()},reset:function(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()},isRunning:function(){return this.enabled&&!this.paused&&0!==this.timeScale&&null===this._startTime&&this._mixer._isActiveAction(this)},isScheduled:function(){return this._mixer._isActiveAction(this)},startAt:function(t){return this._startTime=t,this},setLoop:function(t,e){return this.loop=t,this.repetitions=e,this},setEffectiveWeight:function(t){return this.weight=t,this._effectiveWeight=this.enabled?t:0,this.stopFading()},getEffectiveWeight:function(){return this._effectiveWeight},fadeIn:function(t){return this._scheduleFading(t,0,1)},fadeOut:function(t){return this._scheduleFading(t,1,0)},crossFadeFrom:function(t,e,n){if(t.fadeOut(e),this.fadeIn(e),n){var r=this._clip.duration,i=t._clip.duration,o=i/r,a=r/i;t.warp(1,o,e),this.warp(a,1,e)}return this},crossFadeTo:function(t,e,n){return t.crossFadeFrom(this,e,n)},stopFading:function(){var t=this._weightInterpolant;return null!==t&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this},setEffectiveTimeScale:function(t){return this.timeScale=t,this._effectiveTimeScale=this.paused?0:t,this.stopWarping()},getEffectiveTimeScale:function(){return this._effectiveTimeScale},setDuration:function(t){return this.timeScale=this._clip.duration/t,this.stopWarping()},syncWith:function(t){return this.time=t.time,this.timeScale=t.timeScale,this.stopWarping()},halt:function(t){return this.warp(this._effectiveTimeScale,0,t)},warp:function(t,e,n){var r=this._mixer,i=r.time,o=this._timeScaleInterpolant,a=this.timeScale;null===o&&(o=r._lendControlInterpolant(),this._timeScaleInterpolant=o);var s=o.parameterPositions,u=o.sampleValues;return s[0]=i,s[1]=i+n,u[0]=t/a,u[1]=e/a,this},stopWarping:function(){var t=this._timeScaleInterpolant;return null!==t&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this},getMixer:function(){return this._mixer},getClip:function(){return this._clip},getRoot:function(){return this._localRoot||this._mixer._root},_update:function(t,e,n,r){if(this.enabled){var i=this._startTime;if(null!==i){var o=(t-i)*n;if(o<0||0===n)return;this._startTime=null,e=n*o}e*=this._updateTimeScale(t);var a=this._updateTime(e),s=this._updateWeight(t);if(s>0)for(var u=this._interpolants,c=this._propertyBindings,l=0,h=u.length;l!==h;++l)u[l].evaluate(a),c[l].accumulate(r,s)}else this._updateWeight(t)},_updateWeight:function(t){var e=0;if(this.enabled){e=this.weight;var n=this._weightInterpolant;if(null!==n){var r=n.evaluate(t)[0];e*=r,t>n.parameterPositions[1]&&(this.stopFading(),0===r&&(this.enabled=!1))}}return this._effectiveWeight=e,e},_updateTimeScale:function(t){var e=0;if(!this.paused){e=this.timeScale;var 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:function(t){var e=this.time+t;if(0===t)return e;var n=this._clip.duration,r=this.loop,i=this._loopCount;if(r===Da){-1===i&&(this._loopCount=0,this._setEndings(!0,!0,!1));t:{if(e>=n)e=n;else{if(!(e<0))break t;e=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this._mixer.dispatchEvent({type:"finished",action:this,direction:t<0?-1:1})}}else{var o=r===Fa;if(-1===i&&(t>=0?(i=0,this._setEndings(!0,0===this.repetitions,o)):this._setEndings(0===this.repetitions,!0,o)),e>=n||e<0){var a=Math.floor(e/n);e-=n*a,i+=Math.abs(a);var s=this.repetitions-i;if(s<0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,e=t>0?n:0,this._mixer.dispatchEvent({type:"finished",action:this,direction:t>0?1:-1});else{if(0===s){var u=t<0;this._setEndings(u,!u,o)}else this._setEndings(!1,!1,o);this._loopCount=i,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:a})}}if(o&&1==(1&i))return this.time=e,n-e}return this.time=e,e},_setEndings:function(t,e,n){var r=this._interpolantSettings;n?(r.endingStart=Ga,r.endingEnd=Ga):(r.endingStart=t?this.zeroSlopeAtStart?Ga:Ha:ja,r.endingEnd=e?this.zeroSlopeAtEnd?Ga:Ha:ja)},_scheduleFading:function(t,e,n){var r=this._mixer,i=r.time,o=this._weightInterpolant;null===o&&(o=r._lendControlInterpolant(),this._weightInterpolant=o);var a=o.parameterPositions,s=o.sampleValues;return a[0]=i,s[0]=e,a[1]=i+t,s[1]=n,this}}),Object.assign(Sr.prototype,r.prototype,{_bindAction:function(t,e){var n=t._localRoot||this._root,r=t._clip.tracks,i=r.length,o=t._propertyBindings,a=t._interpolants,s=n.uuid,u=this._bindingsByRootAndName,c=u[s];void 0===c&&(c={},u[s]=c);for(var l=0;l!==i;++l){var h=r[l],p=h.name,d=c[p];if(void 0!==d)o[l]=d;else{if(void 0!==(d=o[l])){null===d._cacheIndex&&(++d.referenceCount,this._addInactiveBinding(d,s,p));continue}var f=e&&e._propertyBindings[l].binding.parsedPath;++(d=new xr(Er.create(n,p,f),h.ValueTypeName,h.getValueSize())).referenceCount,this._addInactiveBinding(d,s,p),o[l]=d}a[l].resultBuffer=d.buffer}},_activateAction:function(t){if(!this._isActiveAction(t)){if(null===t._cacheIndex){var e=(t._localRoot||this._root).uuid,n=t._clip.uuid,r=this._actionsByClip[n];this._bindAction(t,r&&r.knownActions[0]),this._addInactiveAction(t,n,e)}for(var i=t._propertyBindings,o=0,a=i.length;o!==a;++o){var s=i[o];0==s.useCount++&&(this._lendBinding(s),s.saveOriginalState())}this._lendAction(t)}},_deactivateAction:function(t){if(this._isActiveAction(t)){for(var e=t._propertyBindings,n=0,r=e.length;n!==r;++n){var i=e[n];0==--i.useCount&&(i.restoreOriginalState(),this._takeBackBinding(i))}this._takeBackAction(t)}},_initMemoryManager:function(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;var t=this;this.stats={actions:{get total(){return t._actions.length},get inUse(){return t._nActiveActions}},bindings:{get total(){return t._bindings.length},get inUse(){return t._nActiveBindings}},controlInterpolants:{get total(){return t._controlInterpolants.length},get inUse(){return t._nActiveControlInterpolants}}}},_isActiveAction:function(t){var e=t._cacheIndex;return null!==e&&e<this._nActiveActions},_addInactiveAction:function(t,e,n){var r=this._actions,i=this._actionsByClip,o=i[e];if(void 0===o)o={knownActions:[t],actionByRoot:{}},t._byClipCacheIndex=0,i[e]=o;else{var a=o.knownActions;t._byClipCacheIndex=a.length,a.push(t)}t._cacheIndex=r.length,r.push(t),o.actionByRoot[n]=t},_removeInactiveAction:function(t){var e=this._actions,n=e[e.length-1],r=t._cacheIndex;n._cacheIndex=r,e[r]=n,e.pop(),t._cacheIndex=null;var i=t._clip.uuid,o=this._actionsByClip,a=o[i],s=a.knownActions,u=s[s.length-1],c=t._byClipCacheIndex;u._byClipCacheIndex=c,s[c]=u,s.pop(),t._byClipCacheIndex=null;delete a.actionByRoot[(t._localRoot||this._root).uuid],0===s.length&&delete o[i],this._removeInactiveBindingsForAction(t)},_removeInactiveBindingsForAction:function(t){for(var e=t._propertyBindings,n=0,r=e.length;n!==r;++n){var i=e[n];0==--i.referenceCount&&this._removeInactiveBinding(i)}},_lendAction:function(t){var e=this._actions,n=t._cacheIndex,r=this._nActiveActions++,i=e[r];t._cacheIndex=r,e[r]=t,i._cacheIndex=n,e[n]=i},_takeBackAction:function(t){var e=this._actions,n=t._cacheIndex,r=--this._nActiveActions,i=e[r];t._cacheIndex=r,e[r]=t,i._cacheIndex=n,e[n]=i},_addInactiveBinding:function(t,e,n){var r=this._bindingsByRootAndName,i=r[e],o=this._bindings;void 0===i&&(i={},r[e]=i),i[n]=t,t._cacheIndex=o.length,o.push(t)},_removeInactiveBinding:function(t){var e=this._bindings,n=t.binding,r=n.rootNode.uuid,i=n.path,o=this._bindingsByRootAndName,a=o[r],s=e[e.length-1],u=t._cacheIndex;s._cacheIndex=u,e[u]=s,e.pop(),delete a[i];t:{for(var c in a)break t;delete o[r]}},_lendBinding:function(t){var e=this._bindings,n=t._cacheIndex,r=this._nActiveBindings++,i=e[r];t._cacheIndex=r,e[r]=t,i._cacheIndex=n,e[n]=i},_takeBackBinding:function(t){var e=this._bindings,n=t._cacheIndex,r=--this._nActiveBindings,i=e[r];t._cacheIndex=r,e[r]=t,i._cacheIndex=n,e[n]=i},_lendControlInterpolant:function(){var t=this._controlInterpolants,e=this._nActiveControlInterpolants++,n=t[e];return void 0===n&&((n=new Un(new Float32Array(2),new Float32Array(2),1,this._controlInterpolantsResultBuffer)).__cacheIndex=e,t[e]=n),n},_takeBackControlInterpolant:function(t){var e=this._controlInterpolants,n=t.__cacheIndex,r=--this._nActiveControlInterpolants,i=e[r];t.__cacheIndex=r,e[r]=t,i.__cacheIndex=n,e[n]=i},_controlInterpolantsResultBuffer:new Float32Array(1),clipAction:function(t,e){var n=e||this._root,r=n.uuid,i="string"==typeof t?Xn.findByName(n,t):t,o=null!==i?i.uuid:t,a=this._actionsByClip[o],s=null;if(void 0!==a){var u=a.actionByRoot[r];if(void 0!==u)return u;s=a.knownActions[0],null===i&&(i=s._clip)}if(null===i)return null;var c=new Tr(this,i,e);return this._bindAction(c,s),this._addInactiveAction(c,o,r),c},existingAction:function(t,e){var n=e||this._root,r=n.uuid,i="string"==typeof t?Xn.findByName(n,t):t,o=i?i.uuid:t,a=this._actionsByClip[o];return void 0!==a?a.actionByRoot[r]||null:null},stopAllAction:function(){var t=this._actions,e=this._nActiveActions,n=this._bindings,r=this._nActiveBindings;this._nActiveActions=0,this._nActiveBindings=0;for(i=0;i!==e;++i)t[i].reset();for(var i=0;i!==r;++i)n[i].useCount=0;return this},update:function(t){t*=this.timeScale;for(var e=this._actions,n=this._nActiveActions,r=this.time+=t,i=Math.sign(t),o=this._accuIndex^=1,a=0;a!==n;++a){e[a]._update(r,t,i,o)}for(var s=this._bindings,u=this._nActiveBindings,a=0;a!==u;++a)s[a].apply(o);return this},getRoot:function(){return this._root},uncacheClip:function(t){var e=this._actions,n=t.uuid,r=this._actionsByClip,i=r[n];if(void 0!==i){for(var o=i.knownActions,a=0,s=o.length;a!==s;++a){var u=o[a];this._deactivateAction(u);var c=u._cacheIndex,l=e[e.length-1];u._cacheIndex=null,u._byClipCacheIndex=null,l._cacheIndex=c,e[c]=l,e.pop(),this._removeInactiveBindingsForAction(u)}delete r[n]}},uncacheRoot:function(t){var e=t.uuid,n=this._actionsByClip;for(var r in n){var i=n[r].actionByRoot[e];void 0!==i&&(this._deactivateAction(i),this._removeInactiveAction(i))}var o=this._bindingsByRootAndName[e];if(void 0!==o)for(var a in o){var s=o[a];s.restoreOriginalState(),this._removeInactiveBinding(s)}},uncacheAction:function(t,e){var n=this.existingAction(t,e);null!==n&&(this._deactivateAction(n),this._removeInactiveAction(n))}}),Cr.prototype.clone=function(){return new Cr(void 0===this.value.clone?this.value:this.value.clone())},Ar.prototype=Object.assign(Object.create(Pt.prototype),{constructor:Ar,isInstancedBufferGeometry:!0,addGroup:function(t,e,n){this.groups.push({start:t,count:e,materialIndex:n})},copy:function(t){var e=t.index;null!==e&&this.setIndex(e.clone());var n=t.attributes;for(var r in n){var i=n[r];this.addAttribute(r,i.clone())}for(var o=t.groups,a=0,s=o.length;a<s;a++){var u=o[a];this.addGroup(u.start,u.count,u.materialIndex)}return this}}),Object.defineProperties(Pr.prototype,{count:{get:function(){return this.data.count}},array:{get:function(){return this.data.array}}}),Object.assign(Pr.prototype,{isInterleavedBufferAttribute:!0,setX:function(t,e){return this.data.array[t*this.data.stride+this.offset]=e,this},setY:function(t,e){return this.data.array[t*this.data.stride+this.offset+1]=e,this},setZ:function(t,e){return this.data.array[t*this.data.stride+this.offset+2]=e,this},setW:function(t,e){return this.data.array[t*this.data.stride+this.offset+3]=e,this},getX:function(t){return this.data.array[t*this.data.stride+this.offset]},getY:function(t){return this.data.array[t*this.data.stride+this.offset+1]},getZ:function(t){return this.data.array[t*this.data.stride+this.offset+2]},getW:function(t){return this.data.array[t*this.data.stride+this.offset+3]},setXY:function(t,e,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,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]=r,this},setXYZW:function(t,e,n,r,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]=r,this.data.array[t+3]=i,this}}),Object.defineProperty(Rr.prototype,"needsUpdate",{set:function(t){!0===t&&this.version++}}),Object.assign(Rr.prototype,{isInterleavedBuffer:!0,setArray:function(t){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.count=void 0!==t?t.length/this.stride:0,this.array=t},setDynamic:function(t){return this.dynamic=t,this},copy:function(t){return this.array=new t.array.constructor(t.array),this.count=t.count,this.stride=t.stride,this.dynamic=t.dynamic,this},copyAt:function(t,e,n){t*=this.stride,n*=e.stride;for(var r=0,i=this.stride;r<i;r++)this.array[t+r]=e.array[n+r];return this},set:function(t,e){return void 0===e&&(e=0),this.array.set(t,e),this},clone:function(){return(new this.constructor).copy(this)},onUpload:function(t){return this.onUploadCallback=t,this}}),Lr.prototype=Object.assign(Object.create(Rr.prototype),{constructor:Lr,isInstancedInterleavedBuffer:!0,copy:function(t){return Rr.prototype.copy.call(this,t),this.meshPerAttribute=t.meshPerAttribute,this}}),Ir.prototype=Object.assign(Object.create(gt.prototype),{constructor:Ir,isInstancedBufferAttribute:!0,copy:function(t){return gt.prototype.copy.call(this,t),this.meshPerAttribute=t.meshPerAttribute,this}}),Object.assign(Or.prototype,{linePrecision:1,set:function(t,e){this.ray.set(t,e)},setFromCamera:function(t,e){e&&e.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(e.matrixWorld),this.ray.direction.set(t.x,t.y,.5).unproject(e).sub(this.ray.origin).normalize()):e&&e.isOrthographicCamera?(this.ray.origin.set(t.x,t.y,(e.near+e.far)/(e.near-e.far)).unproject(e),this.ray.direction.set(0,0,-1).transformDirection(e.matrixWorld)):console.error("THREE.Raycaster: Unsupported camera type.")},intersectObject:function(t,e){var n=[];return Dr(t,this,n,e),n.sort(Nr),n},intersectObjects:function(t,e){var n=[];if(!1===Array.isArray(t))return console.warn("THREE.Raycaster.intersectObjects: objects is not an Array."),n;for(var r=0,i=t.length;r<i;r++)Dr(t[r],this,n,e);return n.sort(Nr),n}}),Object.assign(Ur.prototype,{start:function(){this.startTime=("undefined"==typeof performance?Date:performance).now(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0},stop:function(){this.getElapsedTime(),this.running=!1,this.autoStart=!1},getElapsedTime:function(){return this.getDelta(),this.elapsedTime},getDelta:function(){var t=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){var e=("undefined"==typeof performance?Date:performance).now();t=(e-this.oldTime)/1e3,this.oldTime=e,this.elapsedTime+=t}return t}}),Object.assign(Fr.prototype,{set:function(t,e,n){return this.radius=t,this.phi=e,this.theta=n,this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.radius=t.radius,this.phi=t.phi,this.theta=t.theta,this},makeSafe:function(){return this.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this.phi)),this},setFromVector3:function(t){return this.radius=t.length(),0===this.radius?(this.theta=0,this.phi=0):(this.theta=Math.atan2(t.x,t.z),this.phi=Math.acos(rs.clamp(t.y/this.radius,-1,1))),this}}),Object.assign(kr.prototype,{set:function(t,e,n){return this.radius=t,this.theta=e,this.y=n,this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.radius=t.radius,this.theta=t.theta,this.y=t.y,this},setFromVector3:function(t){return this.radius=Math.sqrt(t.x*t.x+t.z*t.z),this.theta=Math.atan2(t.x,t.z),this.y=t.y,this}}),(zr.prototype=Object.create(lt.prototype)).constructor=zr,zr.prototype.isImmediateRenderObject=!0,(Br.prototype=Object.create(me.prototype)).constructor=Br,Br.prototype.update=function(){var t=new l,e=new l,n=new rt;return function(){var r=["a","b","c"];this.object.updateMatrixWorld(!0),n.getNormalMatrix(this.object.matrixWorld);var i=this.object.matrixWorld,o=this.geometry.attributes.position,a=this.object.geometry;if(a&&a.isGeometry)for(var s=a.vertices,u=a.faces,c=0,l=0,h=u.length;l<h;l++)for(var p=u[l],d=0,f=p.vertexNormals.length;d<f;d++){var m=s[p[r[d]]],v=p.vertexNormals[d];t.copy(m).applyMatrix4(i),e.copy(v).applyMatrix3(n).normalize().multiplyScalar(this.size).add(t),o.setXYZ(c,t.x,t.y,t.z),c+=1,o.setXYZ(c,e.x,e.y,e.z),c+=1}else if(a&&a.isBufferGeometry)for(var g=a.attributes.position,y=a.attributes.normal,c=0,d=0,f=g.count;d<f;d++)t.set(g.getX(d),g.getY(d),g.getZ(d)).applyMatrix4(i),e.set(y.getX(d),y.getY(d),y.getZ(d)),e.applyMatrix3(n).normalize().multiplyScalar(this.size).add(t),o.setXYZ(c,t.x,t.y,t.z),c+=1,o.setXYZ(c,e.x,e.y,e.z),c+=1;o.needsUpdate=!0}}(),(Hr.prototype=Object.create(lt.prototype)).constructor=Hr,Hr.prototype.dispose=function(){this.cone.geometry.dispose(),this.cone.material.dispose()},Hr.prototype.update=function(){var t=new l,e=new l;return function(){this.light.updateMatrixWorld();var n=this.light.distance?this.light.distance:1e3,r=n*Math.tan(this.light.angle);this.cone.scale.set(r,r,n),t.setFromMatrixPosition(this.light.matrixWorld),e.setFromMatrixPosition(this.light.target.matrixWorld),this.cone.lookAt(e.sub(t)),void 0!==this.color?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)}}(),(jr.prototype=Object.create(me.prototype)).constructor=jr,jr.prototype.onBeforeRender=function(){var t=new l,e=new h,n=new h;return function(){var r=this.bones,i=this.geometry,o=i.getAttribute("position");n.getInverse(this.root.matrixWorld);for(var a=0,s=0;a<r.length;a++){var u=r[a];u.parent&&u.parent.isBone&&(e.multiplyMatrices(n,u.matrixWorld),t.setFromMatrixPosition(e),o.setXYZ(s,t.x,t.y,t.z),e.multiplyMatrices(n,u.parent.matrixWorld),t.setFromMatrixPosition(e),o.setXYZ(s+1,t.x,t.y,t.z),s+=2)}i.getAttribute("position").needsUpdate=!0}}(),(Vr.prototype=Object.create(kt.prototype)).constructor=Vr,Vr.prototype.dispose=function(){this.geometry.dispose(),this.material.dispose()},Vr.prototype.update=function(){void 0!==this.color?this.material.color.set(this.color):this.material.color.copy(this.light.color)},(Wr.prototype=Object.create(lt.prototype)).constructor=Wr,Wr.prototype.dispose=function(){this.children[0].geometry.dispose(),this.children[0].material.dispose()},Wr.prototype.update=function(){var t=.5*this.light.width,e=.5*this.light.height,n=this.line.geometry.attributes.position,r=n.array;r[0]=t,r[1]=-e,r[2]=0,r[3]=t,r[4]=e,r[5]=0,r[6]=-t,r[7]=e,r[8]=0,r[9]=-t,r[10]=-e,r[11]=0,r[12]=t,r[13]=-e,r[14]=0,n.needsUpdate=!0,void 0!==this.color?this.line.material.color.set(this.color):this.line.material.color.copy(this.light.color)},(qr.prototype=Object.create(lt.prototype)).constructor=qr,qr.prototype.dispose=function(){this.children[0].geometry.dispose(),this.children[0].material.dispose()},qr.prototype.update=function(){var t=new l,e=new q,n=new q;return function(){var r=this.children[0];if(void 0!==this.color)this.material.color.set(this.color);else{var i=r.geometry.getAttribute("color");e.copy(this.light.color),n.copy(this.light.groundColor);for(var o=0,a=i.count;o<a;o++){var s=o<a/2?e:n;i.setXYZ(o,s.r,s.g,s.b)}i.needsUpdate=!0}r.lookAt(t.setFromMatrixPosition(this.light.matrixWorld).negate())}}(),(Xr.prototype=Object.create(me.prototype)).constructor=Xr,(Yr.prototype=Object.create(me.prototype)).constructor=Yr,(Kr.prototype=Object.create(me.prototype)).constructor=Kr,Kr.prototype.update=function(){var t=new l,e=new l,n=new rt;return function(){this.object.updateMatrixWorld(!0),n.getNormalMatrix(this.object.matrixWorld);for(var r=this.object.matrixWorld,i=this.geometry.attributes.position,o=this.object.geometry,a=o.vertices,s=o.faces,u=0,c=0,l=s.length;c<l;c++){var h=s[c],p=h.normal;t.copy(a[h.a]).add(a[h.b]).add(a[h.c]).divideScalar(3).applyMatrix4(r),e.copy(p).applyMatrix3(n).normalize().multiplyScalar(this.size).add(t),i.setXYZ(u,t.x,t.y,t.z),u+=1,i.setXYZ(u,e.x,e.y,e.z),u+=1}i.needsUpdate=!0}}(),(Zr.prototype=Object.create(lt.prototype)).constructor=Zr,Zr.prototype.dispose=function(){this.lightPlane.geometry.dispose(),this.lightPlane.material.dispose(),this.targetLine.geometry.dispose(),this.targetLine.material.dispose()},Zr.prototype.update=function(){var t=new l,e=new l,n=new l;return function(){t.setFromMatrixPosition(this.light.matrixWorld),e.setFromMatrixPosition(this.light.target.matrixWorld),n.subVectors(e,t),this.lightPlane.lookAt(n),void 0!==this.color?(this.lightPlane.material.color.set(this.color),this.targetLine.material.color.set(this.color)):(this.lightPlane.material.color.copy(this.light.color),this.targetLine.material.color.copy(this.light.color)),this.targetLine.lookAt(n),this.targetLine.scale.z=n.length()}}(),(Jr.prototype=Object.create(me.prototype)).constructor=Jr,Jr.prototype.update=function(){function t(t,o,a,s){r.set(o,a,s).unproject(i);var u=n[t];if(void 0!==u)for(var c=e.getAttribute("position"),l=0,h=u.length;l<h;l++)c.setXYZ(u[l],r.x,r.y,r.z)}var e,n,r=new l,i=new ht;return function(){e=this.geometry,n=this.pointMap;i.projectionMatrix.copy(this.camera.projectionMatrix),t("c",0,0,-1),t("t",0,0,1),t("n1",-1,-1,-1),t("n2",1,-1,-1),t("n3",-1,1,-1),t("n4",1,1,-1),t("f1",-1,-1,1),t("f2",1,-1,1),t("f3",-1,1,1),t("f4",1,1,1),t("u1",.7,1.1,-1),t("u2",-.7,1.1,-1),t("u3",0,2,-1),t("cf1",-1,0,1),t("cf2",1,0,1),t("cf3",0,-1,1),t("cf4",0,1,1),t("cn1",-1,0,-1),t("cn2",1,0,-1),t("cn3",0,-1,-1),t("cn4",0,1,-1),e.getAttribute("position").needsUpdate=!0}}(),(Qr.prototype=Object.create(me.prototype)).constructor=Qr,Qr.prototype.update=function(){var t=new et;return function(e){if(void 0!==e&&console.warn("THREE.BoxHelper: .update() has no longer arguments."),void 0!==this.object&&t.setFromObject(this.object),!t.isEmpty()){var n=t.min,r=t.max,i=this.geometry.attributes.position,o=i.array;o[0]=r.x,o[1]=r.y,o[2]=r.z,o[3]=n.x,o[4]=r.y,o[5]=r.z,o[6]=n.x,o[7]=n.y,o[8]=r.z,o[9]=r.x,o[10]=n.y,o[11]=r.z,o[12]=r.x,o[13]=r.y,o[14]=n.z,o[15]=n.x,o[16]=r.y,o[17]=n.z,o[18]=n.x,o[19]=n.y,o[20]=n.z,o[21]=r.x,o[22]=n.y,o[23]=n.z,i.needsUpdate=!0,this.geometry.computeBoundingSphere()}}}(),Qr.prototype.setFromObject=function(t){return this.object=t,this.update(),this},($r.prototype=Object.create(me.prototype)).constructor=$r,$r.prototype.onBeforeRender=function(){var t=this.box;t.isEmpty()||(t.getCenter(this.position),t.getSize(this.scale),this.scale.multiplyScalar(.5))},(ti.prototype=Object.create(fe.prototype)).constructor=ti,ti.prototype.onBeforeRender=function(){var t=-this.plane.constant;Math.abs(t)<1e-8&&(t=1e-8),this.scale.set(.5*this.size,.5*this.size,t),this.lookAt(this.plane.normal),this.updateMatrixWorld()};var Ds,Us;(ei.prototype=Object.create(lt.prototype)).constructor=ei,ei.prototype.setDirection=function(){var t,e=new l;return function(n){n.y>.99999?this.quaternion.set(0,0,0,1):n.y<-.99999?this.quaternion.set(1,0,0,0):(e.set(n.z,0,-n.x).normalize(),t=Math.acos(n.y),this.quaternion.setFromAxisAngle(e,t))}}(),ei.prototype.setLength=function(t,e,n){void 0===e&&(e=.2*t),void 0===n&&(n=.2*e),this.line.scale.set(1,Math.max(0,t-e),1),this.line.updateMatrix(),this.cone.scale.set(n,e,n),this.cone.position.y=t,this.cone.updateMatrix()},ei.prototype.setColor=function(t){this.line.material.color.copy(t),this.cone.material.color.copy(t)},(ni.prototype=Object.create(me.prototype)).constructor=ni;var Fs=new l,ks=new ri,zs=new ri,Bs=new ri;(ii.prototype=Object.create(nr.prototype)).constructor=ii,ii.prototype.getPoint=function(t){var e=this.points,n=e.length,r=(n-(this.closed?0:1))*t,i=Math.floor(r),o=r-i;this.closed?i+=i>0?0:(Math.floor(Math.abs(i)/e.length)+1)*e.length:0===o&&i===n-1&&(i=n-2,o=1);var a,s,u,c;if(this.closed||i>0?a=e[(i-1)%n]:(Fs.subVectors(e[0],e[1]).add(e[0]),a=Fs),s=e[i%n],u=e[(i+1)%n],this.closed||i+2<n?c=e[(i+2)%n]:(Fs.subVectors(e[n-1],e[n-2]).add(e[n-1]),c=Fs),void 0===this.type||"centripetal"===this.type||"chordal"===this.type){var h="chordal"===this.type?.5:.25,p=Math.pow(a.distanceToSquared(s),h),d=Math.pow(s.distanceToSquared(u),h),f=Math.pow(u.distanceToSquared(c),h);d<1e-4&&(d=1),p<1e-4&&(p=d),f<1e-4&&(f=d),ks.initNonuniformCatmullRom(a.x,s.x,u.x,c.x,p,d,f),zs.initNonuniformCatmullRom(a.y,s.y,u.y,c.y,p,d,f),Bs.initNonuniformCatmullRom(a.z,s.z,u.z,c.z,p,d,f)}else if("catmullrom"===this.type){var m=void 0!==this.tension?this.tension:.5;ks.initCatmullRom(a.x,s.x,u.x,c.x,m),zs.initCatmullRom(a.y,s.y,u.y,c.y,m),Bs.initCatmullRom(a.z,s.z,u.z,c.z,m)}return new l(ks.calc(o),zs.calc(o),Bs.calc(o))},(oi.prototype=Object.create(nr.prototype)).constructor=oi,oi.prototype.getPoint=function(t){var e=this.v0,n=this.v1,r=this.v2,i=this.v3;return new l(er(t,e.x,n.x,r.x,i.x),er(t,e.y,n.y,r.y,i.y),er(t,e.z,n.z,r.z,i.z))},(ai.prototype=Object.create(nr.prototype)).constructor=ai,ai.prototype.getPoint=function(t){var e=this.v0,n=this.v1,r=this.v2;return new l(tr(t,e.x,n.x,r.x),tr(t,e.y,n.y,r.y),tr(t,e.z,n.z,r.z))},(si.prototype=Object.create(nr.prototype)).constructor=si,si.prototype.getPoint=function(t){if(1===t)return this.v2.clone();var e=new l;return e.subVectors(this.v2,this.v1),e.multiplyScalar(t),e.add(this.v1),e},(ui.prototype=Object.create(or.prototype)).constructor=ui;var Hs={createMultiMaterialObject:function(t,e){for(var n=new _e,r=0,i=e.length;r<i;r++)n.add(new kt(t,e[r]));return n},detach:function(t,e,n){t.applyMatrix(e.matrixWorld),e.remove(t),n.add(t)},attach:function(t,e,n){t.applyMatrix((new h).getInverse(n.matrixWorld)),e.remove(t),n.add(t)}},Gs=0,js=1;nr.create=function(t,e){return console.log("THREE.Curve.create() has been deprecated"),t.prototype=Object.create(nr.prototype),t.prototype.constructor=t,t.prototype.getPoint=e,t},Pi.prototype=Object.create(ii.prototype),Ri.prototype=Object.create(ii.prototype),Li.prototype=Object.create(ii.prototype),Object.assign(Li.prototype,{initFromArray:function(t){console.error("THREE.Spline: .initFromArray() has been removed.")},getControlPointsArray:function(t){console.error("THREE.Spline: .getControlPointsArray() has been removed.")},reparametrizeByArcLength:function(t){console.error("THREE.Spline: .reparametrizeByArcLength() has been removed.")}}),Xr.prototype.setColors=function(){console.error("THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.")},jr.prototype.update=function(){console.error("THREE.SkeletonHelper: update() no longer needs to be called.")},Object.assign(X.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(et.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)}}),Ut.prototype.center=function(t){return console.warn("THREE.Line3: .center() has been renamed to .getCenter()."),this.getCenter(t)},rs.random16=function(){return console.warn("THREE.Math.random16() has been deprecated. Use Math.random() instead."),Math.random()},Object.assign(rt.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(t){console.error("THREE.Matrix3: .multiplyVector3Array() has been removed.")},applyToBuffer:function(t,e,n){return console.warn("THREE.Matrix3: .applyToBuffer() has been removed. Use matrix.applyToBufferAttribute( attribute ) instead."),this.applyToBufferAttribute(t)},applyToVector3Array:function(t,e,n){console.error("THREE.Matrix3: .applyToVector3Array() has been removed.")}}),Object.assign(h.prototype,{extractPosition:function(t){return console.warn("THREE.Matrix4: .extractPosition() has been renamed to .copyPosition()."),this.copyPosition(t)},flattenToArrayOffset:function(t,e){return console.warn("THREE.Matrix4: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(t,e)},getPosition:function(){var t;return function(){return void 0===t&&(t=new l),console.warn("THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead."),t.setFromMatrixColumn(this,3)}}(),setRotationFromQuaternion:function(t){return console.warn("THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion()."),this.makeRotationFromQuaternion(t)},multiplyToArray:function(){console.warn("THREE.Matrix4: .multiplyToArray() has been removed.")},multiplyVector3:function(t){return console.warn("THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) instead."),t.applyMatrix4(this)},multiplyVector4:function(t){return console.warn("THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead."),t.applyMatrix4(this)},multiplyVector3Array:function(t){console.error("THREE.Matrix4: .multiplyVector3Array() has been removed.")},rotateAxis:function(t){console.warn("THREE.Matrix4: .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead."),t.transformDirection(this)},crossVector:function(t){return console.warn("THREE.Matrix4: .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead."),t.applyMatrix4(this)},translate:function(){console.error("THREE.Matrix4: .translate() has been removed.")},rotateX:function(){console.error("THREE.Matrix4: .rotateX() has been removed.")},rotateY:function(){console.error("THREE.Matrix4: .rotateY() has been removed.")},rotateZ:function(){console.error("THREE.Matrix4: .rotateZ() has been removed.")},rotateByAxis:function(){console.error("THREE.Matrix4: .rotateByAxis() has been removed.")},applyToBuffer:function(t,e,n){return console.warn("THREE.Matrix4: .applyToBuffer() has been removed. Use matrix.applyToBufferAttribute( attribute ) instead."),this.applyToBufferAttribute(t)},applyToVector3Array:function(t,e,n){console.error("THREE.Matrix4: .applyToVector3Array() has been removed.")},makeFrustum:function(t,e,n,r,i,o){return console.warn("THREE.Matrix4: .makeFrustum() has been removed. Use .makePerspective( left, right, top, bottom, near, far ) instead."),this.makePerspective(t,e,r,n,i,o)}}),it.prototype.isIntersectionLine=function(t){return console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine()."),this.intersectsLine(t)},c.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(Dt.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(lr.prototype,{extrude:function(t){return console.warn("THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead."),new Ge(this,t)},makeGeometry:function(t){return console.warn("THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead."),new Qe(this,t)}}),Object.assign(i.prototype,{fromAttribute:function(t,e,n){return console.error("THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,n)}}),Object.assign(l.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.error("THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,n)}}),Object.assign(a.prototype,{fromAttribute:function(t,e,n){return console.error("THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,n)}}),vt.prototype.computeTangents=function(){console.warn("THREE.Geometry: .computeTangents() has been removed.")},Object.assign(lt.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)}}),Object.defineProperties(lt.prototype,{eulerOrder:{get:function(){return console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order},set:function(t){console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order=t}},useQuaternion:{get:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")},set:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")}}}),Object.defineProperties(ce.prototype,{objects:{get:function(){return console.warn("THREE.LOD: .objects has been renamed to .levels."),this.levels}}}),Object.defineProperty(le.prototype,"useVertexTexture",{get:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")},set:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")}}),Object.defineProperty(nr.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}}),dt.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(Mn.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(gt.prototype,{length:{get:function(){return console.warn("THREE.BufferAttribute: .length has been deprecated. Use .count instead."),this.array.length}}}),Object.assign(Pt.prototype,{addIndex:function(t){console.warn("THREE.BufferGeometry: .addIndex() has been renamed to .setIndex()."),this.setIndex(t)},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.")}}),Object.defineProperties(Pt.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(Cr.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(J.prototype,{wrapAround:{get:function(){console.warn("THREE.Material: .wrapAround has been removed.")},set:function(){console.warn("THREE.Material: .wrapAround has been removed.")}},wrapRGB:{get:function(){return console.warn("THREE.Material: .wrapRGB has been removed."),new q}},shading:{get:function(){console.error("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead.")},set:function(t){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=t===$i}}}),Object.defineProperties(pn.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(Q.prototype,{derivatives:{get:function(){return console.warn("THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives},set:function(t){console.warn("THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives=t}}}),Object.assign(ne.prototype,{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},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.")}}),Object.defineProperties(ne.prototype,{shadowMapEnabled:{get:function(){return this.shadowMap.enabled},set:function(t){console.warn("THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled."),this.shadowMap.enabled=t}},shadowMapType:{get:function(){return this.shadowMap.type},set:function(t){console.warn("THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type."),this.shadowMap.type=t}},shadowMapCullFace:{get:function(){return this.shadowMap.cullFace},set:function(t){console.warn("THREE.WebGLRenderer: .shadowMapCullFace is now .shadowMap.cullFace."),this.shadowMap.cullFace=t}}}),Object.defineProperties(at.prototype,{cullFace:{get:function(){return this.renderReverseSided?ji:Gi},set:function(t){var e=t!==Gi;console.warn("WebGLRenderer: .shadowMap.cullFace is deprecated. Set .shadowMap.renderReverseSided to "+e+"."),this.renderReverseSided=e}}}),Object.defineProperties(s.prototype,{wrapS:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS},set:function(t){console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS=t}},wrapT:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT},set:function(t){console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT=t}},magFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter},set:function(t){console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter=t}},minFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter},set:function(t){console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter=t}},anisotropy:{get:function(){return console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy},set:function(t){console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy=t}},offset:{get:function(){return console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset},set:function(t){console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset=t}},repeat:{get:function(){return console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat},set:function(t){console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat=t}},format:{get:function(){return console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format},set:function(t){console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format=t}},type:{get:function(){return console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type},set:function(t){console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type=t}},generateMipmaps:{get:function(){return console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps},set:function(t){console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps=t}}}),yr.prototype.load=function(t){console.warn("THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.");var e=this;return(new fr).load(t,function(t){e.setBuffer(t)}),this},br.prototype.getData=function(){return console.warn("THREE.AudioAnalyser: .getData() is now .getFrequencyData()."),this.getFrequencyData()},vr.prototype.updateCubeMap=function(t,e){return console.warn("THREE.CubeCamera: .updateCubeMap() is now .update()."),this.update(t,e)};var Vs={merge:function(t,e,n){console.warn("THREE.GeometryUtils: .merge() has been moved to Geometry. Use geometry.merge( geometry2, matrix, materialIndexOffset ) instead.");var r;e.isMesh&&(e.matrixAutoUpdate&&e.updateMatrix(),r=e.matrix,e=e.geometry),t.merge(e,r,n)},center:function(t){return console.warn("THREE.GeometryUtils: .center() has been moved to Geometry. Use geometry.center() instead."),t.center()}},Ws={crossOrigin:void 0,loadTexture:function(t,e,n,r){console.warn("THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.");var i=new En;i.setCrossOrigin(this.crossOrigin);var o=i.load(t,n,void 0,r);return e&&(o.mapping=e),o},loadTextureCube:function(t,e,n,r){console.warn("THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.");var i=new wn;i.setCrossOrigin(this.crossOrigin);var o=i.load(t,n,void 0,r);return e&&(o.mapping=e),o},loadCompressedTexture:function(){console.error("THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.")},loadCompressedTextureCube:function(){console.error("THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead.")}}},100:function(t,e,n){"use strict";e.a=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return 0===e.length?function(t){return t}:1===e.length?e[0]:e.reduce(function(t,e){return function(){return t(e.apply(void 0,arguments))}})}},101:function(t,e,n){"use strict";n.d(e,"b",function(){return o}),n.d(e,"a",function(){return a});var r=n(2),i=n.n(r),o=i.a.shape({trySubscribe:i.a.func.isRequired,tryUnsubscribe:i.a.func.isRequired,notifyNestedSubs:i.a.func.isRequired,isSubscribed:i.a.func.isRequired}),a=i.a.shape({subscribe:i.a.func.isRequired,dispatch:i.a.func.isRequired,getState:i.a.func.isRequired})},102:function(t,e,n){"use strict";function r(){}function i(t){var e,n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=i.getDisplayName,s=void 0===o?function(t){return"ConnectAdvanced("+t+")"}:o,m=i.methodName,v=void 0===m?"connectAdvanced":m,g=i.renderCountProp,y=void 0===g?void 0:g,_=i.shouldHandleStateChanges,b=void 0===_||_,x=i.storeKey,w=void 0===x?"store":x,E=i.withRef,M=void 0!==E&&E,T=function(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}(i,["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef"]),S=w+"Subscription",C=d++,A=(e={},e[w]=h.a,e[S]=h.b,e),P=(n={},n[S]=h.b,n);return function(e){u()("function"==typeof e,"You must pass a component to the function returned by connect. Instead received "+JSON.stringify(e));var n=e.displayName||e.name||"Component",i=s(n),o=p({},T,{getDisplayName:s,methodName:v,renderCountProp:y,shouldHandleStateChanges:b,storeKey:w,withRef:M,displayName:i,wrappedComponentName:n,WrappedComponent:e}),h=function(n){function a(t,e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,n.call(this,t,e));return r.version=C,r.state={},r.renderCount=0,r.store=t[w]||e[w],r.propsMode=Boolean(t[w]),r.setWrappedInstance=r.setWrappedInstance.bind(r),u()(r.store,'Could not find "'+w+'" in either the context or props of "'+i+'". Either wrap the root component in a <Provider>, or explicitly pass "'+w+'" as a prop to "'+i+'".'),r.initSelector(),r.initSubscription(),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(a,n),a.prototype.getChildContext=function(){var t,e=this.propsMode?null:this.subscription;return t={},t[S]=e||this.context[S],t},a.prototype.componentDidMount=function(){b&&(this.subscription.trySubscribe(),this.selector.run(this.props),this.selector.shouldComponentUpdate&&this.forceUpdate())},a.prototype.componentWillReceiveProps=function(t){this.selector.run(t)},a.prototype.shouldComponentUpdate=function(){return this.selector.shouldComponentUpdate},a.prototype.componentWillUnmount=function(){this.subscription&&this.subscription.tryUnsubscribe(),this.subscription=null,this.notifyNestedSubs=r,this.store=null,this.selector.run=r,this.selector.shouldComponentUpdate=!1},a.prototype.getWrappedInstance=function(){return u()(M,"To access the wrapped instance, you need to specify { withRef: true } in the options argument of the "+v+"() call."),this.wrappedInstance},a.prototype.setWrappedInstance=function(t){this.wrappedInstance=t},a.prototype.initSelector=function(){var e=t(this.store.dispatch,o);this.selector=function(t,e){var n={run:function(r){try{var i=t(e.getState(),r);(i!==n.props||n.error)&&(n.shouldComponentUpdate=!0,n.props=i,n.error=null)}catch(t){n.shouldComponentUpdate=!0,n.error=t}}};return n}(e,this.store),this.selector.run(this.props)},a.prototype.initSubscription=function(){if(b){var t=(this.propsMode?this.props:this.context)[S];this.subscription=new l.a(this.store,t,this.onStateChange.bind(this)),this.notifyNestedSubs=this.subscription.notifyNestedSubs.bind(this.subscription)}},a.prototype.onStateChange=function(){this.selector.run(this.props),this.selector.shouldComponentUpdate?(this.componentDidUpdate=this.notifyNestedSubsOnComponentDidUpdate,this.setState(f)):this.notifyNestedSubs()},a.prototype.notifyNestedSubsOnComponentDidUpdate=function(){this.componentDidUpdate=void 0,this.notifyNestedSubs()},a.prototype.isSubscribed=function(){return Boolean(this.subscription)&&this.subscription.isSubscribed()},a.prototype.addExtraProps=function(t){if(!(M||y||this.propsMode&&this.subscription))return t;var e=p({},t);return M&&(e.ref=this.setWrappedInstance),y&&(e[y]=this.renderCount++),this.propsMode&&this.subscription&&(e[S]=this.subscription),e},a.prototype.render=function(){var t=this.selector;if(t.shouldComponentUpdate=!1,t.error)throw t.error;return Object(c.createElement)(e,this.addExtraProps(t.props))},a}(c.Component);return h.WrappedComponent=e,h.displayName=i,h.childContextTypes=P,h.contextTypes=A,h.propTypes=A,a()(h,e)}}e.a=i;var o=n(234),a=n.n(o),s=n(96),u=n.n(s),c=n(0),l=(n.n(c),n(235)),h=n(101),p=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},d=0,f={}},103:function(t,e,n){"use strict";function r(t){return null!==t.dependsOnOwnProps&&void 0!==t.dependsOnOwnProps?Boolean(t.dependsOnOwnProps):1!==t.length}e.a=function(t){return function(e,n){function r(){return i}var i=t(e,n);return r.dependsOnOwnProps=!1,r}},e.b=function(t,e){return function(e,n){n.displayName;var i=function(t,e){return i.dependsOnOwnProps?i.mapToProps(t,e):i.mapToProps(t)};return i.dependsOnOwnProps=!0,i.mapToProps=function(e,n){i.mapToProps=t,i.dependsOnOwnProps=r(t);var o=i(e,n);return"function"==typeof o&&(i.mapToProps=o,i.dependsOnOwnProps=r(o),o=i(e,n)),o},i}};n(104)},104:function(t,e,n){"use strict";n(60),n(62)},185:function(t,e,n){"use strict";function r(t){for(var e=arguments.length-1,n="Minified React error #"+t+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant="+t,r=0;r<e;r++)n+="&args[]="+encodeURIComponent(arguments[r+1]);throw e=Error(n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."),e.name="Invariant Violation",e.framesToPop=1,e}function i(t,e,n){this.props=t,this.context=e,this.refs=g,this.updater=n||_}function o(t,e,n){this.props=t,this.context=e,this.refs=g,this.updater=n||_}function a(){}function s(t,e,n){this.props=t,this.context=e,this.refs=g,this.updater=n||_}function u(t,e,n,r,i,o,a){return{$$typeof:T,type:t,key:e,ref:n,props:a,_owner:o}}function c(t,e,n,r){if(R.length){var i=R.pop();return i.result=t,i.keyPrefix=e,i.func=n,i.context=r,i.count=0,i}return{result:t,keyPrefix:e,func:n,context:r,count:0}}function l(t){t.result=null,t.keyPrefix=null,t.func=null,t.context=null,t.count=0,10>R.length&&R.push(t)}function h(t,e,n,i){var o=typeof t;if("undefined"!==o&&"boolean"!==o||(t=null),null===t||"string"===o||"number"===o||"object"===o&&t.$$typeof===A)return n(i,t,""===e?"."+p(t,0):e),1;var a=0;if(e=""===e?".":e+":",Array.isArray(t))for(var s=0;s<t.length;s++){var u=e+p(o=t[s],s);a+=h(o,u,n,i)}else if("function"==typeof(u=C&&t[C]||t["@@iterator"]))for(t=u.call(t),s=0;!(o=t.next()).done;)o=o.value,u=e+p(o,s++),a+=h(o,u,n,i);else"object"===o&&(n=""+t,r("31","[object Object]"===n?"object with keys {"+Object.keys(t).join(", ")+"}":n,""));return a}function p(t,e){return"object"==typeof t&&null!==t&&null!=t.key?function(t){var e={"=":"=0",":":"=2"};return"$"+(""+t).replace(/[=:]/g,function(t){return e[t]})}(t.key):e.toString(36)}function d(t,e){t.func.call(t.context,e,t.count++)}function f(t,e,n){var r=t.result,i=t.keyPrefix;t=t.func.call(t.context,e,t.count++),Array.isArray(t)?m(t,r,n,y.thatReturnsArgument):null!=t&&(u.isValidElement(t)&&(t=u.cloneAndReplaceKey(t,i+(!t.key||e&&e.key===t.key?"":(""+t.key).replace(P,"$&/")+"/")+n)),r.push(t))}function m(t,e,n,r,i){var o="";null!=n&&(o=(""+n).replace(P,"$&/")+"/"),e=c(e,o,r,i),null==t||h(t,"",f,e),l(e)}var v=n(186),g=n(187);n(188);var y=n(189),_={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}};i.prototype.isReactComponent={},i.prototype.setState=function(t,e){"object"!=typeof t&&"function"!=typeof t&&null!=t&&r("85"),this.updater.enqueueSetState(this,t,e,"setState")},i.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")},a.prototype=i.prototype;var b=o.prototype=new a;b.constructor=o,v(b,i.prototype),b.isPureReactComponent=!0;var x=s.prototype=new a;x.constructor=s,v(x,i.prototype),x.unstable_isAsyncReactComponent=!0,x.render=function(){return this.props.children};var w={Component:i,PureComponent:o,AsyncComponent:s},E={current:null},M=Object.prototype.hasOwnProperty,T="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,S={key:!0,ref:!0,__self:!0,__source:!0};u.createElement=function(t,e,n){var r,i={},o=null,a=null;if(null!=e)for(r in void 0!==e.ref&&(a=e.ref),void 0!==e.key&&(o=""+e.key),void 0===e.__self?null:e.__self,void 0===e.__source?null:e.__source,e)M.call(e,r)&&!S.hasOwnProperty(r)&&(i[r]=e[r]);var s=arguments.length-2;if(1===s)i.children=n;else if(1<s){for(var c=Array(s),l=0;l<s;l++)c[l]=arguments[l+2];i.children=c}if(t&&t.defaultProps)for(r in s=t.defaultProps)void 0===i[r]&&(i[r]=s[r]);return u(t,o,a,0,0,E.current,i)},u.createFactory=function(t){var e=u.createElement.bind(null,t);return e.type=t,e},u.cloneAndReplaceKey=function(t,e){return u(t.type,e,t.ref,t._self,t._source,t._owner,t.props)},u.cloneElement=function(t,e,n){var r=v({},t.props),i=t.key,o=t.ref,a=(t._self,t._source,t._owner);if(null!=e){if(void 0!==e.ref&&(o=e.ref,a=E.current),void 0!==e.key&&(i=""+e.key),t.type&&t.type.defaultProps)var s=t.type.defaultProps;for(c in e)M.call(e,c)&&!S.hasOwnProperty(c)&&(r[c]=void 0===e[c]&&void 0!==s?s[c]:e[c])}var c=arguments.length-2;if(1===c)r.children=n;else if(1<c){s=Array(c);for(var l=0;l<c;l++)s[l]=arguments[l+2];r.children=s}return u(t.type,i,o,0,0,a,r)},u.isValidElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===T};var C="function"==typeof Symbol&&Symbol.iterator,A="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,P=/\/+/g,R=[],L={forEach:function(t,e,n){if(null==t)return t;e=c(null,null,e,n),null==t||h(t,"",d,e),l(e)},map:function(t,e,n){if(null==t)return t;var r=[];return m(t,r,null,e,n),r},count:function(t){return null==t?0:h(t,"",y.thatReturnsNull,null)},toArray:function(t){var e=[];return m(t,e,null,y.thatReturnsArgument),e}};t.exports={Children:{map:L.map,forEach:L.forEach,count:L.count,toArray:L.toArray,only:function(t){return u.isValidElement(t)||r("143"),t}},Component:w.Component,PureComponent:w.PureComponent,unstable_AsyncComponent:w.AsyncComponent,createElement:u.createElement,cloneElement:u.cloneElement,isValidElement:u.isValidElement,createFactory:u.createFactory,version:"16.0.0",__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentOwner:E,assign:v}}},186:function(t,e,n){"use strict";/*
object-assign
(c) Sindre Sorhus
@license MIT
*/
var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(e).map(function(t){return e[t]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(t){r[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var n,a,s=function(t){if(null===t||void 0===t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}(t),u=1;u<arguments.length;u++){n=Object(arguments[u]);for(var c in n)i.call(n,c)&&(s[c]=n[c]);if(r){a=r(n);for(var l=0;l<a.length;l++)o.call(n,a[l])&&(s[a[l]]=n[a[l]])}}return s}},187:function(t,e,n){"use strict";var r={};t.exports=r},188:function(t,e,n){"use strict";var r=function(t){};t.exports=function(t,e,n,i,o,a,s,u){if(r(e),!t){var c;if(void 0===e)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,i,o,a,s,u],h=0;(c=new Error(e.replace(/%s/g,function(){return l[h++]}))).name="Invariant Violation"}throw c.framesToPop=1,c}}},189:function(t,e,n){"use strict";function r(t){return function(){return t}}var i=function(){};i.thatReturns=r,i.thatReturnsFalse=r(!1),i.thatReturnsTrue=r(!0),i.thatReturnsNull=r(null),i.thatReturnsThis=function(){return this},i.thatReturnsArgument=function(t){return t},t.exports=i},190:function(t,e,n){"use strict";function r(t){for(var e=arguments.length-1,n="Minified React error #"+t+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant="+t,r=0;r<e;r++)n+="&args[]="+encodeURIComponent(arguments[r+1]);throw e=Error(n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."),e.name="Invariant Violation",e.framesToPop=1,e}function i(t){switch(t){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function o(){if(me)for(var t in ve){var e=ve[t],n=me.indexOf(t);if(-1<n||r("96",t),!ge.plugins[n]){e.extractEvents||r("97",t),ge.plugins[n]=e,n=e.eventTypes;for(var i in n){var o=void 0,s=n[i],u=e,c=i;ge.eventNameDispatchConfigs.hasOwnProperty(c)&&r("99",c),ge.eventNameDispatchConfigs[c]=s;var l=s.phasedRegistrationNames;if(l){for(o in l)l.hasOwnProperty(o)&&a(l[o],u,c);o=!0}else s.registrationName?(a(s.registrationName,u,c),o=!0):o=!1;o||r("98",i,t)}}}}function a(t,e,n){ge.registrationNameModules[t]&&r("100",t),ge.registrationNameModules[t]=e,ge.registrationNameDependencies[t]=e.eventTypes[n].dependencies}function s(t,e){return(t&e)===e}function u(t){for(var e;e=t._renderedComponent;)t=e;return t}function c(t,e){(t=u(t))._hostNode=e,e[Ie]=t}function l(t,e){if(!(t._flags&Re.hasCachedChildNodes)){var n=t._renderedChildren;e=e.firstChild;var i;t:for(i in n)if(n.hasOwnProperty(i)){var o=n[i],a=u(o)._domID;if(0!==a){for(;null!==e;e=e.nextSibling){var s=e,l=a;if(s.nodeType===Ce&&s.getAttribute(Pe)===""+l||s.nodeType===Ae&&s.nodeValue===" react-text: "+l+" "||s.nodeType===Ae&&s.nodeValue===" react-empty: "+l+" "){c(o,e);continue t}}r("32",a)}}t._flags|=Re.hasCachedChildNodes}}function h(t){if(t[Ie])return t[Ie];for(var e=[];!t[Ie];){if(e.push(t),!t.parentNode)return null;t=t.parentNode}var n=t[Ie];if(n.tag===Te||n.tag===Se)return n;for(;t&&(n=t[Ie]);t=e.pop()){var r=n;e.length&&l(n,t)}return r}function p(t){if("function"==typeof t.getName)return t.getName();if("number"==typeof t.tag){if("string"==typeof(t=t.type))return t;if("function"==typeof t)return t.displayName||t.name}return null}function d(t){var e=t;if(t.alternate)for(;e.return;)e=e.return;else{if((e.effectTag&je)!==Ge)return 1;for(;e.return;)if(((e=e.return).effectTag&je)!==Ge)return 1}return e.tag===ze?2:3}function f(t){2!==d(t)&&r("188")}function m(t){var e=t.alternate;if(!e)return 3===(e=d(t))&&r("188"),1===e?null:t;for(var n=t,i=e;;){var o=n.return,a=o?o.alternate:null;if(!o||!a)break;if(o.child===a.child){for(var s=o.child;s;){if(s===n)return f(o),t;if(s===i)return f(o),e;s=s.sibling}r("188")}if(n.return!==i.return)n=o,i=a;else{s=!1;for(var u=o.child;u;){if(u===n){s=!0,n=o,i=a;break}if(u===i){s=!0,i=o,n=a;break}u=u.sibling}if(!s){for(u=a.child;u;){if(u===n){s=!0,n=a,i=o;break}if(u===i){s=!0,i=a,n=o;break}u=u.sibling}s||r("189")}}n.alternate!==i&&r("190")}return n.tag!==ze&&r("188"),n.stateNode.current===n?t:e}function v(t,e,n,r,i,o,a,s,u){We._hasCaughtError=!1,We._caughtError=null;var c=Array.prototype.slice.call(arguments,3);try{e.apply(n,c)}catch(t){We._caughtError=t,We._hasCaughtError=!0}}function g(t,e,n,r){e=t.type||"unknown-event",t.currentTarget=Xe.getNodeFromInstance(r),qe.invokeGuardedCallbackAndCatchFirstError(e,n,void 0,t),t.currentTarget=null}function y(t){if(t=Ye.getInstanceFromNode(t))if("number"==typeof t.tag){Ke&&"function"==typeof Ke.restoreControlledState||r("194");var e=Ye.getFiberCurrentPropsFromNode(t.stateNode);Ke.restoreControlledState(t.stateNode,t.type,e)}else"function"!=typeof t.restoreControlledState&&r("195"),t.restoreControlledState()}function _(t,e,n,r,i,o){return t(e,n,r,i,o)}function b(t,e){return t(e)}function x(t,e){return b(t,e)}function w(t){return(t=t.target||t.srcElement||window).correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===en?t.parentNode:t}function E(t){var e=t.targetInst;do{if(!e){t.ancestors.push(e);break}var n=e;if("number"==typeof n.tag){for(;n.return;)n=n.return;n=n.tag!==nn?null:n.stateNode.containerInfo}else{for(;n._hostParent;)n=n._hostParent;n=Ne.getNodeFromInstance(n).parentNode}if(!n)break;t.ancestors.push(e),e=Ne.getClosestInstanceFromNode(n)}while(e);for(n=0;n<t.ancestors.length;n++)e=t.ancestors[n],on._handleTopLevel(t.topLevelType,e,t.nativeEvent,w(t.nativeEvent))}function M(t,e){return null==e&&r("30"),null==t?e:Array.isArray(t)?Array.isArray(e)?(t.push.apply(t,e),t):(t.push(e),t):Array.isArray(e)?[t].concat(e):[t,e]}function T(t,e,n){Array.isArray(t)?t.forEach(e,n):t&&e.call(n,t)}function S(t,e){t&&(Ye.executeDispatchesInOrder(t,e),t.isPersistent()||t.constructor.release(t))}function C(t){return S(t,!0)}function A(t){return S(t,!1)}function P(t,e,n){switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":return!(!n.disabled||"button"!==e&&"input"!==e&&"select"!==e&&"textarea"!==e);default:return!1}}function R(t,e){if(!re.canUseDOM||e&&!("addEventListener"in document))return!1;var n=(e="on"+t)in document;return n||((n=document.createElement("div")).setAttribute(e,"return;"),n="function"==typeof n[e]),!n&&de&&"wheel"===t&&(n=document.implementation.hasFeature("Events.wheel","3.0")),n}function L(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit"+t]="webkit"+e,n["Moz"+t]="moz"+e,n["ms"+t]="MS"+e,n["O"+t]="o"+e.toLowerCase(),n}function I(t){if(ln[t])return ln[t];if(!cn[t])return t;var e,n=cn[t];for(e in n)if(n.hasOwnProperty(e)&&e in hn)return ln[t]=n[e];return""}function O(t){return Object.prototype.hasOwnProperty.call(t,mn)||(t[mn]=fn++,dn[t[mn]]={}),dn[t[mn]]}function N(){return null}function D(t,e,n){if(t=t.options,e){e={};for(var r=0;r<n.length;r++)e["$"+n[r]]=!0;for(n=0;n<t.length;n++)r=e.hasOwnProperty("$"+t[n].value),t[n].selected!==r&&(t[n].selected=r)}else{for(n=""+n,e=null,r=0;r<t.length;r++){if(t[r].value===n)return void(t[r].selected=!0);null!==e||t[r].disabled||(e=t[r])}null!==e&&(e.selected=!0)}}function U(t,e){e&&(zn[t]&&(null!=e.children||null!=e.dangerouslySetInnerHTML)&&r("137",t,""),null!=e.dangerouslySetInnerHTML&&(null!=e.children&&r("60"),"object"==typeof e.dangerouslySetInnerHTML&&"__html"in e.dangerouslySetInnerHTML||r("61")),null!=e.style&&"object"!=typeof e.style&&r("62",""))}function F(t){var e=t.type;return(t=t.nodeName)&&"input"===t.toLowerCase()&&("checkbox"===e||"radio"===e)}function k(t,e){if(-1===t.indexOf("-"))return"string"==typeof e.is;switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function z(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===Vn)return void(n.nodeValue=e)}t.textContent=e}function B(t,e){Yn(e,t.nodeType===qn||t.nodeType===Xn?t:t.ownerDocument)}function H(t,e){return t!==_r&&t!==yr||e!==_r&&e!==yr?t===gr&&e!==gr?-255:t!==gr&&e===gr?255:t-e:0}function G(t,e,n,r){null!==n?n.next=e:(e.next=t.first,t.first=e),null!==r?e.next=r:t.last=e}function j(t,e){e=e.priorityLevel;var n=null;if(null!==t.last&&0>=H(t.last.priorityLevel,e))n=t.last;else for(t=t.first;null!==t&&0>=H(t.priorityLevel,e);)n=t,t=t.next;return n}function V(t,e){var n=t.alternate,r=t.updateQueue;null===r&&(r=t.updateQueue={first:null,last:null,hasForceUpdate:!1,callbackList:null}),null!==n?null===(t=n.updateQueue)&&(t=n.updateQueue={first:null,last:null,hasForceUpdate:!1,callbackList:null}):t=null;var i=wr=r;n=Er=t!==r?t:null;var o=j(i,e),a=null!==o?o.next:i.first;return null===n?(G(i,e,o,a),null):(r=j(n,e),t=null!==r?r.next:n.first,G(i,e,o,a),a===t&&null!==a||o===r&&null!==o?(null===r&&(n.first=e),null===t&&(n.last=null),null):(e={priorityLevel:e.priorityLevel,partialState:e.partialState,callback:e.callback,isReplace:e.isReplace,isForced:e.isForced,isTopLevelUnmount:e.isTopLevelUnmount,next:null},G(n,e,r,t),e))}function W(t,e,n,r){return"function"==typeof(t=t.partialState)?t.call(e,n,r):t}function q(t,e,n){(t=t.stateNode).__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=n}function X(t){return t.tag===Pr&&null!=t.type.childContextTypes}function Y(t,e){var n=t.stateNode,i=t.type.childContextTypes;if("function"!=typeof n.getChildContext)return e;n=n.getChildContext();for(var o in n)o in i||r("108",p(t)||"Unknown",o);return ie({},e,n)}function K(t,e,n){this.tag=t,this.key=e,this.stateNode=this.type=null,this.sibling=this.child=this.return=null,this.index=0,this.memoizedState=this.updateQueue=this.memoizedProps=this.pendingProps=this.ref=null,this.internalContextTag=n,this.effectTag=Zr,this.lastEffect=this.firstEffect=this.nextEffect=null,this.pendingWorkPriority=Yr,this.alternate=null}function Z(t,e,n){var i=void 0;return"function"==typeof t?(i=t.prototype&&t.prototype.isReactComponent?new K(Br,e,n):new K(zr,e,n),i.type=t):"string"==typeof t?(i=new K(Gr,e,n),i.type=t):"object"==typeof t&&null!==t&&"number"==typeof t.tag?i=t:r("130",null==t?t:typeof t,""),i}function J(t){return null===t||void 0===t?null:"function"==typeof(t=Ci&&t[Ci]||t["@@iterator"])?t:null}function Q(t,e){var n=e.ref;if(null!==n&&"function"!=typeof n){if(e._owner){var i=void 0;(e=e._owner)&&("number"==typeof e.tag?(e.tag!==yi&&r("110"),i=e.stateNode):i=e.getPublicInstance()),i||r("147",n);var o=""+n;return null!==t&&null!==t.ref&&t.ref._stringRef===o?t.ref:(t=function(t){var e=i.refs===se?i.refs={}:i.refs;null===t?delete e[o]:e[o]=t},t._stringRef=o,t)}"string"!=typeof n&&r("148"),e._owner||r("149",n)}return n}function $(t,e){"textarea"!==t.type&&r("31","[object Object]"===Object.prototype.toString.call(e)?"object with keys {"+Object.keys(e).join(", ")+"}":e,"")}function tt(t,e){function n(n,r){if(e){if(!t){if(null===r.alternate)return;r=r.alternate}var i=n.lastEffect;null!==i?(i.nextEffect=r,n.lastEffect=r):n.firstEffect=n.lastEffect=r,r.nextEffect=null,r.effectTag=Si}}function i(t,r){if(!e)return null;for(;null!==r;)n(t,r),r=r.sibling;return null}function o(t,e){for(t=new Map;null!==e;)null!==e.key?t.set(e.key,e):t.set(e.index,e),e=e.sibling;return t}function a(e,n){return t?(e=ci(e,n),e.index=0,e.sibling=null,e):(e.pendingWorkPriority=n,e.effectTag=Mi,e.index=0,e.sibling=null,e)}function s(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.effectTag=Ti,n):r:(t.effectTag=Ti,n):n}function u(t){return e&&null===t.alternate&&(t.effectTag=Ti),t}function c(t,e,n,r){return null===e||e.tag!==_i?(n=pi(n,t.internalContextTag,r),n.return=t,n):(e=a(e,r),e.pendingProps=n,e.return=t,e)}function l(t,e,n,r){return null===e||e.type!==n.type?(r=li(n,t.internalContextTag,r),r.ref=Q(e,n),r.return=t,r):(r=a(e,r),r.ref=Q(e,n),r.pendingProps=n.props,r.return=t,r)}function h(t,e,n,r){return null===e||e.tag!==xi?(n=di(n,t.internalContextTag,r),n.return=t,n):(e=a(e,r),e.pendingProps=n,e.return=t,e)}function p(t,e,n,r){return null===e||e.tag!==wi?(e=fi(n,t.internalContextTag,r),e.type=n.value,e.return=t,e):(e=a(e,r),e.type=n.value,e.return=t,e)}function d(t,e,n,r){return null===e||e.tag!==bi||e.stateNode.containerInfo!==n.containerInfo||e.stateNode.implementation!==n.implementation?(n=mi(n,t.internalContextTag,r),n.return=t,n):(e=a(e,r),e.pendingProps=n.children||[],e.return=t,e)}function f(t,e,n,r){return null===e||e.tag!==Ei?(n=hi(n,t.internalContextTag,r),n.return=t,n):(e=a(e,r),e.pendingProps=n,e.return=t,e)}function m(t,e,n){if("string"==typeof e||"number"==typeof e)return e=pi(""+e,t.internalContextTag,n),e.return=t,e;if("object"==typeof e&&null!==e){switch(e.$$typeof){case Ai:return n=li(e,t.internalContextTag,n),n.ref=Q(null,e),n.return=t,n;case ai:return e=di(e,t.internalContextTag,n),e.return=t,e;case si:return n=fi(e,t.internalContextTag,n),n.type=e.value,n.return=t,n;case ui:return e=mi(e,t.internalContextTag,n),e.return=t,e}if(vi(e)||J(e))return e=hi(e,t.internalContextTag,n),e.return=t,e;$(t,e)}return null}function v(t,e,n,r){var i=null!==e?e.key:null;if("string"==typeof n||"number"==typeof n)return null!==i?null:c(t,e,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case Ai:return n.key===i?l(t,e,n,r):null;case ai:return n.key===i?h(t,e,n,r):null;case si:return null===i?p(t,e,n,r):null;case ui:return n.key===i?d(t,e,n,r):null}if(vi(n)||J(n))return null!==i?null:f(t,e,n,r);$(t,n)}return null}function g(t,e,n,r,i){if("string"==typeof r||"number"==typeof r)return t=t.get(n)||null,c(e,t,""+r,i);if("object"==typeof r&&null!==r){switch(r.$$typeof){case Ai:return t=t.get(null===r.key?n:r.key)||null,l(e,t,r,i);case ai:return t=t.get(null===r.key?n:r.key)||null,h(e,t,r,i);case si:return t=t.get(n)||null,p(e,t,r,i);case ui:return t=t.get(null===r.key?n:r.key)||null,d(e,t,r,i)}if(vi(r)||J(r))return t=t.get(n)||null,f(e,t,r,i);$(e,r)}return null}function y(t,r,a,u){for(var c=null,l=null,h=r,p=r=0,d=null;null!==h&&p<a.length;p++){h.index>p?(d=h,h=null):d=h.sibling;var f=v(t,h,a[p],u);if(null===f){null===h&&(h=d);break}e&&h&&null===f.alternate&&n(t,h),r=s(f,r,p),null===l?c=f:l.sibling=f,l=f,h=d}if(p===a.length)return i(t,h),c;if(null===h){for(;p<a.length;p++)(h=m(t,a[p],u))&&(r=s(h,r,p),null===l?c=h:l.sibling=h,l=h);return c}for(h=o(t,h);p<a.length;p++)(d=g(h,t,p,a[p],u))&&(e&&null!==d.alternate&&h.delete(null===d.key?p:d.key),r=s(d,r,p),null===l?c=d:l.sibling=d,l=d);return e&&h.forEach(function(e){return n(t,e)}),c}function _(t,a,u,c){var l=J(u);"function"!=typeof l&&r("150"),null==(u=l.call(u))&&r("151");for(var h=l=null,p=a,d=a=0,f=null,y=u.next();null!==p&&!y.done;d++,y=u.next()){p.index>d?(f=p,p=null):f=p.sibling;var _=v(t,p,y.value,c);if(null===_){p||(p=f);break}e&&p&&null===_.alternate&&n(t,p),a=s(_,a,d),null===h?l=_:h.sibling=_,h=_,p=f}if(y.done)return i(t,p),l;if(null===p){for(;!y.done;d++,y=u.next())null!==(y=m(t,y.value,c))&&(a=s(y,a,d),null===h?l=y:h.sibling=y,h=y);return l}for(p=o(t,p);!y.done;d++,y=u.next())null!==(y=g(p,t,d,y.value,c))&&(e&&null!==y.alternate&&p.delete(null===y.key?d:y.key),a=s(y,a,d),null===h?l=y:h.sibling=y,h=y);return e&&p.forEach(function(e){return n(t,e)}),l}return function(t,e,o,s){var c="object"==typeof o&&null!==o;if(c)switch(o.$$typeof){case Ai:t:{var l=o.key;for(c=e;null!==c;){if(c.key===l){if(c.type===o.type){i(t,c.sibling),(e=a(c,s)).ref=Q(c,o),e.pendingProps=o.props,e.return=t,t=e;break t}i(t,c);break}n(t,c),c=c.sibling}(s=li(o,t.internalContextTag,s)).ref=Q(e,o),s.return=t,t=s}return u(t);case ai:t:{for(c=o.key;null!==e;){if(e.key===c){if(e.tag===xi){i(t,e.sibling),(e=a(e,s)).pendingProps=o,e.return=t,t=e;break t}i(t,e);break}n(t,e),e=e.sibling}(o=di(o,t.internalContextTag,s)).return=t,t=o}return u(t);case si:t:{if(null!==e){if(e.tag===wi){i(t,e.sibling),(e=a(e,s)).type=o.value,e.return=t,t=e;break t}i(t,e)}(e=fi(o,t.internalContextTag,s)).type=o.value,e.return=t,t=e}return u(t);case ui:t:{for(c=o.key;null!==e;){if(e.key===c){if(e.tag===bi&&e.stateNode.containerInfo===o.containerInfo&&e.stateNode.implementation===o.implementation){i(t,e.sibling),(e=a(e,s)).pendingProps=o.children||[],e.return=t,t=e;break t}i(t,e);break}n(t,e),e=e.sibling}(o=mi(o,t.internalContextTag,s)).return=t,t=o}return u(t)}if("string"==typeof o||"number"==typeof o)return o=""+o,null!==e&&e.tag===_i?(i(t,e.sibling),e=a(e,s),e.pendingProps=o,e.return=t,t=e):(i(t,e),o=pi(o,t.internalContextTag,s),o.return=t,t=o),u(t);if(vi(o))return y(t,e,o,s);if(J(o))return _(t,e,o,s);if(c&&$(t,o),void 0===o)switch(t.tag){case yi:case gi:r("152",(o=t.type).displayName||o.name||"Component")}return i(t,e)}}function et(t,e,n,i,o){function a(t,e,n){s(t,e,n,e.pendingWorkPriority)}function s(t,e,n,r){e.child=null===t?Gi(e,e.child,n,r):t.child===e.child?ji(e,e.child,n,r):Vi(e,e.child,n,r)}function u(t,e){var n=e.ref;null===n||t&&t.ref===n||(e.effectTag|=go)}function c(t,e,n,r){if(u(t,e),!n)return r&&Qi(e,!1),h(t,e);n=e.stateNode,yo.current=e;var i=n.render();return e.effectTag|=po,a(t,e,i),e.memoizedState=n.state,e.memoizedProps=n.props,r&&Qi(e,!0),e.child}function l(t){var e=t.stateNode;e.pendingContext?Ji(t,e.pendingContext,e.pendingContext!==e.context):e.context&&Ji(t,e.context,!1),g(t,e.containerInfo)}function h(t,e){return Wi(t,e),e.child}function p(t,e){switch(e.tag){case no:l(e);break;case eo:Zi(e);break;case oo:g(e,e.stateNode.containerInfo)}return null}var d=t.shouldSetTextContent,f=t.useSyncScheduling,m=t.shouldDeprioritizeSubtree,v=e.pushHostContext,g=e.pushHostContainer,y=n.enterHydrationState,_=n.resetHydrationState,b=n.tryToClaimNextHydratableInstance,x=(t=function(t,e,n,i){function o(t,e){e.updater=a,t.stateNode=e,De.set(e,t)}var a={isMounted:Hi,enqueueSetState:function(n,r,i){n=De.get(n);var o=e(n,!1);Ui(n,r,void 0===i?null:i,o),t(n,o)},enqueueReplaceState:function(n,r,i){n=De.get(n);var o=e(n,!1);Fi(n,r,void 0===i?null:i,o),t(n,o)},enqueueForceUpdate:function(n,r){n=De.get(n);var i=e(n,!1);ki(n,void 0===r?null:r,i),t(n,i)}};return{adoptClassInstance:o,constructClassInstance:function(t,e){var n=t.type,r=Ni(t),i=Di(t),a=i?Oi(t,r):se;return e=new n(e,a),o(t,e),i&&Ii(t,r,a),e},mountClassInstance:function(t,e){var n=t.alternate,i=t.stateNode,o=i.state||null,s=t.pendingProps;s||r("158");var u=Ni(t);i.props=s,i.state=o,i.refs=se,i.context=Oi(t,u),fr.enableAsyncSubtreeAPI&&null!=t.type&&null!=t.type.prototype&&!0===t.type.prototype.unstable_isAsyncReactComponent&&(t.internalContextTag|=Li),"function"==typeof i.componentWillMount&&(u=i.state,i.componentWillMount(),u!==i.state&&a.enqueueReplaceState(i,i.state,null),null!==(u=t.updateQueue)&&(i.state=zi(n,t,u,i,o,s,e))),"function"==typeof i.componentDidMount&&(t.effectTag|=Ri)},updateClassInstance:function(t,e,o){var s=e.stateNode;s.props=e.memoizedProps,s.state=e.memoizedState;var u=e.memoizedProps,c=e.pendingProps;c||null==(c=u)&&r("159");var l=s.context,h=Ni(e);if(h=Oi(e,h),"function"!=typeof s.componentWillReceiveProps||u===c&&l===h||(l=s.state,s.componentWillReceiveProps(c,h),s.state!==l&&a.enqueueReplaceState(s,s.state,null)),l=e.memoizedState,o=null!==e.updateQueue?zi(t,e,e.updateQueue,s,l,c,o):l,!(u!==c||l!==o||Bi()||null!==e.updateQueue&&e.updateQueue.hasForceUpdate))return"function"!=typeof s.componentDidUpdate||u===t.memoizedProps&&l===t.memoizedState||(e.effectTag|=Ri),!1;var p=c;if(null===u||null!==e.updateQueue&&e.updateQueue.hasForceUpdate)p=!0;else{var d=e.stateNode,f=e.type;p="function"==typeof d.shouldComponentUpdate?d.shouldComponentUpdate(p,o,h):!(f.prototype&&f.prototype.isPureReactComponent&&ue(u,p)&&ue(l,o))}return p?("function"==typeof s.componentWillUpdate&&s.componentWillUpdate(c,o,h),"function"==typeof s.componentDidUpdate&&(e.effectTag|=Ri)):("function"!=typeof s.componentDidUpdate||u===t.memoizedProps&&l===t.memoizedState||(e.effectTag|=Ri),n(e,c),i(e,o)),s.props=c,s.state=o,s.context=h,p}}}(i,o,function(t,e){t.memoizedProps=e},function(t,e){t.memoizedState=e})).adoptClassInstance,w=t.constructClassInstance,E=t.mountClassInstance,M=t.updateClassInstance;return{beginWork:function(t,e,n){if(e.pendingWorkPriority===lo||e.pendingWorkPriority>n)return p(0,e);switch(e.tag){case $i:null!==t&&r("155");var i=e.type,o=e.pendingProps,s=Yi(e);return s=Xi(e,s),i=i(o,s),e.effectTag|=po,"object"==typeof i&&null!==i&&"function"==typeof i.render?(e.tag=eo,o=Zi(e),x(e,i),E(e,n),e=c(t,e,!0,o)):(e.tag=to,a(t,e,i),e.memoizedProps=o,e=e.child),e;case to:t:{if(o=e.type,n=e.pendingProps,i=e.memoizedProps,Ki())null===n&&(n=i);else if(null===n||i===n){e=h(t,e);break t}i=Yi(e),o=o(n,i=Xi(e,i)),e.effectTag|=po,a(t,e,o),e.memoizedProps=n,e=e.child}return e;case eo:return o=Zi(e),i=void 0,null===t?e.stateNode?r("153"):(w(e,e.pendingProps),E(e,n),i=!0):i=M(t,e,n),c(t,e,i,o);case no:return l(e),null!==(i=e.updateQueue)?(o=e.memoizedState,i=qi(t,e,i,null,o,null,n),o===i?(_(),e=h(t,e)):(o=i.element,null!==t&&null!==t.child||!y(e)?(_(),a(t,e,o)):(e.effectTag|=fo,e.child=Gi(e,e.child,o,n)),e.memoizedState=i,e=e.child)):(_(),e=h(t,e)),e;case ro:v(e),null===t&&b(e),o=e.type;var T=e.memoizedProps;return null===(i=e.pendingProps)&&null===(i=T)&&r("154"),s=null!==t?t.memoizedProps:null,Ki()||null!==i&&T!==i?(T=i.children,d(o,i)?T=null:s&&d(o,s)&&(e.effectTag|=mo),u(t,e),n!==ho&&!f&&m(o,i)?(e.pendingWorkPriority=ho,e=null):(a(t,e,T),e.memoizedProps=i,e=e.child)):e=h(t,e),e;case io:return null===t&&b(e),null===(t=e.pendingProps)&&(t=e.memoizedProps),e.memoizedProps=t,null;case so:e.tag=ao;case ao:return n=e.pendingProps,Ki()?null===n&&null===(n=t&&t.memoizedProps)&&r("154"):null!==n&&e.memoizedProps!==n||(n=e.memoizedProps),o=n.children,i=e.pendingWorkPriority,e.stateNode=null===t?Gi(e,e.stateNode,o,i):t.child===e.child?ji(e,e.stateNode,o,i):Vi(e,e.stateNode,o,i),e.memoizedProps=n,e.stateNode;case uo:return null;case oo:t:{if(g(e,e.stateNode.containerInfo),n=e.pendingWorkPriority,o=e.pendingProps,Ki())null===o&&null==(o=t&&t.memoizedProps)&&r("154");else if(null===o||e.memoizedProps===o){e=h(t,e);break t}null===t?e.child=Vi(e,e.child,o,n):a(t,e,o),e.memoizedProps=o,e=e.child}return e;case co:t:{if(n=e.pendingProps,Ki())null===n&&(n=e.memoizedProps);else if(null===n||e.memoizedProps===n){e=h(t,e);break t}a(t,e,n),e.memoizedProps=n,e=e.child}return e;default:r("156")}},beginFailedWork:function(t,e,n){switch(e.tag){case eo:Zi(e);break;case no:l(e);break;default:r("157")}return e.effectTag|=vo,null===t?e.child=null:e.child!==t.child&&(e.child=t.child),e.pendingWorkPriority===lo||e.pendingWorkPriority>n?p(0,e):(e.firstEffect=null,e.lastEffect=null,s(t,e,null,n),e.tag===eo&&(t=e.stateNode,e.memoizedProps=t.props,e.memoizedState=t.state),e.child)}}}function nt(t){return function(e){try{return t(e)}catch(t){}}}function rt(t){function e(){for(;null!==q&&q.current.pendingWorkPriority===fa;){q.isScheduled=!1;var t=q.nextScheduledRoot;if(q.nextScheduledRoot=null,q===X)return X=q=null,j=fa,null;q=t}t=q;for(var e=null,n=fa;null!==t;)t.current.pendingWorkPriority!==fa&&(n===fa||n>t.current.pendingWorkPriority)&&(n=t.current.pendingWorkPriority,e=t),t=t.nextScheduledRoot;null!==e?(j=n,ca(),Da(),w(),G=ha(e.current,n),e!==ot&&(it=0,ot=e)):(j=fa,ot=G=null)}function n(n){tt=!0,W=null;var i=n.stateNode;if(i.current===n&&r("177"),j!==ma&&j!==va||it++,la.current=null,n.effectTag>xa)if(null!==n.lastEffect){n.lastEffect.nextEffect=n;var o=n.firstEffect}else o=n;else o=n.firstEffect;for(D(),V=o;null!==V;){var a=!1,s=void 0;try{for(;null!==V;){var u=V.effectTag;if(u&Sa&&t.resetTextContent(V.stateNode),u&Pa){var c=V.alternate;null!==c&&I(c)}switch(u&~(Ca|Aa|Sa|Pa|xa)){case wa:C(V),V.effectTag&=~wa;break;case Ma:C(V),V.effectTag&=~wa,P(V.alternate,V);break;case Ea:P(V.alternate,V);break;case Ta:nt=!0,A(V),nt=!1}V=V.nextEffect}}catch(t){a=!0,s=t}a&&(null===V&&r("178"),h(V,s),null!==V&&(V=V.nextEffect))}for(U(),i.current=n,V=o;null!==V;){i=!1,o=void 0;try{for(;null!==V;){var l=V.effectTag;if(l&(Ea|Ca)&&R(V.alternate,V),l&Pa&&L(V),l&Aa)switch(a=V,s=void 0,null!==K&&(s=K.get(a),K.delete(a),null==s&&null!==a.alternate&&(a=a.alternate,s=K.get(a),K.delete(a))),null==s&&r("184"),a.tag){case Oa:a.stateNode.componentDidCatch(s.error,{componentStack:s.componentStack});break;case Ra:null===Q&&(Q=s.error);break;default:r("157")}var p=V.nextEffect;V.nextEffect=null,V=p}}catch(t){i=!0,o=t}i&&(null===V&&r("178"),h(V,o),null!==V&&(V=V.nextEffect))}tt=!1,"function"==typeof da&&da(n.stateNode),J&&(J.forEach(g),J=null),e()}function i(t){for(;;){var e=S(t.alternate,t,j),n=t.return,r=t.sibling,i=t;if(!(i.pendingWorkPriority!==fa&&i.pendingWorkPriority>j)){for(var o=Na(i),a=i.child;null!==a;)o=pa(o,a.pendingWorkPriority),a=a.sibling;i.pendingWorkPriority=o}if(null!==e)return e;if(null!==n&&(null===n.firstEffect&&(n.firstEffect=t.firstEffect),null!==t.lastEffect&&(null!==n.lastEffect&&(n.lastEffect.nextEffect=t.firstEffect),n.lastEffect=t.lastEffect),t.effectTag>xa&&(null!==n.lastEffect?n.lastEffect.nextEffect=t:n.firstEffect=t,n.lastEffect=t)),null!==r)return r;if(null===n){W=t;break}t=n}return null}function o(t){var e=M(t.alternate,t,j);return null===e&&(e=i(t)),la.current=null,e}function a(t){var e=T(t.alternate,t,j);return null===e&&(e=i(t)),la.current=null,e}function s(t){l(_a,t)}function u(){if(null!==K&&0<K.size&&j===va)for(;null!==G;){var t=G;if(null===(G=null!==K&&(K.has(t)||null!==t.alternate&&K.has(t.alternate))?a(G):o(G))&&(null===W&&r("179"),F=va,n(W),F=j,null===K||0===K.size||j!==va))break}}function c(t,i){if(null!==W?(F=va,n(W),u()):null===G&&e(),!(j===fa||j>t)){F=j;t:for(;;){if(j<=va)for(;null!==G&&!(null===(G=o(G))&&(null===W&&r("179"),F=va,n(W),F=j,u(),j===fa||j>t||j>va)););else if(null!==i)for(;null!==G&&!z;)if(1<i.timeRemaining()){if(null===(G=o(G)))if(null===W&&r("179"),1<i.timeRemaining()){if(F=va,n(W),F=j,u(),j===fa||j>t||j<ga)break}else z=!0}else z=!0;switch(j){case ma:case va:if(j<=t)continue t;break t;case ga:case ya:case _a:if(null===i)break t;if(!z&&j<=t)continue t;break t;case fa:break t;default:r("181")}}}}function l(t,e){k&&r("182"),k=!0;var n=F,i=!1,o=null;try{c(t,e)}catch(t){i=!0,o=t}for(;i;){if($){Q=o;break}var u=G;if(null===u)$=!0;else{var l=h(u,o);if(null===l&&r("183"),!$){try{i=l,o=t,l=e;for(var p=i;null!==u;){switch(u.tag){case Oa:ua(u);break;case La:x(u);break;case Ra:b(u);break;case Ia:b(u)}if(u===p||u.alternate===p)break;u=u.return}G=a(i),c(o,l)}catch(t){i=!0,o=t;continue}break}}}if(F=n,null!==e&&(Y=!1),j>va&&!Y&&(O(s),Y=!0),t=Q,$=z=k=!1,ot=Z=K=Q=null,it=0,null!==t)throw t}function h(t,e){var n=la.current=null,r=!1,i=!1,o=null;if(t.tag===Ra)n=t,d(t)&&($=!0);else for(var a=t.return;null!==a&&null===n;){if(a.tag===Oa?"function"==typeof a.stateNode.componentDidCatch&&(r=!0,o=p(a),n=a,i=!0):a.tag===Ra&&(n=a),d(a)){if(nt||null!==J&&(J.has(a)||null!==a.alternate&&J.has(a.alternate)))return null;n=null,i=!1}a=a.return}if(null!==n){null===Z&&(Z=new Set),Z.add(n);var s="";a=t;do{t:switch(a.tag){case $r:case ti:case ei:case ni:var u=a._debugOwner,c=a._debugSource,l=p(a),h=null;u&&(h=p(u)),u=c,l="\n in "+(l||"Unknown")+(u?" (at "+u.fileName.replace(/^.*[\\\/]/,"")+":"+u.lineNumber+")":h?" (created by "+h+")":"");break t;default:l=""}s+=l,a=a.return}while(a);a=s,t=p(t),null===K&&(K=new Map),e={componentName:t,componentStack:a,error:e,errorBoundary:r?n.stateNode:null,errorBoundaryFound:r,errorBoundaryName:o,willRetry:i},K.set(n,e);try{console.error(e.error)}catch(t){console.error(t)}return tt?(null===J&&(J=new Set),J.add(n)):g(n),n}return null===Q&&(Q=e),null}function d(t){return null!==Z&&(Z.has(t)||null!==t.alternate&&Z.has(t.alternate))}function f(t,e){return m(t,e)}function m(t,e){it>rt&&($=!0,r("185")),!k&&e<=j&&(G=null);for(var n=!0;null!==t&&n;){if(n=!1,(t.pendingWorkPriority===fa||t.pendingWorkPriority>e)&&(n=!0,t.pendingWorkPriority=e),null!==t.alternate&&(t.alternate.pendingWorkPriority===fa||t.alternate.pendingWorkPriority>e)&&(n=!0,t.alternate.pendingWorkPriority=e),null===t.return){if(t.tag!==Ra)break;var i=t.stateNode;if(e===fa||i.isScheduled||(i.isScheduled=!0,X?X.nextScheduledRoot=i:q=i,X=i),!k)switch(e){case ma:H?l(ma,null):l(va,null);break;case va:B||r("186");break;default:Y||(O(s),Y=!0)}}t=t.return}}function v(t,e){var n=F;return n===fa&&(n=!N||t.internalContextTag&ba||e?ya:ma),n===ma&&(k||B)?va:n}function g(t){m(t,va)}var y=function(t){function e(t){return t===ea&&r("174"),t}var n=t.getChildHostContext,i=t.getRootHostContext,o=Qo(ea),a=Qo(ea),s=Qo(ea);return{getHostContext:function(){return e(o.current)},getRootHostContainer:function(){return e(s.current)},popHostContainer:function(t){$o(o,t),$o(a,t),$o(s,t)},popHostContext:function(t){a.current===t&&($o(o,t),$o(a,t))},pushHostContainer:function(t,e){ta(s,e,t),e=i(e),ta(a,t,t),ta(o,e,t)},pushHostContext:function(t){var r=e(s.current),i=e(o.current);i!==(r=n(i,t.type,r))&&(ta(a,t,t),ta(o,r,t))},resetHostContainer:function(){o.current=ea,s.current=ea}}}(t),_=function(t){function e(t,e){var n=sa();n.stateNode=e,n.return=t,n.effectTag=oa,null!==t.lastEffect?(t.lastEffect.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n}function n(t,e){switch(t.tag){case na:return a(e,t.type,t.pendingProps);case ra:return s(e,t.pendingProps);default:return!1}}function i(t){for(t=t.return;null!==t&&t.tag!==na&&t.tag!==ia;)t=t.return;f=t}var o=t.shouldSetTextContent,a=t.canHydrateInstance,s=t.canHydrateTextInstance,u=t.getNextHydratableSibling,c=t.getFirstHydratableChild,l=t.hydrateInstance,h=t.hydrateTextInstance,p=t.didNotHydrateInstance,d=t.didNotFindHydratableInstance;if(t=t.didNotFindHydratableTextInstance,!(a&&s&&u&&c&&l&&h&&p&&d&&t))return{enterHydrationState:function(){return!1},resetHydrationState:function(){},tryToClaimNextHydratableInstance:function(){},prepareToHydrateHostInstance:function(){r("175")},prepareToHydrateHostTextInstance:function(){r("176")},popHydrationState:function(){return!1}};var f=null,m=null,v=!1;return{enterHydrationState:function(t){return m=c(t.stateNode.containerInfo),f=t,v=!0},resetHydrationState:function(){m=f=null,v=!1},tryToClaimNextHydratableInstance:function(t){if(v){var r=m;if(r){if(!n(t,r)){if(!(r=u(r))||!n(t,r))return t.effectTag|=aa,v=!1,void(f=t);e(f,m)}t.stateNode=r,f=t,m=c(r)}else t.effectTag|=aa,v=!1,f=t}},prepareToHydrateHostInstance:function(t,e,n){return e=l(t.stateNode,t.type,t.memoizedProps,e,n,t),t.updateQueue=e,null!==e},prepareToHydrateHostTextInstance:function(t){return h(t.stateNode,t.memoizedProps,t)},popHydrationState:function(t){if(t!==f)return!1;if(!v)return i(t),v=!0,!1;var n=t.type;if(t.tag!==na||"head"!==n&&"body"!==n&&!o(n,t.memoizedProps))for(n=m;n;)e(t,n),n=u(n);return i(t),m=f?u(t.stateNode):null,!0}}}(t),b=y.popHostContainer,x=y.popHostContext,w=y.resetHostContainer,E=et(t,y,_,f,v),M=E.beginWork,T=E.beginFailedWork,S=function(t,e,n){var i=t.createInstance,o=t.createTextInstance,a=t.appendInitialChild,s=t.finalizeInitialChildren,u=t.prepareUpdate,c=e.getRootHostContainer,l=e.popHostContext,h=e.getHostContext,p=e.popHostContainer,d=n.prepareToHydrateHostInstance,f=n.prepareToHydrateHostTextInstance,m=n.popHydrationState;return{completeWork:function(t,e,n){var v=e.pendingProps;switch(null===v?v=e.memoizedProps:e.pendingWorkPriority===Uo&&n!==Uo||(e.pendingProps=null),e.tag){case Eo:return null;case Mo:return bo(e),null;case To:return p(e),xo(e),(v=e.stateNode).pendingContext&&(v.context=v.pendingContext,v.pendingContext=null),null!==t&&null!==t.child||(m(e),e.effectTag&=~Oo),null;case So:l(e),n=c();var g=e.type;if(null!==t&&null!=e.stateNode){var y=t.memoizedProps,_=e.stateNode,b=h();v=u(_,g,y,v,n,b),(e.updateQueue=v)&&(e.effectTag|=Do),t.ref!==e.ref&&(e.effectTag|=No)}else{if(!v)return null===e.stateNode&&r("166"),null;if(t=h(),m(e))d(e,n,t)&&(e.effectTag|=Do);else{t=i(g,v,n,t,e);t:for(y=e.child;null!==y;){if(y.tag===So||y.tag===Co)a(t,y.stateNode);else if(y.tag!==Ao&&null!==y.child){y=y.child;continue}if(y===e)break t;for(;null===y.sibling;){if(null===y.return||y.return===e)break t;y=y.return}y=y.sibling}s(t,g,v,n)&&(e.effectTag|=Do),e.stateNode=t}null!==e.ref&&(e.effectTag|=No)}return null;case Co:if(t&&null!=e.stateNode)t.memoizedProps!==v&&(e.effectTag|=Do);else{if("string"!=typeof v)return null===e.stateNode&&r("166"),null;t=c(),n=h(),m(e)?f(e)&&(e.effectTag|=Do):e.stateNode=o(v,t,n,e)}return null;case Po:(v=e.memoizedProps)||r("165"),e.tag=Ro,n=[];t:for((g=e.stateNode)&&(g.return=e);null!==g;){if(g.tag===So||g.tag===Co||g.tag===Ao)r("164");else if(g.tag===Lo)n.push(g.type);else if(null!==g.child){g.child.return=g,g=g.child;continue}for(;null===g.sibling;){if(null===g.return||g.return===e)break t;g=g.return}g.sibling.return=g.return,g=g.sibling}return g=v.handler,v=g(v.props,n),e.child=_o(e,null!==t?t.child:null,v,e.pendingWorkPriority),e.child;case Ro:return e.tag=Po,null;case Lo:case Io:return null;case Ao:return e.effectTag|=Do,p(e),null;case wo:r("167");default:r("156")}}}}(t,y,_).completeWork,C=(y=function(t,e){function n(t){var n=t.ref;if(null!==n)try{n(null)}catch(n){e(t,n)}}function i(t){return t.tag===Go||t.tag===Ho||t.tag===Vo}function o(t){for(var e=t;;)if(s(e),null!==e.child&&e.tag!==Vo)e.child.return=e,e=e.child;else{if(e===t)break;for(;null===e.sibling;){if(null===e.return||e.return===t)return;e=e.return}e.sibling.return=e.return,e=e.sibling}}function a(t){for(var e=t,n=!1,i=void 0,a=void 0;;){if(!n){n=e.return;t:for(;;){switch(null===n&&r("160"),n.tag){case Go:i=n.stateNode,a=!1;break t;case Ho:case Vo:i=n.stateNode.containerInfo,a=!0;break t}n=n.return}n=!0}if(e.tag===Go||e.tag===jo)o(e),a?g(i,e.stateNode):v(i,e.stateNode);else if(e.tag===Vo?i=e.stateNode.containerInfo:s(e),null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break;for(;null===e.sibling;){if(null===e.return||e.return===t)return;(e=e.return).tag===Vo&&(n=!1)}e.sibling.return=e.return,e=e.sibling}}function s(t){switch("function"==typeof Xo&&Xo(t),t.tag){case Bo:n(t);var r=t.stateNode;if("function"==typeof r.componentWillUnmount)try{r.props=t.memoizedProps,r.state=t.memoizedState,r.componentWillUnmount()}catch(n){e(t,n)}break;case Go:n(t);break;case Wo:o(t.stateNode);break;case Vo:a(t)}}var u=t.commitMount,c=t.commitUpdate,l=t.resetTextContent,h=t.commitTextUpdate,p=t.appendChild,d=t.appendChildToContainer,f=t.insertBefore,m=t.insertInContainerBefore,v=t.removeChild,g=t.removeChildFromContainer,y=t.getPublicInstance;return{commitPlacement:function(t){t:{for(var e=t.return;null!==e;){if(i(e)){var n=e;break t}e=e.return}r("160"),n=void 0}var o=e=void 0;switch(n.tag){case Go:e=n.stateNode,o=!1;break;case Ho:case Vo:e=n.stateNode.containerInfo,o=!0;break;default:r("161")}n.effectTag&Jo&&(l(e),n.effectTag&=~Jo);t:e:for(n=t;;){for(;null===n.sibling;){if(null===n.return||i(n.return)){n=null;break t}n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==Go&&n.tag!==jo;){if(n.effectTag&Yo)continue e;if(null===n.child||n.tag===Vo)continue e;n.child.return=n,n=n.child}if(!(n.effectTag&Yo)){n=n.stateNode;break t}}for(var a=t;;){if(a.tag===Go||a.tag===jo)n?o?m(e,a.stateNode,n):f(e,a.stateNode,n):o?d(e,a.stateNode):p(e,a.stateNode);else if(a.tag!==Vo&&null!==a.child){a.child.return=a,a=a.child;continue}if(a===t)break;for(;null===a.sibling;){if(null===a.return||a.return===t)return;a=a.return}a.sibling.return=a.return,a=a.sibling}},commitDeletion:function(t){a(t),t.return=null,t.child=null,t.alternate&&(t.alternate.child=null,t.alternate.return=null)},commitWork:function(t,e){switch(e.tag){case Bo:break;case Go:var n=e.stateNode;if(null!=n){var i=e.memoizedProps;t=null!==t?t.memoizedProps:i;var o=e.type,a=e.updateQueue;e.updateQueue=null,null!==a&&c(n,a,o,t,i,e)}break;case jo:null===e.stateNode&&r("162"),n=e.memoizedProps,h(e.stateNode,null!==t?t.memoizedProps:n,n);break;case Ho:case Vo:break;default:r("163")}},commitLifeCycles:function(t,e){switch(e.tag){case Bo:var n=e.stateNode;if(e.effectTag&Ko)if(null===t)n.props=e.memoizedProps,n.state=e.memoizedState,n.componentDidMount();else{var i=t.memoizedProps;t=t.memoizedState,n.props=e.memoizedProps,n.state=e.memoizedState,n.componentDidUpdate(i,t)}e.effectTag&Zo&&null!==e.updateQueue&&qo(e,e.updateQueue,n);break;case Ho:null!==(t=e.updateQueue)&&qo(e,t,e.child&&e.child.stateNode);break;case Go:n=e.stateNode,null===t&&e.effectTag&Ko&&u(n,e.type,e.memoizedProps,e);break;case jo:case Vo:break;default:r("163")}},commitAttachRef:function(t){var e=t.ref;if(null!==e){var n=t.stateNode;switch(t.tag){case Go:e(y(n));break;default:e(n)}}},commitDetachRef:function(t){null!==(t=t.ref)&&t(null)}}}(t,h)).commitPlacement,A=y.commitDeletion,P=y.commitWork,R=y.commitLifeCycles,L=y.commitAttachRef,I=y.commitDetachRef,O=t.scheduleDeferredCallback,N=t.useSyncScheduling,D=t.prepareForCommit,U=t.resetAfterCommit,F=fa,k=!1,z=!1,B=!1,H=!1,G=null,j=fa,V=null,W=null,q=null,X=null,Y=!1,K=null,Z=null,J=null,Q=null,$=!1,tt=!1,nt=!1,rt=1e3,it=0,ot=null;return{scheduleUpdate:f,getPriorityContext:v,batchedUpdates:function(t,e){var n=B;B=!0;try{return t(e)}finally{B=n,k||B||l(va,null)}},unbatchedUpdates:function(t){var e=H,n=B;H=B,B=!1;try{return t()}finally{B=n,H=e}},flushSync:function(t){var e=B,n=F;B=!0,F=ma;try{return t()}finally{B=e,F=n,k&&r("187"),l(va,null)}},deferredUpdates:function(t){var e=F;F=ya;try{return t()}finally{F=e}}}}function it(){r("196")}function ot(t){return t?"number"==typeof(t=De.get(t)).tag?it(t):t._processChildContext(t._context):se}function at(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function st(t,e){var n=at(t);t=0;for(var r;n;){if(n.nodeType===ja){if(r=t+n.textContent.length,t<=e&&r>=e)return{node:n,offset:e-t};t=r}t:{for(;n;){if(n.nextSibling){n=n.nextSibling;break t}n=n.parentNode}n=void 0}n=at(n)}}function ut(){return!Va&&re.canUseDOM&&(Va="textContent"in document.documentElement?"textContent":"innerText"),Va}function ct(){r("211")}function lt(){r("212")}function ht(t){if(null==t)return null;if(t.nodeType===Ka)return t;var e=De.get(t);if(e)return"number"==typeof e.tag?ct(e):lt(e);"function"==typeof t.render?r("188"):r("213",Object.keys(t))}function pt(t){if(void 0!==t._hostParent)return t._hostParent;if("number"==typeof t.tag){do{t=t.return}while(t&&t.tag!==Za);if(t)return t}return null}function dt(t,e){for(var n=0,r=t;r;r=pt(r))n++;r=0;for(var i=e;i;i=pt(i))r++;for(;0<n-r;)t=pt(t),n--;for(;0<r-n;)e=pt(e),r--;for(;n--;){if(t===e||t===e.alternate)return t;t=pt(t),e=pt(e)}return null}function ft(t,e,n){(e=Qa(t,n.dispatchConfig.phasedRegistrationNames[e]))&&(n._dispatchListeners=M(n._dispatchListeners,e),n._dispatchInstances=M(n._dispatchInstances,t))}function mt(t){t&&t.dispatchConfig.phasedRegistrationNames&&Ja.traverseTwoPhase(t._targetInst,ft,t)}function vt(t){if(t&&t.dispatchConfig.phasedRegistrationNames){var e=t._targetInst;e=e?Ja.getParentInstance(e):null,Ja.traverseTwoPhase(e,ft,t)}}function gt(t,e,n){t&&n&&n.dispatchConfig.registrationName&&(e=Qa(t,n.dispatchConfig.registrationName))&&(n._dispatchListeners=M(n._dispatchListeners,e),n._dispatchInstances=M(n._dispatchInstances,t))}function yt(t){t&&t.dispatchConfig.registrationName&>(t._targetInst,null,t)}function _t(t,e,n,r){this.dispatchConfig=t,this._targetInst=e,this.nativeEvent=n,t=this.constructor.Interface;for(var i in t)t.hasOwnProperty(i)&&((e=t[i])?this[i]=e(n):"target"===i?this.target=r:this[i]=n[i]);return this.isDefaultPrevented=(null!=n.defaultPrevented?n.defaultPrevented:!1===n.returnValue)?ae.thatReturnsTrue:ae.thatReturnsFalse,this.isPropagationStopped=ae.thatReturnsFalse,this}function bt(t,e,n,r){if(this.eventPool.length){var i=this.eventPool.pop();return this.call(i,t,e,n,r),i}return new this(t,e,n,r)}function xt(t){t instanceof this||r("223"),t.destructor(),10>this.eventPool.length&&this.eventPool.push(t)}function wt(t){t.eventPool=[],t.getPooled=bt,t.release=xt}function Et(t,e,n,r){return _t.call(this,t,e,n,r)}function Mt(t,e,n,r){return _t.call(this,t,e,n,r)}function Tt(t,e){switch(t){case"topKeyUp":return-1!==os.indexOf(e.keyCode);case"topKeyDown":return 229!==e.keyCode;case"topKeyPress":case"topMouseDown":case"topBlur":return!0;default:return!1}}function St(t){return"object"==typeof(t=t.detail)&&"data"in t?t.data:null}function Ct(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return"input"===e?!!gs[t.type]:"textarea"===e}function At(t,e,n){return t=_t.getPooled(ys.change,t,e,n),t.type="change",Qe.enqueueStateRestore(n),$a.accumulateTwoPhaseDispatches(t),t}function Pt(t){un.enqueueEvents(t),un.processEventQueue(!1)}function Rt(t){var e=Ne.getNodeFromInstance(t);if(Bn.updateValueIfChanged(e))return t}function Lt(t,e){if("topChange"===t)return e}function It(){_s&&(_s.detachEvent("onpropertychange",Ot),bs=_s=null)}function Ot(t){"value"===t.propertyName&&Rt(bs)&&(t=At(bs,t,w(t)),tn.batchedUpdates(Pt,t))}function Nt(t,e,n){"topFocus"===t?(It(),_s=e,bs=n,_s.attachEvent("onpropertychange",Ot)):"topBlur"===t&&It()}function Dt(t){if("topSelectionChange"===t||"topKeyUp"===t||"topKeyDown"===t)return Rt(bs)}function Ut(t,e){if("topClick"===t)return Rt(e)}function Ft(t,e){if("topInput"===t||"topChange"===t)return Rt(e)}function kt(t,e,n,r){return _t.call(this,t,e,n,r)}function zt(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):!!(t=Es[t])&&!!e[t]}function Bt(){return zt}function Ht(t,e,n,r){return _t.call(this,t,e,n,r)}function Gt(t,e){if(Is||null==Ps||Ps!==he())return null;var n=Ps;return"selectionStart"in n&&Ya.hasSelectionCapabilities(n)?n={start:n.selectionStart,end:n.selectionEnd}:window.getSelection?(n=window.getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}):n=void 0,Ls&&ue(Ls,n)?null:(Ls=n,t=_t.getPooled(As.select,Rs,t,e),t.type="select",t.target=Ps,$a.accumulateTwoPhaseDispatches(t),t)}function jt(t,e,n,r){return _t.call(this,t,e,n,r)}function Vt(t,e,n,r){return _t.call(this,t,e,n,r)}function Wt(t,e,n,r){return _t.call(this,t,e,n,r)}function qt(t){var e=t.keyCode;return"charCode"in t?0===(t=t.charCode)&&13===e&&(t=13):t=e,32<=t||13===t?t:0}function Xt(t,e,n,r){return _t.call(this,t,e,n,r)}function Yt(t,e,n,r){return _t.call(this,t,e,n,r)}function Kt(t,e,n,r){return _t.call(this,t,e,n,r)}function Zt(t,e,n,r){return _t.call(this,t,e,n,r)}function Jt(t,e,n,r){return _t.call(this,t,e,n,r)}function Qt(t){return t[1].toUpperCase()}function $t(t){return!(!t||t.nodeType!==Js&&t.nodeType!==tu&&t.nodeType!==eu&&(t.nodeType!==$s||" react-mount-point-unstable "!==t.nodeValue))}function te(t,e,n,i,o){$t(n)||r("200");var a=n._reactRootContainer;if(a)_u.updateContainer(e,a,t,o);else{if(!i&&!function(t){return!(!(t=t?t.nodeType===tu?t.documentElement:t.firstChild:null)||t.nodeType!==Js||!t.hasAttribute(nu))}(n))for(i=void 0;i=n.lastChild;)n.removeChild(i);var s=_u.createContainer(n);a=n._reactRootContainer=s,_u.unbatchedUpdates(function(){_u.updateContainer(e,s,t,o)})}return _u.getPublicRootInstance(a)}function ee(t,e){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;return $t(e)||r("200"),oi.createPortal(t,e,null,n)}var ne=n(0);n(191);var re=n(192),ie=n(193),oe=n(194),ae=n(93),se=n(195),ue=n(196),ce=n(197),le=n(200),he=n(201);ne||r("227");var pe,de,fe={Namespaces:{html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"},getIntrinsicNamespace:i,getChildNamespace:function(t,e){return null==t||"http://www.w3.org/1999/xhtml"===t?i(e):"http://www.w3.org/2000/svg"===t&&"foreignObject"===e?"http://www.w3.org/1999/xhtml":t}},me=null,ve={},ge={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},possibleRegistrationNames:null,injectEventPluginOrder:function(t){me&&r("101"),me=Array.prototype.slice.call(t),o()},injectEventPluginsByName:function(t){var e,n=!1;for(e in t)if(t.hasOwnProperty(e)){var i=t[e];ve.hasOwnProperty(e)&&ve[e]===i||(ve[e]&&r("102",e),ve[e]=i,n=!0)}n&&o()}},ye=ge,_e={children:!0,dangerouslySetInnerHTML:!0,autoFocus:!0,defaultValue:!0,defaultChecked:!0,innerHTML:!0,suppressContentEditableWarning:!0,style:!0},be={MUST_USE_PROPERTY:1,HAS_BOOLEAN_VALUE:4,HAS_NUMERIC_VALUE:8,HAS_POSITIVE_NUMERIC_VALUE:24,HAS_OVERLOADED_BOOLEAN_VALUE:32,HAS_STRING_BOOLEAN_VALUE:64,injectDOMPropertyConfig:function(t){var e=be,n=t.Properties||{},i=t.DOMAttributeNamespaces||{},o=t.DOMAttributeNames||{};t=t.DOMMutationMethods||{};for(var a in n){xe.properties.hasOwnProperty(a)&&r("48",a);var u=a.toLowerCase(),c=n[a];1>=(u={attributeName:u,attributeNamespace:null,propertyName:a,mutationMethod:null,mustUseProperty:s(c,e.MUST_USE_PROPERTY),hasBooleanValue:s(c,e.HAS_BOOLEAN_VALUE),hasNumericValue:s(c,e.HAS_NUMERIC_VALUE),hasPositiveNumericValue:s(c,e.HAS_POSITIVE_NUMERIC_VALUE),hasOverloadedBooleanValue:s(c,e.HAS_OVERLOADED_BOOLEAN_VALUE),hasStringBooleanValue:s(c,e.HAS_STRING_BOOLEAN_VALUE)}).hasBooleanValue+u.hasNumericValue+u.hasOverloadedBooleanValue||r("50",a),o.hasOwnProperty(a)&&(u.attributeName=o[a]),i.hasOwnProperty(a)&&(u.attributeNamespace=i[a]),t.hasOwnProperty(a)&&(u.mutationMethod=t[a]),xe.properties[a]=u}}},xe={ID_ATTRIBUTE_NAME:"data-reactid",ROOT_ATTRIBUTE_NAME:"data-reactroot",ATTRIBUTE_NAME_START_CHAR:":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",ATTRIBUTE_NAME_CHAR:":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",properties:{},shouldSetAttribute:function(t,e){if(xe.isReservedProp(t)||!("o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1]))return!1;if(null===e)return!0;switch(typeof e){case"boolean":return xe.shouldAttributeAcceptBooleanValue(t);case"undefined":case"number":case"string":case"object":return!0;default:return!1}},getPropertyInfo:function(t){return xe.properties.hasOwnProperty(t)?xe.properties[t]:null},shouldAttributeAcceptBooleanValue:function(t){if(xe.isReservedProp(t))return!0;var e=xe.getPropertyInfo(t);return e?e.hasBooleanValue||e.hasStringBooleanValue||e.hasOverloadedBooleanValue:"data-"===(t=t.toLowerCase().slice(0,5))||"aria-"===t},isReservedProp:function(t){return _e.hasOwnProperty(t)},injection:be},we=xe,Ee={IndeterminateComponent:0,FunctionalComponent:1,ClassComponent:2,HostRoot:3,HostPortal:4,HostComponent:5,HostText:6,CoroutineComponent:7,CoroutineHandlerPhase:8,YieldComponent:9,Fragment:10},Me={ELEMENT_NODE:1,TEXT_NODE:3,COMMENT_NODE:8,DOCUMENT_NODE:9,DOCUMENT_FRAGMENT_NODE:11},Te=Ee.HostComponent,Se=Ee.HostText,Ce=Me.ELEMENT_NODE,Ae=Me.COMMENT_NODE,Pe=we.ID_ATTRIBUTE_NAME,Re={hasCachedChildNodes:1},Le=Math.random().toString(36).slice(2),Ie="__reactInternalInstance$"+Le,Oe="__reactEventHandlers$"+Le,Ne={getClosestInstanceFromNode:h,getInstanceFromNode:function(t){var e=t[Ie];return e?e.tag===Te||e.tag===Se?e:e._hostNode===t?e:null:null!=(e=h(t))&&e._hostNode===t?e:null},getNodeFromInstance:function(t){if(t.tag===Te||t.tag===Se)return t.stateNode;if(void 0===t._hostNode&&r("33"),t._hostNode)return t._hostNode;for(var e=[];!t._hostNode;)e.push(t),t._hostParent||r("34"),t=t._hostParent;for(;e.length;t=e.pop())l(t,t._hostNode);return t._hostNode},precacheChildNodes:l,precacheNode:c,uncacheNode:function(t){var e=t._hostNode;e&&(delete e[Ie],t._hostNode=null)},precacheFiberNode:function(t,e){e[Ie]=t},getFiberCurrentPropsFromNode:function(t){return t[Oe]||null},updateFiberProps:function(t,e){t[Oe]=e}},De={remove:function(t){t._reactInternalFiber=void 0},get:function(t){return t._reactInternalFiber},has:function(t){return void 0!==t._reactInternalFiber},set:function(t,e){t._reactInternalFiber=e}},Ue={ReactCurrentOwner:ne.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner},Fe={NoEffect:0,PerformedWork:1,Placement:2,Update:4,PlacementAndUpdate:6,Deletion:8,ContentReset:16,Callback:32,Err:64,Ref:128},ke=Ee.HostComponent,ze=Ee.HostRoot,Be=Ee.HostPortal,He=Ee.HostText,Ge=Fe.NoEffect,je=Fe.Placement,Ve={isFiberMounted:function(t){return 2===d(t)},isMounted:function(t){return!!(t=De.get(t))&&2===d(t)},findCurrentFiberUsingSlowPath:m,findCurrentHostFiber:function(t){if(!(t=m(t)))return null;for(var e=t;;){if(e.tag===ke||e.tag===He)return e;if(e.child)e.child.return=e,e=e.child;else{if(e===t)break;for(;!e.sibling;){if(!e.return||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}}return null},findCurrentHostFiberWithNoPortals:function(t){if(!(t=m(t)))return null;for(var e=t;;){if(e.tag===ke||e.tag===He)return e;if(e.child&&e.tag!==Be)e.child.return=e,e=e.child;else{if(e===t)break;for(;!e.sibling;){if(!e.return||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}}return null}},We={_caughtError:null,_hasCaughtError:!1,_rethrowError:null,_hasRethrowError:!1,injection:{injectErrorUtils:function(t){"function"!=typeof t.invokeGuardedCallback&&r("197"),v=t.invokeGuardedCallback}},invokeGuardedCallback:function(t,e,n,r,i,o,a,s,u){v.apply(We,arguments)},invokeGuardedCallbackAndCatchFirstError:function(t,e,n,r,i,o,a,s,u){if(We.invokeGuardedCallback.apply(this,arguments),We.hasCaughtError()){var c=We.clearCaughtError();We._hasRethrowError||(We._hasRethrowError=!0,We._rethrowError=c)}},rethrowCaughtError:function(){return function(){if(We._hasRethrowError){var t=We._rethrowError;throw We._rethrowError=null,We._hasRethrowError=!1,t}}.apply(We,arguments)},hasCaughtError:function(){return We._hasCaughtError},clearCaughtError:function(){if(We._hasCaughtError){var t=We._caughtError;return We._caughtError=null,We._hasCaughtError=!1,t}r("198")}},qe=We,Xe={isEndish:function(t){return"topMouseUp"===t||"topTouchEnd"===t||"topTouchCancel"===t},isMoveish:function(t){return"topMouseMove"===t||"topTouchMove"===t},isStartish:function(t){return"topMouseDown"===t||"topTouchStart"===t},executeDirectDispatch:function(t){var e=t._dispatchListeners,n=t._dispatchInstances;return Array.isArray(e)&&r("103"),t.currentTarget=e?Xe.getNodeFromInstance(n):null,e=e?e(t):null,t.currentTarget=null,t._dispatchListeners=null,t._dispatchInstances=null,e},executeDispatchesInOrder:function(t,e){var n=t._dispatchListeners,r=t._dispatchInstances;if(Array.isArray(n))for(var i=0;i<n.length&&!t.isPropagationStopped();i++)g(t,e,n[i],r[i]);else n&&g(t,e,n,r);t._dispatchListeners=null,t._dispatchInstances=null},executeDispatchesInOrderStopAtTrue:function(t){t:{var e=t._dispatchListeners,n=t._dispatchInstances;if(Array.isArray(e)){for(var r=0;r<e.length&&!t.isPropagationStopped();r++)if(e[r](t,n[r])){e=n[r];break t}}else if(e&&e(t,n)){e=n;break t}e=null}return t._dispatchInstances=null,t._dispatchListeners=null,e},hasDispatches:function(t){return!!t._dispatchListeners},getFiberCurrentPropsFromNode:function(t){return pe.getFiberCurrentPropsFromNode(t)},getInstanceFromNode:function(t){return pe.getInstanceFromNode(t)},getNodeFromInstance:function(t){return pe.getNodeFromInstance(t)},injection:{injectComponentTree:function(t){pe=t}}},Ye=Xe,Ke=null,Ze=null,Je=null,Qe={injection:{injectFiberControlledHostComponent:function(t){Ke=t}},enqueueStateRestore:function(t){Ze?Je?Je.push(t):Je=[t]:Ze=t},restoreStateIfNeeded:function(){if(Ze){var t=Ze,e=Je;if(Je=Ze=null,y(t),e)for(t=0;t<e.length;t++)y(e[t])}}},$e=!1,tn={batchedUpdates:function(t,e){if($e)return _(x,t,e);$e=!0;try{return _(x,t,e)}finally{$e=!1,Qe.restoreStateIfNeeded()}},injection:{injectStackBatchedUpdates:function(t){_=t},injectFiberBatchedUpdates:function(t){b=t}}},en=Me.TEXT_NODE,nn=Ee.HostRoot,rn=[],on={_enabled:!0,_handleTopLevel:null,setHandleTopLevel:function(t){on._handleTopLevel=t},setEnabled:function(t){on._enabled=!!t},isEnabled:function(){return on._enabled},trapBubbledEvent:function(t,e,n){return n?oe.listen(n,e,on.dispatchEvent.bind(null,t)):null},trapCapturedEvent:function(t,e,n){return n?oe.capture(n,e,on.dispatchEvent.bind(null,t)):null},dispatchEvent:function(t,e){if(on._enabled){var n=w(e);if(null===(n=Ne.getClosestInstanceFromNode(n))||"number"!=typeof n.tag||Ve.isFiberMounted(n)||(n=null),rn.length){var r=rn.pop();r.topLevelType=t,r.nativeEvent=e,r.targetInst=n,t=r}else t={topLevelType:t,nativeEvent:e,targetInst:n,ancestors:[]};try{tn.batchedUpdates(E,t)}finally{t.topLevelType=null,t.nativeEvent=null,t.targetInst=null,t.ancestors.length=0,10>rn.length&&rn.push(t)}}}},an=on,sn=null,un={injection:{injectEventPluginOrder:ye.injectEventPluginOrder,injectEventPluginsByName:ye.injectEventPluginsByName},getListener:function(t,e){if("number"==typeof t.tag){var n=t.stateNode;if(!n)return null;var i=Ye.getFiberCurrentPropsFromNode(n);if(!i)return null;if(n=i[e],P(e,t.type,i))return null}else{if("string"==typeof(i=t._currentElement)||"number"==typeof i||!t._rootNodeID)return null;if(t=i.props,n=t[e],P(e,i.type,t))return null}return n&&"function"!=typeof n&&r("231",e,typeof n),n},extractEvents:function(t,e,n,r){for(var i,o=ye.plugins,a=0;a<o.length;a++){var s=o[a];s&&(s=s.extractEvents(t,e,n,r))&&(i=M(i,s))}return i},enqueueEvents:function(t){t&&(sn=M(sn,t))},processEventQueue:function(t){var e=sn;sn=null,t?T(e,C):T(e,A),sn&&r("95"),qe.rethrowCaughtError()}};re.canUseDOM&&(de=document.implementation&&document.implementation.hasFeature&&!0!==document.implementation.hasFeature("",""));var cn={animationend:L("Animation","AnimationEnd"),animationiteration:L("Animation","AnimationIteration"),animationstart:L("Animation","AnimationStart"),transitionend:L("Transition","TransitionEnd")},ln={},hn={};re.canUseDOM&&(hn=document.createElement("div").style,"AnimationEvent"in window||(delete cn.animationend.animation,delete cn.animationiteration.animation,delete cn.animationstart.animation),"TransitionEvent"in window||delete cn.transitionend.transition);var pn={topAbort:"abort",topAnimationEnd:I("animationend")||"animationend",topAnimationIteration:I("animationiteration")||"animationiteration",topAnimationStart:I("animationstart")||"animationstart",topBlur:"blur",topCancel:"cancel",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topChange:"change",topClick:"click",topClose:"close",topCompositionEnd:"compositionend",topCompositionStart:"compositionstart",topCompositionUpdate:"compositionupdate",topContextMenu:"contextmenu",topCopy:"copy",topCut:"cut",topDoubleClick:"dblclick",topDrag:"drag",topDragEnd:"dragend",topDragEnter:"dragenter",topDragExit:"dragexit",topDragLeave:"dragleave",topDragOver:"dragover",topDragStart:"dragstart",topDrop:"drop",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topFocus:"focus",topInput:"input",topKeyDown:"keydown",topKeyPress:"keypress",topKeyUp:"keyup",topLoadedData:"loadeddata",topLoad:"load",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topMouseDown:"mousedown",topMouseMove:"mousemove",topMouseOut:"mouseout",topMouseOver:"mouseover",topMouseUp:"mouseup",topPaste:"paste",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topScroll:"scroll",topSeeked:"seeked",topSeeking:"seeking",topSelectionChange:"selectionchange",topStalled:"stalled",topSuspend:"suspend",topTextInput:"textInput",topTimeUpdate:"timeupdate",topToggle:"toggle",topTouchCancel:"touchcancel",topTouchEnd:"touchend",topTouchMove:"touchmove",topTouchStart:"touchstart",topTransitionEnd:I("transitionend")||"transitionend",topVolumeChange:"volumechange",topWaiting:"waiting",topWheel:"wheel"},dn={},fn=0,mn="_reactListenersID"+(""+Math.random()).slice(2),vn=ie({},{handleTopLevel:function(t,e,n,r){t=un.extractEvents(t,e,n,r),un.enqueueEvents(t),un.processEventQueue(!1)}},{setEnabled:function(t){an&&an.setEnabled(t)},isEnabled:function(){return!(!an||!an.isEnabled())},listenTo:function(t,e){var n=O(e);t=ye.registrationNameDependencies[t];for(var r=0;r<t.length;r++){var i=t[r];n.hasOwnProperty(i)&&n[i]||("topWheel"===i?R("wheel")?an.trapBubbledEvent("topWheel","wheel",e):R("mousewheel")?an.trapBubbledEvent("topWheel","mousewheel",e):an.trapBubbledEvent("topWheel","DOMMouseScroll",e):"topScroll"===i?an.trapCapturedEvent("topScroll","scroll",e):"topFocus"===i||"topBlur"===i?(an.trapCapturedEvent("topFocus","focus",e),an.trapCapturedEvent("topBlur","blur",e),n.topBlur=!0,n.topFocus=!0):"topCancel"===i?(R("cancel",!0)&&an.trapCapturedEvent("topCancel","cancel",e),n.topCancel=!0):"topClose"===i?(R("close",!0)&&an.trapCapturedEvent("topClose","close",e),n.topClose=!0):pn.hasOwnProperty(i)&&an.trapBubbledEvent(i,pn[i],e),n[i]=!0)}},isListeningToAllDependencies:function(t,e){e=O(e),t=ye.registrationNameDependencies[t];for(var n=0;n<t.length;n++){var r=t[n];if(!e.hasOwnProperty(r)||!e[r])return!1}return!0},trapBubbledEvent:function(t,e,n){return an.trapBubbledEvent(t,e,n)},trapCapturedEvent:function(t,e,n){return an.trapCapturedEvent(t,e,n)}}),gn={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},yn=["Webkit","ms","Moz","O"];Object.keys(gn).forEach(function(t){yn.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),gn[e]=gn[t]})});var _n={isUnitlessNumber:gn,shorthandPropertyExpansions:{background:{backgroundAttachment:!0,backgroundColor:!0,backgroundImage:!0,backgroundPositionX:!0,backgroundPositionY:!0,backgroundRepeat:!0},backgroundPosition:{backgroundPositionX:!0,backgroundPositionY:!0},border:{borderWidth:!0,borderStyle:!0,borderColor:!0},borderBottom:{borderBottomWidth:!0,borderBottomStyle:!0,borderBottomColor:!0},borderLeft:{borderLeftWidth:!0,borderLeftStyle:!0,borderLeftColor:!0},borderRight:{borderRightWidth:!0,borderRightStyle:!0,borderRightColor:!0},borderTop:{borderTopWidth:!0,borderTopStyle:!0,borderTopColor:!0},font:{fontStyle:!0,fontVariant:!0,fontWeight:!0,fontSize:!0,lineHeight:!0,fontFamily:!0},outline:{outlineWidth:!0,outlineStyle:!0,outlineColor:!0}}},bn=_n.isUnitlessNumber,xn=!1;if(re.canUseDOM){var wn=document.createElement("div").style;try{wn.font=""}catch(t){xn=!0}}var En,Mn={createDangerousStringForStyles:function(){},setValueForStyles:function(t,e){t=t.style;for(var n in e)if(e.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=n,o=e[n];if(i=null==o||"boolean"==typeof o||""===o?"":r||"number"!=typeof o||0===o||bn.hasOwnProperty(i)&&bn[i]?(""+o).trim():o+"px","float"===n&&(n="cssFloat"),r)t.setProperty(n,i);else if(i)t[n]=i;else if(r=xn&&_n.shorthandPropertyExpansions[n])for(var a in r)t[a]="";else t[n]=""}}},Tn=new RegExp("^["+we.ATTRIBUTE_NAME_START_CHAR+"]["+we.ATTRIBUTE_NAME_CHAR+"]*$"),Sn={},Cn={},An={setAttributeForID:function(t,e){t.setAttribute(we.ID_ATTRIBUTE_NAME,e)},setAttributeForRoot:function(t){t.setAttribute(we.ROOT_ATTRIBUTE_NAME,"")},getValueForProperty:function(){},getValueForAttribute:function(){},setValueForProperty:function(t,e,n){var r=we.getPropertyInfo(e);if(r&&we.shouldSetAttribute(e,n)){var i=r.mutationMethod;i?i(t,n):null==n||r.hasBooleanValue&&!n||r.hasNumericValue&&isNaN(n)||r.hasPositiveNumericValue&&1>n||r.hasOverloadedBooleanValue&&!1===n?An.deleteValueForProperty(t,e):r.mustUseProperty?t[r.propertyName]=n:(e=r.attributeName,(i=r.attributeNamespace)?t.setAttributeNS(i,e,""+n):r.hasBooleanValue||r.hasOverloadedBooleanValue&&!0===n?t.setAttribute(e,""):t.setAttribute(e,""+n))}else An.setValueForAttribute(t,e,we.shouldSetAttribute(e,n)?n:null)},setValueForAttribute:function(t,e,n){(function(t){return!!Cn.hasOwnProperty(t)||!Sn.hasOwnProperty(t)&&(Tn.test(t)?Cn[t]=!0:(Sn[t]=!0,!1))})(e)&&(null==n?t.removeAttribute(e):t.setAttribute(e,""+n))},deleteValueForAttribute:function(t,e){t.removeAttribute(e)},deleteValueForProperty:function(t,e){var n=we.getPropertyInfo(e);n?(e=n.mutationMethod)?e(t,void 0):n.mustUseProperty?t[n.propertyName]=!n.hasBooleanValue&&"":t.removeAttribute(n.attributeName):t.removeAttribute(e)}},Pn=An,Rn=Ue.ReactDebugCurrentFrame,Ln={current:null,phase:null,resetCurrentFiber:function(){Rn.getCurrentStack=null,Ln.current=null,Ln.phase=null},setCurrentFiber:function(t,e){Rn.getCurrentStack=N,Ln.current=t,Ln.phase=e},getCurrentFiberOwnerName:function(){return null},getCurrentFiberStackAddendum:N},In=Ln,On={getHostProps:function(t,e){var n=e.value,r=e.checked;return ie({type:void 0,step:void 0,min:void 0,max:void 0},e,{defaultChecked:void 0,defaultValue:void 0,value:null!=n?n:t._wrapperState.initialValue,checked:null!=r?r:t._wrapperState.initialChecked})},initWrapperState:function(t,e){var n=e.defaultValue;t._wrapperState={initialChecked:null!=e.checked?e.checked:e.defaultChecked,initialValue:null!=e.value?e.value:n,controlled:"checkbox"===e.type||"radio"===e.type?null!=e.checked:null!=e.value}},updateWrapper:function(t,e){var n=e.checked;null!=n&&Pn.setValueForProperty(t,"checked",n||!1),null!=(n=e.value)?0===n&&""===t.value?t.value="0":"number"===e.type?(n!=(e=parseFloat(t.value)||0)||n==e&&t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n):(null==e.value&&null!=e.defaultValue&&t.defaultValue!==""+e.defaultValue&&(t.defaultValue=""+e.defaultValue),null==e.checked&&null!=e.defaultChecked&&(t.defaultChecked=!!e.defaultChecked))},postMountWrapper:function(t,e){switch(e.type){case"submit":case"reset":break;case"color":case"date":case"datetime":case"datetime-local":case"month":case"time":case"week":t.value="",t.value=t.defaultValue;break;default:t.value=t.value}""!==(e=t.name)&&(t.name=""),t.defaultChecked=!t.defaultChecked,t.defaultChecked=!t.defaultChecked,""!==e&&(t.name=e)},restoreControlledState:function(t,e){On.updateWrapper(t,e);var n=e.name;if("radio"===e.type&&null!=n){for(e=t;e.parentNode;)e=e.parentNode;for(n=e.querySelectorAll("input[name="+JSON.stringify(""+n)+'][type="radio"]'),e=0;e<n.length;e++){var i=n[e];if(i!==t&&i.form===t.form){var o=Ne.getFiberCurrentPropsFromNode(i);o||r("90"),On.updateWrapper(i,o)}}}}},Nn=On,Dn={validateProps:function(){},postMountWrapper:function(t,e){null!=e.value&&t.setAttribute("value",e.value)},getHostProps:function(t,e){return t=ie({children:void 0},e),(e=function(t){var e="";return ne.Children.forEach(t,function(t){null==t||"string"!=typeof t&&"number"!=typeof t||(e+=t)}),e}(e.children))&&(t.children=e),t}},Un={getHostProps:function(t,e){return ie({},e,{value:void 0})},initWrapperState:function(t,e){var n=e.value;t._wrapperState={initialValue:null!=n?n:e.defaultValue,wasMultiple:!!e.multiple}},postMountWrapper:function(t,e){t.multiple=!!e.multiple;var n=e.value;null!=n?D(t,!!e.multiple,n):null!=e.defaultValue&&D(t,!!e.multiple,e.defaultValue)},postUpdateWrapper:function(t,e){t._wrapperState.initialValue=void 0;var n=t._wrapperState.wasMultiple;t._wrapperState.wasMultiple=!!e.multiple;var r=e.value;null!=r?D(t,!!e.multiple,r):n!==!!e.multiple&&(null!=e.defaultValue?D(t,!!e.multiple,e.defaultValue):D(t,!!e.multiple,e.multiple?[]:""))},restoreControlledState:function(t,e){var n=e.value;null!=n&&D(t,!!e.multiple,n)}},Fn={getHostProps:function(t,e){return null!=e.dangerouslySetInnerHTML&&r("91"),ie({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})},initWrapperState:function(t,e){var n=e.value,i=n;null==n&&(n=e.defaultValue,null!=(e=e.children)&&(null!=n&&r("92"),Array.isArray(e)&&(1>=e.length||r("93"),e=e[0]),n=""+e),null==n&&(n=""),i=n),t._wrapperState={initialValue:""+i}},updateWrapper:function(t,e){var n=e.value;null!=n&&((n=""+n)!==t.value&&(t.value=n),null==e.defaultValue&&(t.defaultValue=n)),null!=e.defaultValue&&(t.defaultValue=e.defaultValue)},postMountWrapper:function(t){var e=t.textContent;e===t._wrapperState.initialValue&&(t.value=e)},restoreControlledState:function(t,e){Fn.updateWrapper(t,e)}},kn=Fn,zn=ie({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}),Bn={_getTrackerFromNode:function(t){return t._valueTracker},track:function(t){t._valueTracker||(t._valueTracker=function(t){var e=F(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),r=""+t[e];if(!t.hasOwnProperty(e)&&"function"==typeof n.get&&"function"==typeof n.set)return Object.defineProperty(t,e,{enumerable:n.enumerable,configurable:!0,get:function(){return n.get.call(this)},set:function(t){r=""+t,n.set.call(this,t)}}),{getValue:function(){return r},setValue:function(t){r=""+t},stopTracking:function(){t._valueTracker=null,delete t[e]}}}(t))},updateValueIfChanged:function(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=F(t)?t.checked?"true":"false":t.value),(t=r)!==n&&(e.setValue(t),!0)},stopTracking:function(t){(t=t._valueTracker)&&t.stopTracking()}},Hn=fe.Namespaces,Gn=function(t){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,n,r,i){MSApp.execUnsafeLocalFunction(function(){return t(e,n)})}:t}(function(t,e){if(t.namespaceURI!==Hn.svg||"innerHTML"in t)t.innerHTML=e;else for(En=En||document.createElement("div"),En.innerHTML="<svg>"+e+"</svg>",e=En.firstChild;e.firstChild;)t.appendChild(e.firstChild)}),jn=/["'&<>]/,Vn=Me.TEXT_NODE;re.canUseDOM&&("textContent"in document.documentElement||(z=function(t,e){if(t.nodeType===Vn)t.nodeValue=e;else{if("boolean"==typeof e||"number"==typeof e)e=""+e;else{e=""+e;var n=jn.exec(e);if(n){var r,i="",o=0;for(r=n.index;r<e.length;r++){switch(e.charCodeAt(r)){case 34:n=""";break;case 38:n="&";break;case 39:n="'";break;case 60:n="<";break;case 62:n=">";break;default:continue}o!==r&&(i+=e.substring(o,r)),o=r+1,i+=n}e=o!==r?i+e.substring(o,r):i}}Gn(t,e)}}));var Wn=z,qn=(In.getCurrentFiberOwnerName,Me.DOCUMENT_NODE),Xn=Me.DOCUMENT_FRAGMENT_NODE,Yn=vn.listenTo,Kn=ye.registrationNameModules,Zn=fe.Namespaces.html,Jn=fe.getIntrinsicNamespace,Qn={topAbort:"abort",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topSeeked:"seeked",topSeeking:"seeking",topStalled:"stalled",topSuspend:"suspend",topTimeUpdate:"timeupdate",topVolumeChange:"volumechange",topWaiting:"waiting"},$n={createElement:function(t,e,n,r){return n=n.nodeType===qn?n:n.ownerDocument,r===Zn&&(r=Jn(t)),r===Zn?"script"===t?(t=n.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):t="string"==typeof e.is?n.createElement(t,{is:e.is}):n.createElement(t):t=n.createElementNS(r,t),t},createTextNode:function(t,e){return(e.nodeType===qn?e:e.ownerDocument).createTextNode(t)},setInitialProperties:function(t,e,n,r){var i=k(e,n);switch(e){case"iframe":case"object":vn.trapBubbledEvent("topLoad","load",t);var o=n;break;case"video":case"audio":for(o in Qn)Qn.hasOwnProperty(o)&&vn.trapBubbledEvent(o,Qn[o],t);o=n;break;case"source":vn.trapBubbledEvent("topError","error",t),o=n;break;case"img":case"image":vn.trapBubbledEvent("topError","error",t),vn.trapBubbledEvent("topLoad","load",t),o=n;break;case"form":vn.trapBubbledEvent("topReset","reset",t),vn.trapBubbledEvent("topSubmit","submit",t),o=n;break;case"details":vn.trapBubbledEvent("topToggle","toggle",t),o=n;break;case"input":Nn.initWrapperState(t,n),o=Nn.getHostProps(t,n),vn.trapBubbledEvent("topInvalid","invalid",t),B(r,"onChange");break;case"option":Dn.validateProps(t,n),o=Dn.getHostProps(t,n);break;case"select":Un.initWrapperState(t,n),o=Un.getHostProps(t,n),vn.trapBubbledEvent("topInvalid","invalid",t),B(r,"onChange");break;case"textarea":kn.initWrapperState(t,n),o=kn.getHostProps(t,n),vn.trapBubbledEvent("topInvalid","invalid",t),B(r,"onChange");break;default:o=n}U(e,o);var a,s=o;for(a in s)if(s.hasOwnProperty(a)){var u=s[a];"style"===a?Mn.setValueForStyles(t,u):"dangerouslySetInnerHTML"===a?null!=(u=u?u.__html:void 0)&&Gn(t,u):"children"===a?"string"==typeof u?Wn(t,u):"number"==typeof u&&Wn(t,""+u):"suppressContentEditableWarning"!==a&&(Kn.hasOwnProperty(a)?null!=u&&B(r,a):i?Pn.setValueForAttribute(t,a,u):null!=u&&Pn.setValueForProperty(t,a,u))}switch(e){case"input":Bn.track(t),Nn.postMountWrapper(t,n);break;case"textarea":Bn.track(t),kn.postMountWrapper(t,n);break;case"option":Dn.postMountWrapper(t,n);break;case"select":Un.postMountWrapper(t,n);break;default:"function"==typeof o.onClick&&(t.onclick=ae)}},diffProperties:function(t,e,n,r,i){var o=null;switch(e){case"input":n=Nn.getHostProps(t,n),r=Nn.getHostProps(t,r),o=[];break;case"option":n=Dn.getHostProps(t,n),r=Dn.getHostProps(t,r),o=[];break;case"select":n=Un.getHostProps(t,n),r=Un.getHostProps(t,r),o=[];break;case"textarea":n=kn.getHostProps(t,n),r=kn.getHostProps(t,r),o=[];break;default:"function"!=typeof n.onClick&&"function"==typeof r.onClick&&(t.onclick=ae)}U(e,r);var a,s;t=null;for(a in n)if(!r.hasOwnProperty(a)&&n.hasOwnProperty(a)&&null!=n[a])if("style"===a)for(s in e=n[a])e.hasOwnProperty(s)&&(t||(t={}),t[s]="");else"dangerouslySetInnerHTML"!==a&&"children"!==a&&"suppressContentEditableWarning"!==a&&(Kn.hasOwnProperty(a)?o||(o=[]):(o=o||[]).push(a,null));for(a in r){var u=r[a];if(e=null!=n?n[a]:void 0,r.hasOwnProperty(a)&&u!==e&&(null!=u||null!=e))if("style"===a)if(e){for(s in e)!e.hasOwnProperty(s)||u&&u.hasOwnProperty(s)||(t||(t={}),t[s]="");for(s in u)u.hasOwnProperty(s)&&e[s]!==u[s]&&(t||(t={}),t[s]=u[s])}else t||(o||(o=[]),o.push(a,t)),t=u;else"dangerouslySetInnerHTML"===a?(u=u?u.__html:void 0,e=e?e.__html:void 0,null!=u&&e!==u&&(o=o||[]).push(a,""+u)):"children"===a?e===u||"string"!=typeof u&&"number"!=typeof u||(o=o||[]).push(a,""+u):"suppressContentEditableWarning"!==a&&(Kn.hasOwnProperty(a)?(null!=u&&B(i,a),o||e===u||(o=[])):(o=o||[]).push(a,u))}return t&&(o=o||[]).push("style",t),o},updateProperties:function(t,e,n,r,i){k(n,r),r=k(n,i);for(var o=0;o<e.length;o+=2){var a=e[o],s=e[o+1];"style"===a?Mn.setValueForStyles(t,s):"dangerouslySetInnerHTML"===a?Gn(t,s):"children"===a?Wn(t,s):r?null!=s?Pn.setValueForAttribute(t,a,s):Pn.deleteValueForAttribute(t,a):null!=s?Pn.setValueForProperty(t,a,s):Pn.deleteValueForProperty(t,a)}switch(n){case"input":Nn.updateWrapper(t,i),Bn.updateValueIfChanged(t);break;case"textarea":kn.updateWrapper(t,i);break;case"select":Un.postUpdateWrapper(t,i)}},diffHydratedProperties:function(t,e,n,r,i){switch(e){case"iframe":case"object":vn.trapBubbledEvent("topLoad","load",t);break;case"video":case"audio":for(var o in Qn)Qn.hasOwnProperty(o)&&vn.trapBubbledEvent(o,Qn[o],t);break;case"source":vn.trapBubbledEvent("topError","error",t);break;case"img":case"image":vn.trapBubbledEvent("topError","error",t),vn.trapBubbledEvent("topLoad","load",t);break;case"form":vn.trapBubbledEvent("topReset","reset",t),vn.trapBubbledEvent("topSubmit","submit",t);break;case"details":vn.trapBubbledEvent("topToggle","toggle",t);break;case"input":Nn.initWrapperState(t,n),vn.trapBubbledEvent("topInvalid","invalid",t),B(i,"onChange");break;case"option":Dn.validateProps(t,n);break;case"select":Un.initWrapperState(t,n),vn.trapBubbledEvent("topInvalid","invalid",t),B(i,"onChange");break;case"textarea":kn.initWrapperState(t,n),vn.trapBubbledEvent("topInvalid","invalid",t),B(i,"onChange")}U(e,n),r=null;for(var a in n)n.hasOwnProperty(a)&&(o=n[a],"children"===a?"string"==typeof o?t.textContent!==o&&(r=["children",o]):"number"==typeof o&&t.textContent!==""+o&&(r=["children",""+o]):Kn.hasOwnProperty(a)&&null!=o&&B(i,a));switch(e){case"input":Bn.track(t),Nn.postMountWrapper(t,n);break;case"textarea":Bn.track(t),kn.postMountWrapper(t,n);break;case"select":case"option":break;default:"function"==typeof n.onClick&&(t.onclick=ae)}return r},diffHydratedText:function(t,e){return t.nodeValue!==e},warnForDeletedHydratableElement:function(){},warnForDeletedHydratableText:function(){},warnForInsertedHydratedElement:function(){},warnForInsertedHydratedText:function(){},restoreControlledState:function(t,e,n){switch(e){case"input":Nn.restoreControlledState(t,n);break;case"textarea":kn.restoreControlledState(t,n);break;case"select":Un.restoreControlledState(t,n)}}},tr=void 0;if(re.canUseDOM)if("function"!=typeof requestIdleCallback){var er=null,nr=null,rr=!1,ir=!1,or=0,ar=33,sr=33,ur={timeRemaining:"object"==typeof performance&&"function"==typeof performance.now?function(){return or-performance.now()}:function(){return or-Date.now()}},cr="__reactIdleCallback$"+Math.random().toString(36).slice(2);window.addEventListener("message",function(t){t.source===window&&t.data===cr&&(rr=!1,t=nr,nr=null,null!==t&&t(ur))},!1);var lr=function(t){ir=!1;var e=t-or+sr;e<sr&&ar<sr?(8>e&&(e=8),sr=e<ar?ar:e):ar=e,or=t+sr,rr||(rr=!0,window.postMessage(cr,"*")),e=er,er=null,null!==e&&e(t)};tr=function(t){return nr=t,ir||(ir=!0,requestAnimationFrame(lr)),0}}else tr=requestIdleCallback;else tr=function(t){return setTimeout(function(){t({timeRemaining:function(){return 1/0}})}),0};var hr,pr,dr={rIC:tr},fr={enableAsyncSubtreeAPI:!0},mr={NoWork:0,SynchronousPriority:1,TaskPriority:2,HighPriority:3,LowPriority:4,OffscreenPriority:5},vr=Fe.Callback,gr=mr.NoWork,yr=mr.SynchronousPriority,_r=mr.TaskPriority,br=Ee.ClassComponent,xr=Ee.HostRoot,wr=void 0,Er=void 0,Mr={addUpdate:function(t,e,n,r){V(t,{priorityLevel:r,partialState:e,callback:n,isReplace:!1,isForced:!1,isTopLevelUnmount:!1,next:null})},addReplaceUpdate:function(t,e,n,r){V(t,{priorityLevel:r,partialState:e,callback:n,isReplace:!0,isForced:!1,isTopLevelUnmount:!1,next:null})},addForceUpdate:function(t,e,n){V(t,{priorityLevel:n,partialState:null,callback:e,isReplace:!1,isForced:!0,isTopLevelUnmount:!1,next:null})},getUpdatePriority:function(t){var e=t.updateQueue;return null===e||t.tag!==br&&t.tag!==xr?gr:null!==e.first?e.first.priorityLevel:gr},addTopLevelUpdate:function(t,e,n,r){var i=null===e.element;t=V(t,e={priorityLevel:r,partialState:e,callback:n,isReplace:!1,isForced:!1,isTopLevelUnmount:i,next:null}),i&&(i=wr,n=Er,null!==i&&null!==e.next&&(e.next=null,i.last=e),null!==n&&null!==t&&null!==t.next&&(t.next=null,n.last=e))},beginUpdateQueue:function(t,e,n,r,i,o,a){null!==t&&t.updateQueue===n&&(n=e.updateQueue={first:n.first,last:n.last,callbackList:null,hasForceUpdate:!1}),t=n.callbackList;for(var s=n.hasForceUpdate,u=!0,c=n.first;null!==c&&0>=H(c.priorityLevel,a);){n.first=c.next,null===n.first&&(n.last=null);var l;c.isReplace?(i=W(c,r,i,o),u=!0):(l=W(c,r,i,o))&&(i=u?ie({},i,l):ie(i,l),u=!1),c.isForced&&(s=!0),null===c.callback||c.isTopLevelUnmount&&null!==c.next||((t=null!==t?t:[]).push(c.callback),e.effectTag|=vr),c=c.next}return n.callbackList=t,n.hasForceUpdate=s,null!==n.first||null!==t||s||(e.updateQueue=null),i},commitCallbacks:function(t,e,n){if(null!==(t=e.callbackList))for(e.callbackList=null,e=0;e<t.length;e++){var i=t[e];"function"!=typeof i&&r("191",i),i.call(n)}}},Tr=[],Sr=-1,Cr={createCursor:function(t){return{current:t}},isEmpty:function(){return-1===Sr},pop:function(t){0>Sr||(t.current=Tr[Sr],Tr[Sr]=null,Sr--)},push:function(t,e){Tr[++Sr]=t.current,t.current=e},reset:function(){for(;-1<Sr;)Tr[Sr]=null,Sr--}},Ar=Ve.isFiberMounted,Pr=Ee.ClassComponent,Rr=Ee.HostRoot,Lr=Cr.createCursor,Ir=Cr.pop,Or=Cr.push,Nr=Lr(se),Dr=Lr(!1),Ur=se,Fr={getUnmaskedContext:function(t){return X(t)?Ur:Nr.current},cacheContext:q,getMaskedContext:function(t,e){var n=t.type.contextTypes;if(!n)return se;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=e[i];return r&&q(t,e,o),o},hasContextChanged:function(){return Dr.current},isContextConsumer:function(t){return t.tag===Pr&&null!=t.type.contextTypes},isContextProvider:X,popContextProvider:function(t){X(t)&&(Ir(Dr,t),Ir(Nr,t))},popTopLevelContextObject:function(t){Ir(Dr,t),Ir(Nr,t)},pushTopLevelContextObject:function(t,e,n){null!=Nr.cursor&&r("168"),Or(Nr,e,t),Or(Dr,n,t)},processChildContext:Y,pushContextProvider:function(t){if(!X(t))return!1;var e=t.stateNode;return e=e&&e.__reactInternalMemoizedMergedChildContext||se,Ur=Nr.current,Or(Nr,e,t),Or(Dr,Dr.current,t),!0},invalidateContextProvider:function(t,e){var n=t.stateNode;if(n||r("169"),e){var i=Y(t,Ur);n.__reactInternalMemoizedMergedChildContext=i,Ir(Dr,t),Ir(Nr,t),Or(Nr,i,t)}else Ir(Dr,t);Or(Dr,e,t)},resetContext:function(){Ur=se,Nr.current=se,Dr.current=!1},findCurrentUnmaskedContext:function(t){for(Ar(t)&&t.tag===Pr?void 0:r("170");t.tag!==Rr;){if(X(t))return t.stateNode.__reactInternalMemoizedMergedChildContext;(t=t.return)||r("171")}return t.stateNode.context}},kr={NoContext:0,AsyncUpdates:1},zr=Ee.IndeterminateComponent,Br=Ee.ClassComponent,Hr=Ee.HostRoot,Gr=Ee.HostComponent,jr=Ee.HostText,Vr=Ee.HostPortal,Wr=Ee.CoroutineComponent,qr=Ee.YieldComponent,Xr=Ee.Fragment,Yr=mr.NoWork,Kr=kr.NoContext,Zr=Fe.NoEffect,Jr={createWorkInProgress:function(t,e){var n=t.alternate;return null===n?(n=new K(t.tag,t.key,t.internalContextTag),n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.effectTag=Zr,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.pendingWorkPriority=e,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n},createHostRootFiber:function(){return new K(Hr,null,Kr)},createFiberFromElement:function(t,e,n){return e=Z(t.type,t.key,e),e.pendingProps=t.props,e.pendingWorkPriority=n,e},createFiberFromFragment:function(t,e,n){return e=new K(Xr,null,e),e.pendingProps=t,e.pendingWorkPriority=n,e},createFiberFromText:function(t,e,n){return e=new K(jr,null,e),e.pendingProps=t,e.pendingWorkPriority=n,e},createFiberFromElementType:Z,createFiberFromHostInstanceForDeletion:function(){var t=new K(Gr,null,Kr);return t.type="DELETED",t},createFiberFromCoroutine:function(t,e,n){return e=new K(Wr,t.key,e),e.type=t.handler,e.pendingProps=t,e.pendingWorkPriority=n,e},createFiberFromYield:function(t,e){return new K(qr,null,e)},createFiberFromPortal:function(t,e,n){return e=new K(Vr,t.key,e),e.pendingProps=t.children||[],e.pendingWorkPriority=n,e.stateNode={containerInfo:t.containerInfo,implementation:t.implementation},e},largerPriority:function(t,e){return t!==Yr&&(e===Yr||e>t)?t:e}},Qr=Jr.createHostRootFiber,$r=Ee.IndeterminateComponent,ti=Ee.FunctionalComponent,ei=Ee.ClassComponent,ni=Ee.HostComponent;"function"==typeof Symbol&&Symbol.for?(hr=Symbol.for("react.coroutine"),pr=Symbol.for("react.yield")):(hr=60104,pr=60105);var ri={createCoroutine:function(t,e,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:hr,key:null==r?null:""+r,children:t,handler:e,props:n}},createYield:function(t){return{$$typeof:pr,value:t}},isCoroutine:function(t){return"object"==typeof t&&null!==t&&t.$$typeof===hr},isYield:function(t){return"object"==typeof t&&null!==t&&t.$$typeof===pr},REACT_YIELD_TYPE:pr,REACT_COROUTINE_TYPE:hr},ii="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.portal")||60106,oi={createPortal:function(t,e,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:ii,key:null==r?null:""+r,children:t,containerInfo:e,implementation:n}},isPortal:function(t){return"object"==typeof t&&null!==t&&t.$$typeof===ii},REACT_PORTAL_TYPE:ii},ai=ri.REACT_COROUTINE_TYPE,si=ri.REACT_YIELD_TYPE,ui=oi.REACT_PORTAL_TYPE,ci=Jr.createWorkInProgress,li=Jr.createFiberFromElement,hi=Jr.createFiberFromFragment,pi=Jr.createFiberFromText,di=Jr.createFiberFromCoroutine,fi=Jr.createFiberFromYield,mi=Jr.createFiberFromPortal,vi=Array.isArray,gi=Ee.FunctionalComponent,yi=Ee.ClassComponent,_i=Ee.HostText,bi=Ee.HostPortal,xi=Ee.CoroutineComponent,wi=Ee.YieldComponent,Ei=Ee.Fragment,Mi=Fe.NoEffect,Ti=Fe.Placement,Si=Fe.Deletion,Ci="function"==typeof Symbol&&Symbol.iterator,Ai="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,Pi={reconcileChildFibers:tt(!0,!0),reconcileChildFibersInPlace:tt(!1,!0),mountChildFibersInPlace:tt(!1,!1),cloneChildFibers:function(t,e){if(null!==t&&e.child!==t.child&&r("153"),null!==e.child){t=e.child;var n=ci(t,t.pendingWorkPriority);for(n.pendingProps=t.pendingProps,e.child=n,n.return=e;null!==t.sibling;)t=t.sibling,n=n.sibling=ci(t,t.pendingWorkPriority),n.pendingProps=t.pendingProps,n.return=e;n.sibling=null}}},Ri=Fe.Update,Li=kr.AsyncUpdates,Ii=Fr.cacheContext,Oi=Fr.getMaskedContext,Ni=Fr.getUnmaskedContext,Di=Fr.isContextConsumer,Ui=Mr.addUpdate,Fi=Mr.addReplaceUpdate,ki=Mr.addForceUpdate,zi=Mr.beginUpdateQueue,Bi=Fr.hasContextChanged,Hi=Ve.isMounted,Gi=Pi.mountChildFibersInPlace,ji=Pi.reconcileChildFibers,Vi=Pi.reconcileChildFibersInPlace,Wi=Pi.cloneChildFibers,qi=Mr.beginUpdateQueue,Xi=Fr.getMaskedContext,Yi=Fr.getUnmaskedContext,Ki=Fr.hasContextChanged,Zi=Fr.pushContextProvider,Ji=Fr.pushTopLevelContextObject,Qi=Fr.invalidateContextProvider,$i=Ee.IndeterminateComponent,to=Ee.FunctionalComponent,eo=Ee.ClassComponent,no=Ee.HostRoot,ro=Ee.HostComponent,io=Ee.HostText,oo=Ee.HostPortal,ao=Ee.CoroutineComponent,so=Ee.CoroutineHandlerPhase,uo=Ee.YieldComponent,co=Ee.Fragment,lo=mr.NoWork,ho=mr.OffscreenPriority,po=Fe.PerformedWork,fo=Fe.Placement,mo=Fe.ContentReset,vo=Fe.Err,go=Fe.Ref,yo=Ue.ReactCurrentOwner,_o=Pi.reconcileChildFibers,bo=Fr.popContextProvider,xo=Fr.popTopLevelContextObject,wo=Ee.IndeterminateComponent,Eo=Ee.FunctionalComponent,Mo=Ee.ClassComponent,To=Ee.HostRoot,So=Ee.HostComponent,Co=Ee.HostText,Ao=Ee.HostPortal,Po=Ee.CoroutineComponent,Ro=Ee.CoroutineHandlerPhase,Lo=Ee.YieldComponent,Io=Ee.Fragment,Oo=Fe.Placement,No=Fe.Ref,Do=Fe.Update,Uo=mr.OffscreenPriority,Fo=null,ko=null,zo={injectInternals:function(t){if("undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var e=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!e.supportsFiber)return!0;try{var n=e.inject(t);Fo=nt(function(t){return e.onCommitFiberRoot(n,t)}),ko=nt(function(t){return e.onCommitFiberUnmount(n,t)})}catch(t){}return!0},onCommitRoot:function(t){"function"==typeof Fo&&Fo(t)},onCommitUnmount:function(t){"function"==typeof ko&&ko(t)}},Bo=Ee.ClassComponent,Ho=Ee.HostRoot,Go=Ee.HostComponent,jo=Ee.HostText,Vo=Ee.HostPortal,Wo=Ee.CoroutineComponent,qo=Mr.commitCallbacks,Xo=zo.onCommitUnmount,Yo=Fe.Placement,Ko=Fe.Update,Zo=Fe.Callback,Jo=Fe.ContentReset,Qo=Cr.createCursor,$o=Cr.pop,ta=Cr.push,ea={},na=Ee.HostComponent,ra=Ee.HostText,ia=Ee.HostRoot,oa=Fe.Deletion,aa=Fe.Placement,sa=Jr.createFiberFromHostInstanceForDeletion,ua=Fr.popContextProvider,ca=Cr.reset,la=Ue.ReactCurrentOwner,ha=Jr.createWorkInProgress,pa=Jr.largerPriority,da=zo.onCommitRoot,fa=mr.NoWork,ma=mr.SynchronousPriority,va=mr.TaskPriority,ga=mr.HighPriority,ya=mr.LowPriority,_a=mr.OffscreenPriority,ba=kr.AsyncUpdates,xa=Fe.PerformedWork,wa=Fe.Placement,Ea=Fe.Update,Ma=Fe.PlacementAndUpdate,Ta=Fe.Deletion,Sa=Fe.ContentReset,Ca=Fe.Callback,Aa=Fe.Err,Pa=Fe.Ref,Ra=Ee.HostRoot,La=Ee.HostComponent,Ia=Ee.HostPortal,Oa=Ee.ClassComponent,Na=Mr.getUpdatePriority,Da=Fr.resetContext;ot._injectFiber=function(t){it=t};var Ua=Mr.addTopLevelUpdate,Fa=Fr.findCurrentUnmaskedContext,ka=Fr.isContextProvider,za=Fr.processChildContext,Ba=Ee.HostComponent,Ha=Ve.findCurrentHostFiber,Ga=Ve.findCurrentHostFiberWithNoPortals;ot._injectFiber(function(t){var e=Fa(t);return ka(t)?za(t,e,!1):e});var ja=Me.TEXT_NODE,Va=null,Wa={getOffsets:function(t){var e=window.getSelection&&window.getSelection();if(!e||0===e.rangeCount)return null;var n=e.anchorNode,r=e.anchorOffset,i=e.focusNode,o=e.focusOffset,a=e.getRangeAt(0);try{a.startContainer.nodeType,a.endContainer.nodeType}catch(t){return null}e=e.anchorNode===e.focusNode&&e.anchorOffset===e.focusOffset?0:a.toString().length;var s=a.cloneRange();return s.selectNodeContents(t),s.setEnd(a.startContainer,a.startOffset),t=s.startContainer===s.endContainer&&s.startOffset===s.endOffset?0:s.toString().length,a=t+e,(e=document.createRange()).setStart(n,r),e.setEnd(i,o),n=e.collapsed,{start:n?a:t,end:n?t:a}},setOffsets:function(t,e){if(window.getSelection){var n=window.getSelection(),r=t[ut()].length,i=Math.min(e.start,r);if(e=void 0===e.end?i:Math.min(e.end,r),!n.extend&&i>e&&(r=e,e=i,i=r),r=st(t,i),t=st(t,e),r&&t){var o=document.createRange();o.setStart(r.node,r.offset),n.removeAllRanges(),i>e?(n.addRange(o),n.extend(t.node,t.offset)):(o.setEnd(t.node,t.offset),n.addRange(o))}}}},qa=Me.ELEMENT_NODE,Xa={hasSelectionCapabilities:function(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&("input"===e&&"text"===t.type||"textarea"===e||"true"===t.contentEditable)},getSelectionInformation:function(){var t=he();return{focusedElem:t,selectionRange:Xa.hasSelectionCapabilities(t)?Xa.getSelection(t):null}},restoreSelection:function(t){var e=he(),n=t.focusedElem;if(t=t.selectionRange,e!==n&&ce(document.documentElement,n)){for(Xa.hasSelectionCapabilities(n)&&Xa.setSelection(n,t),e=[],t=n;t=t.parentNode;)t.nodeType===qa&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(le(n),n=0;n<e.length;n++)t=e[n],t.element.scrollLeft=t.left,t.element.scrollTop=t.top}},getSelection:function(t){return("selectionStart"in t?{start:t.selectionStart,end:t.selectionEnd}:Wa.getOffsets(t))||{start:0,end:0}},setSelection:function(t,e){var n=e.start,r=e.end;void 0===r&&(r=n),"selectionStart"in t?(t.selectionStart=n,t.selectionEnd=Math.min(r,t.value.length)):Wa.setOffsets(t,e)}},Ya=Xa,Ka=Me.ELEMENT_NODE;ht._injectFiber=function(t){ct=t},ht._injectStack=function(t){lt=t};var Za=Ee.HostComponent,Ja={isAncestor:function(t,e){for(;e;){if(t===e||t===e.alternate)return!0;e=pt(e)}return!1},getLowestCommonAncestor:dt,getParentInstance:function(t){return pt(t)},traverseTwoPhase:function(t,e,n){for(var r=[];t;)r.push(t),t=pt(t);for(t=r.length;0<t--;)e(r[t],"captured",n);for(t=0;t<r.length;t++)e(r[t],"bubbled",n)},traverseEnterLeave:function(t,e,n,r,i){for(var o=t&&e?dt(t,e):null,a=[];t&&t!==o;)a.push(t),t=pt(t);for(t=[];e&&e!==o;)t.push(e),e=pt(e);for(e=0;e<a.length;e++)n(a[e],"bubbled",r);for(e=t.length;0<e--;)n(t[e],"captured",i)}},Qa=un.getListener,$a={accumulateTwoPhaseDispatches:function(t){T(t,mt)},accumulateTwoPhaseDispatchesSkipTarget:function(t){T(t,vt)},accumulateDirectDispatches:function(t){T(t,yt)},accumulateEnterLeaveDispatches:function(t,e,n,r){Ja.traverseEnterLeave(n,r,gt,t,e)}},ts={_root:null,_startText:null,_fallbackText:null},es={initialize:function(t){return ts._root=t,ts._startText=es.getText(),!0},reset:function(){ts._root=null,ts._startText=null,ts._fallbackText=null},getData:function(){if(ts._fallbackText)return ts._fallbackText;var t,e,n=ts._startText,r=n.length,i=es.getText(),o=i.length;for(t=0;t<r&&n[t]===i[t];t++);var a=r-t;for(e=1;e<=a&&n[r-e]===i[o-e];e++);return ts._fallbackText=i.slice(t,1<e?1-e:void 0),ts._fallbackText},getText:function(){return"value"in ts._root?ts._root.value:ts._root[ut()]}},ns=es,rs="dispatchConfig _targetInst nativeEvent isDefaultPrevented isPropagationStopped _dispatchListeners _dispatchInstances".split(" "),is={type:null,target:null,currentTarget:ae.thatReturnsNull,eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null};ie(_t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var t=this.nativeEvent;t&&(t.preventDefault?t.preventDefault():"unknown"!=typeof t.returnValue&&(t.returnValue=!1),this.isDefaultPrevented=ae.thatReturnsTrue)},stopPropagation:function(){var t=this.nativeEvent;t&&(t.stopPropagation?t.stopPropagation():"unknown"!=typeof t.cancelBubble&&(t.cancelBubble=!0),this.isPropagationStopped=ae.thatReturnsTrue)},persist:function(){this.isPersistent=ae.thatReturnsTrue},isPersistent:ae.thatReturnsFalse,destructor:function(){var t,e=this.constructor.Interface;for(t in e)this[t]=null;for(e=0;e<rs.length;e++)this[rs[e]]=null}}),_t.Interface=is,_t.augmentClass=function(t,e){function n(){}n.prototype=this.prototype;var r=new n;ie(r,t.prototype),t.prototype=r,t.prototype.constructor=t,t.Interface=ie({},this.Interface,e),t.augmentClass=this.augmentClass,wt(t)},wt(_t),_t.augmentClass(Et,{data:null}),_t.augmentClass(Mt,{data:null});var os=[9,13,27,32],as=re.canUseDOM&&"CompositionEvent"in window,ss=null;re.canUseDOM&&"documentMode"in document&&(ss=document.documentMode);var us;if(us=re.canUseDOM&&"TextEvent"in window&&!ss){var cs=window.opera;us=!("object"==typeof cs&&"function"==typeof cs.version&&12>=parseInt(cs.version(),10))}var ls=us,hs=re.canUseDOM&&(!as||ss&&8<ss&&11>=ss),ps=String.fromCharCode(32),ds={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["topCompositionEnd","topKeyPress","topTextInput","topPaste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"topBlur topCompositionEnd topKeyDown topKeyPress topKeyUp topMouseDown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"topBlur topCompositionStart topKeyDown topKeyPress topKeyUp topMouseDown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"topBlur topCompositionUpdate topKeyDown topKeyPress topKeyUp topMouseDown".split(" ")}},fs=!1,ms=!1,vs={eventTypes:ds,extractEvents:function(t,e,n,r){var i;if(as)t:{switch(t){case"topCompositionStart":var o=ds.compositionStart;break t;case"topCompositionEnd":o=ds.compositionEnd;break t;case"topCompositionUpdate":o=ds.compositionUpdate;break t}o=void 0}else ms?Tt(t,n)&&(o=ds.compositionEnd):"topKeyDown"===t&&229===n.keyCode&&(o=ds.compositionStart);return o?(hs&&(ms||o!==ds.compositionStart?o===ds.compositionEnd&&ms&&(i=ns.getData()):ms=ns.initialize(r)),o=Et.getPooled(o,e,n,r),i?o.data=i:null!==(i=St(n))&&(o.data=i),$a.accumulateTwoPhaseDispatches(o),i=o):i=null,(t=ls?function(t,e){switch(t){case"topCompositionEnd":return St(e);case"topKeyPress":return 32!==e.which?null:(fs=!0,ps);case"topTextInput":return(t=e.data)===ps&&fs?null:t;default:return null}}(t,n):function(t,e){if(ms)return"topCompositionEnd"===t||!as&&Tt(t,e)?(t=ns.getData(),ns.reset(),ms=!1,t):null;switch(t){case"topPaste":return null;case"topKeyPress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"topCompositionEnd":return hs?null:e.data;default:return null}}(t,n))?(e=Mt.getPooled(ds.beforeInput,e,n,r),e.data=t,$a.accumulateTwoPhaseDispatches(e)):e=null,[i,e]}},gs={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0},ys={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"topBlur topChange topClick topFocus topInput topKeyDown topKeyUp topSelectionChange".split(" ")}},_s=null,bs=null,xs=!1;re.canUseDOM&&(xs=R("input")&&(!document.documentMode||9<document.documentMode));var ws={eventTypes:ys,_isInputEventSupported:xs,extractEvents:function(t,e,n,r){var i=e?Ne.getNodeFromInstance(e):window,o=i.nodeName&&i.nodeName.toLowerCase();if("select"===o||"input"===o&&"file"===i.type)var a=Lt;else if(Ct(i))if(xs)a=Ft;else{a=Dt;var s=Nt}else!(o=i.nodeName)||"input"!==o.toLowerCase()||"checkbox"!==i.type&&"radio"!==i.type||(a=Ut);if(a&&(a=a(t,e)))return At(a,n,r);s&&s(t,i,e),"topBlur"===t&&null!=e&&(t=e._wrapperState||i._wrapperState)&&t.controlled&&"number"===i.type&&(t=""+i.value,i.getAttribute("value")!==t&&i.setAttribute("value",t))}};_t.augmentClass(kt,{view:function(t){return t.view?t.view:(t=w(t)).window===t?t:(t=t.ownerDocument)?t.defaultView||t.parentWindow:window},detail:function(t){return t.detail||0}});var Es={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};kt.augmentClass(Ht,{screenX:null,screenY:null,clientX:null,clientY:null,pageX:null,pageY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:Bt,button:null,buttons:null,relatedTarget:function(t){return t.relatedTarget||(t.fromElement===t.srcElement?t.toElement:t.fromElement)}});var Ms={mouseEnter:{registrationName:"onMouseEnter",dependencies:["topMouseOut","topMouseOver"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["topMouseOut","topMouseOver"]}},Ts={eventTypes:Ms,extractEvents:function(t,e,n,r){if("topMouseOver"===t&&(n.relatedTarget||n.fromElement)||"topMouseOut"!==t&&"topMouseOver"!==t)return null;var i=r.window===r?r:(i=r.ownerDocument)?i.defaultView||i.parentWindow:window;if("topMouseOut"===t?(t=e,e=(e=n.relatedTarget||n.toElement)?Ne.getClosestInstanceFromNode(e):null):t=null,t===e)return null;var o=null==t?i:Ne.getNodeFromInstance(t);i=null==e?i:Ne.getNodeFromInstance(e);var a=Ht.getPooled(Ms.mouseLeave,t,n,r);return a.type="mouseleave",a.target=o,a.relatedTarget=i,n=Ht.getPooled(Ms.mouseEnter,e,n,r),n.type="mouseenter",n.target=i,n.relatedTarget=o,$a.accumulateEnterLeaveDispatches(a,n,t,e),[a,n]}},Ss=Me.DOCUMENT_NODE,Cs=re.canUseDOM&&"documentMode"in document&&11>=document.documentMode,As={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"topBlur topContextMenu topFocus topKeyDown topKeyUp topMouseDown topMouseUp topSelectionChange".split(" ")}},Ps=null,Rs=null,Ls=null,Is=!1,Os=vn.isListeningToAllDependencies,Ns={eventTypes:As,extractEvents:function(t,e,n,r){var i=r.window===r?r.document:r.nodeType===Ss?r:r.ownerDocument;if(!i||!Os("onSelect",i))return null;switch(i=e?Ne.getNodeFromInstance(e):window,t){case"topFocus":(Ct(i)||"true"===i.contentEditable)&&(Ps=i,Rs=e,Ls=null);break;case"topBlur":Ls=Rs=Ps=null;break;case"topMouseDown":Is=!0;break;case"topContextMenu":case"topMouseUp":return Is=!1,Gt(n,r);case"topSelectionChange":if(Cs)break;case"topKeyDown":case"topKeyUp":return Gt(n,r)}return null}};_t.augmentClass(jt,{animationName:null,elapsedTime:null,pseudoElement:null}),_t.augmentClass(Vt,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),kt.augmentClass(Wt,{relatedTarget:null});var Ds={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Us={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"};kt.augmentClass(Xt,{key:function(t){if(t.key){var e=Ds[t.key]||t.key;if("Unidentified"!==e)return e}return"keypress"===t.type?13===(t=qt(t))?"Enter":String.fromCharCode(t):"keydown"===t.type||"keyup"===t.type?Us[t.keyCode]||"Unidentified":""},location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:Bt,charCode:function(t){return"keypress"===t.type?qt(t):0},keyCode:function(t){return"keydown"===t.type||"keyup"===t.type?t.keyCode:0},which:function(t){return"keypress"===t.type?qt(t):"keydown"===t.type||"keyup"===t.type?t.keyCode:0}}),Ht.augmentClass(Yt,{dataTransfer:null}),kt.augmentClass(Kt,{touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:Bt}),_t.augmentClass(Zt,{propertyName:null,elapsedTime:null,pseudoElement:null}),Ht.augmentClass(Jt,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:null,deltaMode:null});var Fs={},ks={};"abort animationEnd animationIteration animationStart blur cancel canPlay canPlayThrough click close contextMenu copy cut doubleClick drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error focus input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing progress rateChange reset scroll seeked seeking stalled submit suspend timeUpdate toggle touchCancel touchEnd touchMove touchStart transitionEnd volumeChange waiting wheel".split(" ").forEach(function(t){var e=t[0].toUpperCase()+t.slice(1),n="on"+e;n={phasedRegistrationNames:{bubbled:n,captured:n+"Capture"},dependencies:[e="top"+e]},Fs[t]=n,ks[e]=n});var zs={eventTypes:Fs,extractEvents:function(t,e,n,i){var o=ks[t];if(!o)return null;switch(t){case"topAbort":case"topCancel":case"topCanPlay":case"topCanPlayThrough":case"topClose":case"topDurationChange":case"topEmptied":case"topEncrypted":case"topEnded":case"topError":case"topInput":case"topInvalid":case"topLoad":case"topLoadedData":case"topLoadedMetadata":case"topLoadStart":case"topPause":case"topPlay":case"topPlaying":case"topProgress":case"topRateChange":case"topReset":case"topSeeked":case"topSeeking":case"topStalled":case"topSubmit":case"topSuspend":case"topTimeUpdate":case"topToggle":case"topVolumeChange":case"topWaiting":var a=_t;break;case"topKeyPress":if(0===qt(n))return null;case"topKeyDown":case"topKeyUp":a=Xt;break;case"topBlur":case"topFocus":a=Wt;break;case"topClick":if(2===n.button)return null;case"topDoubleClick":case"topMouseDown":case"topMouseMove":case"topMouseUp":case"topMouseOut":case"topMouseOver":case"topContextMenu":a=Ht;break;case"topDrag":case"topDragEnd":case"topDragEnter":case"topDragExit":case"topDragLeave":case"topDragOver":case"topDragStart":case"topDrop":a=Yt;break;case"topTouchCancel":case"topTouchEnd":case"topTouchMove":case"topTouchStart":a=Kt;break;case"topAnimationEnd":case"topAnimationIteration":case"topAnimationStart":a=jt;break;case"topTransitionEnd":a=Zt;break;case"topScroll":a=kt;break;case"topWheel":a=Jt;break;case"topCopy":case"topCut":case"topPaste":a=Vt}return a||r("86",t),t=a.getPooled(o,e,n,i),$a.accumulateTwoPhaseDispatches(t),t}};an.setHandleTopLevel(vn.handleTopLevel),un.injection.injectEventPluginOrder("ResponderEventPlugin SimpleEventPlugin TapEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin".split(" ")),Ye.injection.injectComponentTree(Ne),un.injection.injectEventPluginsByName({SimpleEventPlugin:zs,EnterLeaveEventPlugin:Ts,ChangeEventPlugin:ws,SelectEventPlugin:Ns,BeforeInputEventPlugin:vs});var Bs=we.injection.MUST_USE_PROPERTY,Hs=we.injection.HAS_BOOLEAN_VALUE,Gs=we.injection.HAS_NUMERIC_VALUE,js=we.injection.HAS_POSITIVE_NUMERIC_VALUE,Vs=we.injection.HAS_STRING_BOOLEAN_VALUE,Ws={Properties:{allowFullScreen:Hs,allowTransparency:Vs,async:Hs,autoPlay:Hs,capture:Hs,checked:Bs|Hs,cols:js,contentEditable:Vs,controls:Hs,default:Hs,defer:Hs,disabled:Hs,download:we.injection.HAS_OVERLOADED_BOOLEAN_VALUE,draggable:Vs,formNoValidate:Hs,hidden:Hs,loop:Hs,multiple:Bs|Hs,muted:Bs|Hs,noValidate:Hs,open:Hs,playsInline:Hs,readOnly:Hs,required:Hs,reversed:Hs,rows:js,rowSpan:Gs,scoped:Hs,seamless:Hs,selected:Bs|Hs,size:js,start:Gs,span:js,spellCheck:Vs,style:0,itemScope:Hs,acceptCharset:0,className:0,htmlFor:0,httpEquiv:0,value:Vs},DOMAttributeNames:{acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"},DOMMutationMethods:{value:function(t,e){if(null==e)return t.removeAttribute("value");"number"!==t.type||!1===t.hasAttribute("value")?t.setAttribute("value",""+e):t.validity&&!t.validity.badInput&&t.ownerDocument.activeElement!==t&&t.setAttribute("value",""+e)}}},qs=we.injection.HAS_STRING_BOOLEAN_VALUE,Xs={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"},Ys={Properties:{autoReverse:qs,externalResourcesRequired:qs,preserveAlpha:qs},DOMAttributeNames:{autoReverse:"autoReverse",externalResourcesRequired:"externalResourcesRequired",preserveAlpha:"preserveAlpha"},DOMAttributeNamespaces:{xlinkActuate:Xs.xlink,xlinkArcrole:Xs.xlink,xlinkHref:Xs.xlink,xlinkRole:Xs.xlink,xlinkShow:Xs.xlink,xlinkTitle:Xs.xlink,xlinkType:Xs.xlink,xmlBase:Xs.xml,xmlLang:Xs.xml,xmlSpace:Xs.xml}},Ks=/[\-\:]([a-z])/g;"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode x-height xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type xml:base xmlns:xlink xml:lang xml:space".split(" ").forEach(function(t){var e=t.replace(Ks,Qt);Ys.Properties[e]=0,Ys.DOMAttributeNames[e]=t}),we.injection.injectDOMPropertyConfig(Ws),we.injection.injectDOMPropertyConfig(Ys);var Zs=zo.injectInternals,Js=Me.ELEMENT_NODE,Qs=Me.TEXT_NODE,$s=Me.COMMENT_NODE,tu=Me.DOCUMENT_NODE,eu=Me.DOCUMENT_FRAGMENT_NODE,nu=we.ROOT_ATTRIBUTE_NAME,ru=fe.getChildNamespace,iu=$n.createElement,ou=$n.createTextNode,au=$n.setInitialProperties,su=$n.diffProperties,uu=$n.updateProperties,cu=$n.diffHydratedProperties,lu=$n.diffHydratedText,hu=$n.warnForDeletedHydratableElement,pu=$n.warnForDeletedHydratableText,du=$n.warnForInsertedHydratedElement,fu=$n.warnForInsertedHydratedText,mu=Ne.precacheFiberNode,vu=Ne.updateFiberProps;Qe.injection.injectFiberControlledHostComponent($n),ht._injectFiber(function(t){return _u.findHostInstance(t)});var gu=null,yu=null,_u=function(t){var e=t.getPublicInstance,n=(t=rt(t)).scheduleUpdate,r=t.getPriorityContext;return{createContainer:function(t){var e=Qr();return t={current:e,containerInfo:t,isScheduled:!1,nextScheduledRoot:null,context:null,pendingContext:null},e.stateNode=t},updateContainer:function(t,e,i,o){var a=e.current;i=ot(i),null===e.context?e.context=i:e.pendingContext=i,e=o,o=r(a,fr.enableAsyncSubtreeAPI&&null!=t&&null!=t.type&&null!=t.type.prototype&&!0===t.type.prototype.unstable_isAsyncReactComponent),Ua(a,t={element:t},void 0===e?null:e,o),n(a,o)},batchedUpdates:t.batchedUpdates,unbatchedUpdates:t.unbatchedUpdates,deferredUpdates:t.deferredUpdates,flushSync:t.flushSync,getPublicRootInstance:function(t){if(!(t=t.current).child)return null;switch(t.child.tag){case Ba:return e(t.child.stateNode);default:return t.child.stateNode}},findHostInstance:function(t){return null===(t=Ha(t))?null:t.stateNode},findHostInstanceWithNoPortals:function(t){return null===(t=Ga(t))?null:t.stateNode}}}({getRootHostContext:function(t){if(t.nodeType===tu)t=(t=t.documentElement)?t.namespaceURI:ru(null,"");else{var e=t.nodeType===$s?t.parentNode:t;t=e.namespaceURI||null,e=e.tagName,t=ru(t,e)}return t},getChildHostContext:function(t,e){return ru(t,e)},getPublicInstance:function(t){return t},prepareForCommit:function(){gu=vn.isEnabled(),yu=Ya.getSelectionInformation(),vn.setEnabled(!1)},resetAfterCommit:function(){Ya.restoreSelection(yu),yu=null,vn.setEnabled(gu),gu=null},createInstance:function(t,e,n,r,i){return t=iu(t,e,n,r),mu(i,t),vu(t,e),t},appendInitialChild:function(t,e){t.appendChild(e)},finalizeInitialChildren:function(t,e,n,r){au(t,e,n,r);t:{switch(e){case"button":case"input":case"select":case"textarea":t=!!n.autoFocus;break t}t=!1}return t},prepareUpdate:function(t,e,n,r,i){return su(t,e,n,r,i)},commitMount:function(t){t.focus()},commitUpdate:function(t,e,n,r,i){vu(t,i),uu(t,e,n,r,i)},shouldSetTextContent:function(t,e){return"textarea"===t||"string"==typeof e.children||"number"==typeof e.children||"object"==typeof e.dangerouslySetInnerHTML&&null!==e.dangerouslySetInnerHTML&&"string"==typeof e.dangerouslySetInnerHTML.__html},resetTextContent:function(t){t.textContent=""},shouldDeprioritizeSubtree:function(t,e){return!!e.hidden},createTextInstance:function(t,e,n,r){return t=ou(t,e),mu(r,t),t},commitTextUpdate:function(t,e,n){t.nodeValue=n},appendChild:function(t,e){t.appendChild(e)},appendChildToContainer:function(t,e){t.nodeType===$s?t.parentNode.insertBefore(e,t):t.appendChild(e)},insertBefore:function(t,e,n){t.insertBefore(e,n)},insertInContainerBefore:function(t,e,n){t.nodeType===$s?t.parentNode.insertBefore(e,n):t.insertBefore(e,n)},removeChild:function(t,e){t.removeChild(e)},removeChildFromContainer:function(t,e){t.nodeType===$s?t.parentNode.removeChild(e):t.removeChild(e)},canHydrateInstance:function(t,e){return t.nodeType===Js&&e===t.nodeName.toLowerCase()},canHydrateTextInstance:function(t,e){return""!==e&&t.nodeType===Qs},getNextHydratableSibling:function(t){for(t=t.nextSibling;t&&t.nodeType!==Js&&t.nodeType!==Qs;)t=t.nextSibling;return t},getFirstHydratableChild:function(t){for(t=t.firstChild;t&&t.nodeType!==Js&&t.nodeType!==Qs;)t=t.nextSibling;return t},hydrateInstance:function(t,e,n,r,i,o){return mu(o,t),vu(t,n),cu(t,e,n,i,r)},hydrateTextInstance:function(t,e,n){return mu(n,t),lu(t,e)},didNotHydrateInstance:function(t,e){1===e.nodeType?hu(t,e):pu(t,e)},didNotFindHydratableInstance:function(t,e,n){du(t,e,n)},didNotFindHydratableTextInstance:function(t,e){fu(t,e)},scheduleDeferredCallback:dr.rIC,useSyncScheduling:!0});tn.injection.injectFiberBatchedUpdates(_u.batchedUpdates);var bu={createPortal:ee,hydrate:function(t,e,n){return te(null,t,e,!0,n)},render:function(t,e,n){return te(null,t,e,!1,n)},unstable_renderSubtreeIntoContainer:function(t,e,n,i){return null!=t&&De.has(t)||r("38"),te(t,e,n,!1,i)},unmountComponentAtNode:function(t){return $t(t)||r("40"),!!t._reactRootContainer&&(_u.unbatchedUpdates(function(){te(null,null,t,!1,function(){t._reactRootContainer=null})}),!0)},findDOMNode:ht,unstable_createPortal:ee,unstable_batchedUpdates:tn.batchedUpdates,unstable_deferredUpdates:_u.deferredUpdates,flushSync:_u.flushSync,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{EventPluginHub:un,EventPluginRegistry:ye,EventPropagators:$a,ReactControlledComponent:Qe,ReactDOMComponentTree:Ne,ReactDOMEventListener:an}};Zs({findFiberByHostInstance:Ne.getClosestInstanceFromNode,findHostInstanceByFiber:_u.findHostInstance,bundleType:0,version:"16.0.0",rendererPackageName:"react-dom"}),t.exports=bu},191:function(t,e,n){"use strict";var r=function(t){};t.exports=function(t,e,n,i,o,a,s,u){if(r(e),!t){var c;if(void 0===e)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,i,o,a,s,u],h=0;(c=new Error(e.replace(/%s/g,function(){return l[h++]}))).name="Invariant Violation"}throw c.framesToPop=1,c}}},192:function(t,e,n){"use strict";var r=!("undefined"==typeof window||!window.document||!window.document.createElement),i={canUseDOM:r,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:r&&!!window.screen,isInWorker:!r};t.exports=i},193:function(t,e,n){"use strict";/*
object-assign
(c) Sindre Sorhus
@license MIT
*/
var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(e).map(function(t){return e[t]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(t){r[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var n,a,s=function(t){if(null===t||void 0===t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}(t),u=1;u<arguments.length;u++){n=Object(arguments[u]);for(var c in n)i.call(n,c)&&(s[c]=n[c]);if(r){a=r(n);for(var l=0;l<a.length;l++)o.call(n,a[l])&&(s[a[l]]=n[a[l]])}}return s}},194:function(t,e,n){"use strict";var r=n(93),i={listen:function(t,e,n){return t.addEventListener?(t.addEventListener(e,n,!1),{remove:function(){t.removeEventListener(e,n,!1)}}):t.attachEvent?(t.attachEvent("on"+e,n),{remove:function(){t.detachEvent("on"+e,n)}}):void 0},capture:function(t,e,n){return t.addEventListener?(t.addEventListener(e,n,!0),{remove:function(){t.removeEventListener(e,n,!0)}}):{remove:r}},registerDefault:function(){}};t.exports=i},195:function(t,e,n){"use strict";var r={};t.exports=r},196:function(t,e,n){"use strict";function r(t,e){return t===e?0!==t||0!==e||1/t==1/e:t!=t&&e!=e}var i=Object.prototype.hasOwnProperty;t.exports=function(t,e){if(r(t,e))return!0;if("object"!=typeof t||null===t||"object"!=typeof e||null===e)return!1;var n=Object.keys(t),o=Object.keys(e);if(n.length!==o.length)return!1;for(var a=0;a<n.length;a++)if(!i.call(e,n[a])||!r(t[n[a]],e[n[a]]))return!1;return!0}},197:function(t,e,n){"use strict";function r(t,e){return!(!t||!e)&&(t===e||!i(t)&&(i(e)?r(t,e.parentNode):"contains"in t?t.contains(e):!!t.compareDocumentPosition&&!!(16&t.compareDocumentPosition(e))))}var i=n(198);t.exports=r},198:function(t,e,n){"use strict";var r=n(199);t.exports=function(t){return r(t)&&3==t.nodeType}},199:function(t,e,n){"use strict";t.exports=function(t){var e=(t?t.ownerDocument||t:document).defaultView||window;return!(!t||!("function"==typeof e.Node?t instanceof e.Node:"object"==typeof t&&"number"==typeof t.nodeType&&"string"==typeof t.nodeName))}},2:function(t,e,n){t.exports=n(203)()},200:function(t,e,n){"use strict";t.exports=function(t){try{t.focus()}catch(t){}}},201:function(t,e,n){"use strict";t.exports=function(t){if(void 0===(t=t||("undefined"!=typeof document?document:void 0)))return null;try{return t.activeElement||t.body}catch(e){return t.body}}},203:function(t,e,n){"use strict";var r=n(204),i=n(205),o=n(206);t.exports=function(){function t(t,e,n,r,a,s){s!==o&&i(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function e(){return t}t.isRequired=t;var n={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e};return n.checkPropTypes=r,n.PropTypes=n,n}},204:function(t,e,n){"use strict";function r(t){return function(){return t}}var i=function(){};i.thatReturns=r,i.thatReturnsFalse=r(!1),i.thatReturnsTrue=r(!0),i.thatReturnsNull=r(null),i.thatReturnsThis=function(){return this},i.thatReturnsArgument=function(t){return t},t.exports=i},205:function(t,e,n){"use strict";var r=function(t){};t.exports=function(t,e,n,i,o,a,s,u){if(r(e),!t){var c;if(void 0===e)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,i,o,a,s,u],h=0;(c=new Error(e.replace(/%s/g,function(){return l[h++]}))).name="Invariant Violation"}throw c.framesToPop=1,c}}},206:function(t,e,n){"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},218:function(t,e,n){"use strict";var r=n(98),i=n(221),o=n(222),a="[object Null]",s="[object Undefined]",u=r.a?r.a.toStringTag:void 0;e.a=function(t){return null==t?void 0===t?s:a:u&&u in Object(t)?Object(i.a)(t):Object(o.a)(t)}},219:function(t,e,n){"use strict";var r=n(220),i="object"==typeof self&&self&&self.Object===Object&&self,o=r.a||i||Function("return this")();e.a=o},220:function(t,e,n){"use strict";(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.a=n}).call(e,n(34))},221:function(t,e,n){"use strict";var r=n(98),i=Object.prototype,o=i.hasOwnProperty,a=i.toString,s=r.a?r.a.toStringTag:void 0;e.a=function(t){var e=o.call(t,s),n=t[s];try{t[s]=void 0;var r=!0}catch(t){}var i=a.call(t);return r&&(e?t[s]=n:delete t[s]),i}},222:function(t,e,n){"use strict";var r=Object.prototype.toString;e.a=function(t){return r.call(t)}},223:function(t,e,n){"use strict";var r=n(224),i=Object(r.a)(Object.getPrototypeOf,Object);e.a=i},224:function(t,e,n){"use strict";e.a=function(t,e){return function(n){return t(e(n))}}},225:function(t,e,n){"use strict";e.a=function(t){return null!=t&&"object"==typeof t}},226:function(t,e,n){t.exports=n(227)},227:function(t,e,n){"use strict";(function(t,r){Object.defineProperty(e,"__esModule",{value:!0});var i,o=function(t){return t&&t.__esModule?t:{default:t}}(n(229));i="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==t?t:r;var a=(0,o.default)(i);e.default=a}).call(e,n(34),n(228)(t))},228:function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},229:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){var e,n=t.Symbol;return"function"==typeof n?n.observable?e=n.observable:(e=n("observable"),n.observable=e):e="@@observable",e}},230:function(t,e,n){"use strict";function r(t,e){var n=e&&e.type;return"Given action "+(n&&'"'+n.toString()+'"'||"an action")+', reducer "'+t+'" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.'}function i(t){for(var e=Object.keys(t),n={},i=0;i<e.length;i++){var a=e[i];"function"==typeof t[a]&&(n[a]=t[a])}var s=Object.keys(n),u=void 0;try{!function(t){Object.keys(t).forEach(function(e){var n=t[e];if(void 0===n(void 0,{type:o.a.INIT}))throw new Error('Reducer "'+e+"\" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.");if(void 0===n(void 0,{type:"@@redux/PROBE_UNKNOWN_ACTION_"+Math.random().toString(36).substring(7).split("").join(".")}))throw new Error('Reducer "'+e+"\" returned undefined when probed with a random type. Don't try to handle "+o.a.INIT+' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.')})}(n)}catch(t){u=t}return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments[1];if(u)throw u;for(var i=!1,o={},a=0;a<s.length;a++){var c=s[a],l=n[c],h=t[c],p=l(h,e);if(void 0===p){var d=r(c,e);throw new Error(d)}o[c]=p,i=i||p!==h}return i?o:t}}e.a=i;var o=n(97);n(60),n(99)},231:function(t,e,n){"use strict";function r(t,e){return function(){return e(t.apply(void 0,arguments))}}e.a=function(t,e){if("function"==typeof t)return r(t,e);if("object"!=typeof t||null===t)throw new Error("bindActionCreators expected an object or a function, instead received "+(null===t?"null":typeof t)+'. Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?');for(var n=Object.keys(t),i={},o=0;o<n.length;o++){var a=n[o],s=t[a];"function"==typeof s&&(i[a]=r(s,e))}return i}},232:function(t,e,n){"use strict";e.a=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(t){return function(n,o,a){var s=t(n,o,a),u=s.dispatch,c=[],l={getState:s.getState,dispatch:function(t){return u(t)}};return c=e.map(function(t){return t(l)}),u=r.a.apply(void 0,c)(s.dispatch),i({},s,{dispatch:u})}}};var r=n(100),i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}},233:function(t,e,n){"use strict";function r(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"store",n=arguments[1]||e+"Subscription",r=function(t){function r(n,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r);var o=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,n,i));return o[e]=n.store,o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(r,t),r.prototype.getChildContext=function(){var t;return t={},t[e]=this[e],t[n]=null,t},r.prototype.render=function(){return i.Children.only(this.props.children)},r}(i.Component);return r.propTypes={store:s.a.isRequired,children:a.a.element.isRequired},r.childContextTypes=(t={},t[e]=s.a.isRequired,t[n]=s.b,t),r}e.a=r;var i=n(0),o=(n.n(i),n(2)),a=n.n(o),s=n(101);n(62);e.b=r()},234:function(t,e,n){"use strict";var r={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},o=Object.defineProperty,a=Object.getOwnPropertyNames,s=Object.getOwnPropertySymbols,u=Object.getOwnPropertyDescriptor,c=Object.getPrototypeOf,l=c&&c(Object);t.exports=function t(e,n,h){if("string"!=typeof n){if(l){var p=c(n);p&&p!==l&&t(e,p,h)}var d=a(n);s&&(d=d.concat(s(n)));for(var f=0;f<d.length;++f){var m=d[f];if(!(r[m]||i[m]||h&&h[m])){var v=u(n,m);try{o(e,m,v)}catch(t){}}}return e}return e}},235:function(t,e,n){"use strict";n.d(e,"a",function(){return o});var r=null,i={notify:function(){}},o=function(){function t(e,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.store=e,this.parentSub=n,this.onStateChange=r,this.unsubscribe=null,this.listeners=i}return t.prototype.addNestedSub=function(t){return this.trySubscribe(),this.listeners.subscribe(t)},t.prototype.notifyNestedSubs=function(){this.listeners.notify()},t.prototype.isSubscribed=function(){return Boolean(this.unsubscribe)},t.prototype.trySubscribe=function(){this.unsubscribe||(this.unsubscribe=this.parentSub?this.parentSub.addNestedSub(this.onStateChange):this.store.subscribe(this.onStateChange),this.listeners=function(){var t=[],e=[];return{clear:function(){e=r,t=r},notify:function(){for(var n=t=e,r=0;r<n.length;r++)n[r]()},get:function(){return e},subscribe:function(n){var i=!0;return e===t&&(e=t.slice()),e.push(n),function(){i&&t!==r&&(i=!1,e===t&&(e=t.slice()),e.splice(e.indexOf(n),1))}}}}())},t.prototype.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null,this.listeners.clear(),this.listeners=i)},t}()},236:function(t,e,n){"use strict";function r(t,e,n){for(var r=e.length-1;r>=0;r--){var i=e[r](t);if(i)return i}return function(e,r){throw new Error("Invalid value of type "+typeof t+" for "+n+" argument when connecting component "+r.wrappedComponentName+".")}}function i(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.connectHOC,n=void 0===e?o.a:e,i=t.mapStateToPropsFactories,p=void 0===i?u.a:i,d=t.mapDispatchToPropsFactories,f=void 0===d?s.a:d,m=t.mergePropsFactories,v=void 0===m?c.a:m,g=t.selectorFactory,y=void 0===g?l.a:g;return function(t,e,i){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},s=o.pure,u=void 0===s||s,c=o.areStatesEqual,l=void 0===c?function(t,e){return t===e}:c,d=o.areOwnPropsEqual,m=void 0===d?a.a:d,g=o.areStatePropsEqual,_=void 0===g?a.a:g,b=o.areMergedPropsEqual,x=void 0===b?a.a:b,w=function(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}(o,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),E=r(t,p,"mapStateToProps"),M=r(e,f,"mapDispatchToProps"),T=r(i,v,"mergeProps");return n(y,h({methodName:"connect",getDisplayName:function(t){return"Connect("+t+")"},shouldHandleStateChanges:Boolean(t),initMapStateToProps:E,initMapDispatchToProps:M,initMergeProps:T,pure:u,areStatesEqual:l,areOwnPropsEqual:m,areStatePropsEqual:_,areMergedPropsEqual:x},w))}}var o=n(102),a=n(237),s=n(238),u=n(239),c=n(240),l=n(241),h=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t};e.a=i()},237:function(t,e,n){"use strict";function r(t,e){return t===e?0!==t||0!==e||1/t==1/e:t!=t&&e!=e}e.a=function(t,e){if(r(t,e))return!0;if("object"!=typeof t||null===t||"object"!=typeof e||null===e)return!1;var n=Object.keys(t),o=Object.keys(e);if(n.length!==o.length)return!1;for(var a=0;a<n.length;a++)if(!i.call(e,n[a])||!r(t[n[a]],e[n[a]]))return!1;return!0};var i=Object.prototype.hasOwnProperty},238:function(t,e,n){"use strict";var r=n(45),i=n(103);e.a=[function(t){return"function"==typeof t?Object(i.b)(t,"mapDispatchToProps"):void 0},function(t){return t?void 0:Object(i.a)(function(t){return{dispatch:t}})},function(t){return t&&"object"==typeof t?Object(i.a)(function(e){return Object(r.bindActionCreators)(t,e)}):void 0}]},239:function(t,e,n){"use strict";var r=n(103);e.a=[function(t){return"function"==typeof t?Object(r.b)(t,"mapStateToProps"):void 0},function(t){return t?void 0:Object(r.a)(function(){return{}})}]},240:function(t,e,n){"use strict";function r(t,e,n){return i({},n,t,e)}n(104);var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t};e.a=[function(t){return"function"==typeof t?function(t){return function(e,n){n.displayName;var r=n.pure,i=n.areMergedPropsEqual,o=!1,a=void 0;return function(e,n,s){var u=t(e,n,s);return o?r&&i(u,a)||(a=u):(o=!0,a=u),a}}}(t):void 0},function(t){return t?void 0:function(){return r}}]},241:function(t,e,n){"use strict";function r(t,e,n,r,i){function o(i,o){var c=!s(o,h),m=!a(i,l);return l=i,h=o,c&&m?(p=t(l,h),e.dependsOnOwnProps&&(d=e(r,h)),f=n(p,d,h)):c?(t.dependsOnOwnProps&&(p=t(l,h)),e.dependsOnOwnProps&&(d=e(r,h)),f=n(p,d,h)):m?function(){var e=t(l,h),r=!u(e,p);return p=e,r&&(f=n(p,d,h)),f}():f}var a=i.areStatesEqual,s=i.areOwnPropsEqual,u=i.areStatePropsEqual,c=!1,l=void 0,h=void 0,p=void 0,d=void 0,f=void 0;return function(i,a){return c?o(i,a):function(i,o){return l=i,h=o,p=t(l,h),d=e(r,h),f=n(p,d,h),c=!0,f}(i,a)}}function i(t,e){var n=e.initMapStateToProps,i=e.initMapDispatchToProps,o=e.initMergeProps,a=function(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}(e,["initMapStateToProps","initMapDispatchToProps","initMergeProps"]),s=n(t,a),u=i(t,a),c=o(t,a);return(a.pure?r:function(t,e,n,r){return function(i,o){return n(t(i,o),e(r,o),o)}})(s,u,c,t,a)}e.a=i;n(242)},242:function(t,e,n){"use strict";n(62)},30:function(t,e,n){"use strict";function r(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(t){console.error(t)}}r(),t.exports=n(190)},34:function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},45:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(97),i=n(230),o=n(231),a=n(232),s=n(100);n(99);n.d(e,"createStore",function(){return r.b}),n.d(e,"combineReducers",function(){return i.a}),n.d(e,"bindActionCreators",function(){return o.a}),n.d(e,"applyMiddleware",function(){return a.a}),n.d(e,"compose",function(){return s.a})},60:function(t,e,n){"use strict";var r=n(218),i=n(223),o=n(225),a="[object Object]",s=Function.prototype,u=Object.prototype,c=s.toString,l=u.hasOwnProperty,h=c.call(Object);e.a=function(t){if(!Object(o.a)(t)||Object(r.a)(t)!=a)return!1;var e=Object(i.a)(t);if(null===e)return!0;var n=l.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&c.call(n)==h}},61:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(233),i=n(102),o=n(236);n.d(e,"Provider",function(){return r.b}),n.d(e,"createProvider",function(){return r.a}),n.d(e,"connectAdvanced",function(){return i.a}),n.d(e,"connect",function(){return o.a})},62:function(t,e,n){"use strict";e.a=function(t){"undefined"!=typeof console&&"function"==typeof console.error&&console.error(t);try{throw new Error(t)}catch(t){}}},654:function(t,e,n){n(8),n(0),n(30),n(61),n(45),t.exports=n(1)},8:function(t,e,n){!function(e,n){t.exports=n()}(0,function(){"use strict";function t(t,e){e&&(t.prototype=Object.create(e.prototype)),t.prototype.constructor=t}function e(t){return o(t)?t:P(t)}function n(t){return a(t)?t:R(t)}function r(t){return s(t)?t:L(t)}function i(t){return o(t)&&!u(t)?t:I(t)}function o(t){return!(!t||!t[je])}function a(t){return!(!t||!t[Ve])}function s(t){return!(!t||!t[We])}function u(t){return a(t)||s(t)}function c(t){return!(!t||!t[qe])}function l(t){return t.value=!1,t}function h(t){t&&(t.value=!0)}function p(){}function d(t,e){e=e||0;for(var n=Math.max(0,t.length-e),r=new Array(n),i=0;i<n;i++)r[i]=t[i+e];return r}function f(t){return void 0===t.size&&(t.size=t.__iterate(v)),t.size}function m(t,e){if("number"!=typeof e){var n=e>>>0;if(""+n!==e||4294967295===n)return NaN;e=n}return e<0?f(t)+e:e}function v(){return!0}function g(t,e,n){return(0===t||void 0!==n&&t<=-n)&&(void 0===e||void 0!==n&&e>=n)}function y(t,e){return b(t,e,0)}function _(t,e){return b(t,e,e)}function b(t,e,n){return void 0===t?n:t<0?Math.max(0,e+t):void 0===e?t:Math.min(e,t)}function x(t){this.next=t}function w(t,e,n,r){var i=0===t?e:1===t?n:[e,n];return r?r.value=i:r={value:i,done:!1},r}function E(){return{value:void 0,done:!0}}function M(t){return!!C(t)}function T(t){return t&&"function"==typeof t.next}function S(t){var e=C(t);return e&&e.call(t)}function C(t){var e=t&&(nn&&t[nn]||t[rn]);if("function"==typeof e)return e}function A(t){return t&&"number"==typeof t.length}function P(t){return null===t||void 0===t?k():o(t)?t.toSeq():function(t){var e=H(t)||"object"==typeof t&&new N(t);if(!e)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+t);return e}(t)}function R(t){return null===t||void 0===t?k().toKeyedSeq():o(t)?a(t)?t.toSeq():t.fromEntrySeq():z(t)}function L(t){return null===t||void 0===t?k():o(t)?a(t)?t.entrySeq():t.toIndexedSeq():B(t)}function I(t){return(null===t||void 0===t?k():o(t)?a(t)?t.entrySeq():t:B(t)).toSetSeq()}function O(t){this._array=t,this.size=t.length}function N(t){var e=Object.keys(t);this._object=t,this._keys=e,this.size=e.length}function D(t){this._iterable=t,this.size=t.length||t.size}function U(t){this._iterator=t,this._iteratorCache=[]}function F(t){return!(!t||!t[an])}function k(){return sn||(sn=new O([]))}function z(t){var e=Array.isArray(t)?new O(t).fromEntrySeq():T(t)?new U(t).fromEntrySeq():M(t)?new D(t).fromEntrySeq():"object"==typeof t?new N(t):void 0;if(!e)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+t);return e}function B(t){var e=H(t);if(!e)throw new TypeError("Expected Array or iterable object of values: "+t);return e}function H(t){return A(t)?new O(t):T(t)?new U(t):M(t)?new D(t):void 0}function G(t,e,n,r){var i=t._cache;if(i){for(var o=i.length-1,a=0;a<=o;a++){var s=i[n?o-a:a];if(!1===e(s[1],r?s[0]:a,t))return a+1}return a}return t.__iterateUncached(e,n)}function j(t,e,n,r){var i=t._cache;if(i){var o=i.length-1,a=0;return new x(function(){var t=i[n?o-a:a];return a++>o?{value:void 0,done:!0}:w(e,r?t[0]:a-1,t[1])})}return t.__iteratorUncached(e,n)}function V(t,e){return e?W(e,t,"",{"":t}):q(t)}function W(t,e,n,r){return Array.isArray(e)?t.call(r,n,L(e).map(function(n,r){return W(t,n,r,e)})):X(e)?t.call(r,n,R(e).map(function(n,r){return W(t,n,r,e)})):e}function q(t){return Array.isArray(t)?L(t).map(q).toList():X(t)?R(t).map(q).toMap():t}function X(t){return t&&(t.constructor===Object||void 0===t.constructor)}function Y(t,e){if(t===e||t!=t&&e!=e)return!0;if(!t||!e)return!1;if("function"==typeof t.valueOf&&"function"==typeof e.valueOf){if(t=t.valueOf(),e=e.valueOf(),t===e||t!=t&&e!=e)return!0;if(!t||!e)return!1}return!("function"!=typeof t.equals||"function"!=typeof e.equals||!t.equals(e))}function K(t,e){if(t===e)return!0;if(!o(e)||void 0!==t.size&&void 0!==e.size&&t.size!==e.size||void 0!==t.__hash&&void 0!==e.__hash&&t.__hash!==e.__hash||a(t)!==a(e)||s(t)!==s(e)||c(t)!==c(e))return!1;if(0===t.size&&0===e.size)return!0;var n=!u(t);if(c(t)){var r=t.entries();return e.every(function(t,e){var i=r.next().value;return i&&Y(i[1],t)&&(n||Y(i[0],e))})&&r.next().done}var i=!1;if(void 0===t.size)if(void 0===e.size)"function"==typeof t.cacheResult&&t.cacheResult();else{i=!0;var l=t;t=e,e=l}var h=!0,p=e.__iterate(function(e,r){if(n?!t.has(e):i?!Y(e,t.get(r,Ze)):!Y(t.get(r,Ze),e))return h=!1,!1});return h&&t.size===p}function Z(t,e){if(!(this instanceof Z))return new Z(t,e);if(this._value=t,this.size=void 0===e?1/0:Math.max(0,e),0===this.size){if(un)return un;un=this}}function J(t,e){if(!t)throw new Error(e)}function Q(t,e,n){if(!(this instanceof Q))return new Q(t,e,n);if(J(0!==n,"Cannot step a Range by 0"),t=t||0,void 0===e&&(e=1/0),n=void 0===n?1:Math.abs(n),e<t&&(n=-n),this._start=t,this._end=e,this._step=n,this.size=Math.max(0,Math.ceil((e-t)/n-1)+1),0===this.size){if(cn)return cn;cn=this}}function $(){throw TypeError("Abstract")}function tt(){}function et(){}function nt(){}function rt(t){return t>>>1&1073741824|3221225471&t}function it(t){if(!1===t||null===t||void 0===t)return 0;if("function"==typeof t.valueOf&&(!1===(t=t.valueOf())||null===t||void 0===t))return 0;if(!0===t)return 1;var e=typeof t;if("number"===e){if(t!=t||t===1/0)return 0;var n=0|t;for(n!==t&&(n^=4294967295*t);t>4294967295;)n^=t/=4294967295;return rt(n)}if("string"===e)return t.length>gn?function(t){var e=bn[t];void 0===e&&(e=ot(t),_n===yn&&(_n=0,bn={}),_n++,bn[t]=e);return e}(t):ot(t);if("function"==typeof t.hashCode)return t.hashCode();if("object"===e)return function(t){var e;if(fn&&void 0!==(e=ln.get(t)))return e;if(void 0!==(e=t[vn]))return e;if(!dn){if(void 0!==(e=t.propertyIsEnumerable&&t.propertyIsEnumerable[vn]))return e;if(void 0!==(e=function(t){if(t&&t.nodeType>0)switch(t.nodeType){case 1:return t.uniqueID;case 9:return t.documentElement&&t.documentElement.uniqueID}}(t)))return e}e=++mn,1073741824&mn&&(mn=0);if(fn)ln.set(t,e);else{if(void 0!==pn&&!1===pn(t))throw new Error("Non-extensible objects are not allowed as keys.");if(dn)Object.defineProperty(t,vn,{enumerable:!1,configurable:!1,writable:!1,value:e});else if(void 0!==t.propertyIsEnumerable&&t.propertyIsEnumerable===t.constructor.prototype.propertyIsEnumerable)t.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},t.propertyIsEnumerable[vn]=e;else{if(void 0===t.nodeType)throw new Error("Unable to set a non-enumerable property on object.");t[vn]=e}}return e}(t);if("function"==typeof t.toString)return ot(t.toString());throw new Error("Value type "+e+" cannot be hashed.")}function ot(t){for(var e=0,n=0;n<t.length;n++)e=31*e+t.charCodeAt(n)|0;return rt(e)}function at(t){J(t!==1/0,"Cannot perform this action with an infinite size.")}function st(t){return null===t||void 0===t?yt():ut(t)&&!c(t)?t:yt().withMutations(function(e){var r=n(t);at(r.size),r.forEach(function(t,n){return e.set(n,t)})})}function ut(t){return!(!t||!t[xn])}function ct(t,e){this.ownerID=t,this.entries=e}function lt(t,e,n){this.ownerID=t,this.bitmap=e,this.nodes=n}function ht(t,e,n){this.ownerID=t,this.count=e,this.nodes=n}function pt(t,e,n){this.ownerID=t,this.keyHash=e,this.entries=n}function dt(t,e,n){this.ownerID=t,this.keyHash=e,this.entry=n}function ft(t,e,n){this._type=e,this._reverse=n,this._stack=t._root&&vt(t._root)}function mt(t,e){return w(t,e[0],e[1])}function vt(t,e){return{node:t,index:0,__prev:e}}function gt(t,e,n,r){var i=Object.create(wn);return i.size=t,i._root=e,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function yt(){return En||(En=gt(0))}function _t(t,e,n){var r,i;if(t._root){var o=l(Je),a=l(Qe);if(r=bt(t._root,t.__ownerID,0,void 0,e,n,o,a),!a.value)return t;i=t.size+(o.value?n===Ze?-1:1:0)}else{if(n===Ze)return t;i=1,r=new ct(t.__ownerID,[[e,n]])}return t.__ownerID?(t.size=i,t._root=r,t.__hash=void 0,t.__altered=!0,t):r?gt(i,r):yt()}function bt(t,e,n,r,i,o,a,s){return t?t.update(e,n,r,i,o,a,s):o===Ze?t:(h(s),h(a),new dt(e,r,[i,o]))}function xt(t){return t.constructor===dt||t.constructor===pt}function wt(t,e,n,r,i){if(t.keyHash===r)return new pt(e,r,[t.entry,i]);var o,a=(0===n?t.keyHash:t.keyHash>>>n)&Ke,s=(0===n?r:r>>>n)&Ke;return new lt(e,1<<a|1<<s,a===s?[wt(t,e,n+Xe,r,i)]:(o=new dt(e,r,i),a<s?[t,o]:[o,t]))}function Et(t,e,r){for(var i=[],a=0;a<r.length;a++){var s=r[a],u=n(s);o(s)||(u=u.map(function(t){return V(t)})),i.push(u)}return St(t,e,i)}function Mt(t,e,n){return t&&t.mergeDeep&&o(e)?t.mergeDeep(e):Y(t,e)?t:e}function Tt(t){return function(e,n,r){if(e&&e.mergeDeepWith&&o(n))return e.mergeDeepWith(t,n);var i=t(e,n,r);return Y(e,i)?e:i}}function St(t,e,n){return 0===(n=n.filter(function(t){return 0!==t.size})).length?t:0!==t.size||t.__ownerID||1!==n.length?t.withMutations(function(t){for(var r=e?function(n,r){t.update(r,Ze,function(t){return t===Ze?n:e(t,n,r)})}:function(e,n){t.set(n,e)},i=0;i<n.length;i++)n[i].forEach(r)}):t.constructor(n[0])}function Ct(t,e,n,r){var i=t===Ze,o=e.next();if(o.done){var a=i?n:t,s=r(a);return s===a?t:s}J(i||t&&t.set,"invalid keyPath");var u=o.value,c=i?Ze:t.get(u,Ze),l=Ct(c,e,n,r);return l===c?t:l===Ze?t.remove(u):(i?yt():t).set(u,l)}function At(t){return t-=t>>1&1431655765,t=(858993459&t)+(t>>2&858993459),t=t+(t>>4)&252645135,t+=t>>8,127&(t+=t>>16)}function Pt(t,e,n,r){var i=r?t:d(t);return i[e]=n,i}function Rt(t){var e=Dt();if(null===t||void 0===t)return e;if(Lt(t))return t;var n=r(t),i=n.size;return 0===i?e:(at(i),i>0&&i<Ye?Nt(0,i,Xe,null,new It(n.toArray())):e.withMutations(function(t){t.setSize(i),n.forEach(function(e,n){return t.set(n,e)})}))}function Lt(t){return!(!t||!t[Cn])}function It(t,e){this.array=t,this.ownerID=e}function Ot(t,e){function n(t,s,u){return 0===s?function(t,n){var s=n===o?a&&a.array:t&&t.array,u=n>r?0:r-n,c=i-n;c>Ye&&(c=Ye);return function(){if(u===c)return Rn;var t=e?--c:u++;return s&&s[t]}}(t,u):function(t,o,a){var s,u=t&&t.array,c=a>r?0:r-a>>o,l=1+(i-a>>o);l>Ye&&(l=Ye);return function(){for(;;){if(s){var t=s();if(t!==Rn)return t;s=null}if(c===l)return Rn;var r=e?--l:c++;s=n(u&&u[r],o-Xe,a+(r<<o))}}}(t,s,u)}var r=t._origin,i=t._capacity,o=Ht(i),a=t._tail;return n(t._root,t._level,0)}function Nt(t,e,n,r,i,o,a){var s=Object.create(An);return s.size=e-t,s._origin=t,s._capacity=e,s._level=n,s._root=r,s._tail=i,s.__ownerID=o,s.__hash=a,s.__altered=!1,s}function Dt(){return Pn||(Pn=Nt(0,0,Xe))}function Ut(t,e,n,r,i,o){var a=r>>>n&Ke,s=t&&a<t.array.length;if(!s&&void 0===i)return t;var u;if(n>0){var c=t&&t.array[a],l=Ut(c,e,n-Xe,r,i,o);return l===c?t:(u=Ft(t,e),u.array[a]=l,u)}return s&&t.array[a]===i?t:(h(o),u=Ft(t,e),void 0===i&&a===u.array.length-1?u.array.pop():u.array[a]=i,u)}function Ft(t,e){return e&&t&&e===t.ownerID?t:new It(t?t.array.slice():[],e)}function kt(t,e){if(e>=Ht(t._capacity))return t._tail;if(e<1<<t._level+Xe){for(var n=t._root,r=t._level;n&&r>0;)n=n.array[e>>>r&Ke],r-=Xe;return n}}function zt(t,e,n){void 0!==e&&(e|=0),void 0!==n&&(n|=0);var r=t.__ownerID||new p,i=t._origin,o=t._capacity,a=i+e,s=void 0===n?o:n<0?o+n:i+n;if(a===i&&s===o)return t;if(a>=s)return t.clear();for(var u=t._level,c=t._root,l=0;a+l<0;)c=new It(c&&c.array.length?[void 0,c]:[],r),l+=1<<(u+=Xe);l&&(a+=l,i+=l,s+=l,o+=l);for(var h=Ht(o),d=Ht(s);d>=1<<u+Xe;)c=new It(c&&c.array.length?[c]:[],r),u+=Xe;var f=t._tail,m=d<h?kt(t,s-1):d>h?new It([],r):f;if(f&&d>h&&a<o&&f.array.length){for(var v=c=Ft(c,r),g=u;g>Xe;g-=Xe){var y=h>>>g&Ke;v=v.array[y]=Ft(v.array[y],r)}v.array[h>>>Xe&Ke]=f}if(s<o&&(m=m&&m.removeAfter(r,0,s)),a>=d)a-=d,s-=d,u=Xe,c=null,m=m&&m.removeBefore(r,0,a);else if(a>i||d<h){for(l=0;c;){var _=a>>>u&Ke;if(_!==d>>>u&Ke)break;_&&(l+=(1<<u)*_),u-=Xe,c=c.array[_]}c&&a>i&&(c=c.removeBefore(r,u,a-l)),c&&d<h&&(c=c.removeAfter(r,u,d-l)),l&&(a-=l,s-=l)}return t.__ownerID?(t.size=s-a,t._origin=a,t._capacity=s,t._level=u,t._root=c,t._tail=m,t.__hash=void 0,t.__altered=!0,t):Nt(a,s,u,c,m)}function Bt(t,e,n){for(var i=[],a=0,s=0;s<n.length;s++){var u=n[s],c=r(u);c.size>a&&(a=c.size),o(u)||(c=c.map(function(t){return V(t)})),i.push(c)}return a>t.size&&(t=t.setSize(a)),St(t,e,i)}function Ht(t){return t<Ye?0:t-1>>>Xe<<Xe}function Gt(t){return null===t||void 0===t?Wt():jt(t)?t:Wt().withMutations(function(e){var r=n(t);at(r.size),r.forEach(function(t,n){return e.set(n,t)})})}function jt(t){return ut(t)&&c(t)}function Vt(t,e,n,r){var i=Object.create(Gt.prototype);return i.size=t?t.size:0,i._map=t,i._list=e,i.__ownerID=n,i.__hash=r,i}function Wt(){return Ln||(Ln=Vt(yt(),Dt()))}function qt(t,e,n){var r,i,o=t._map,a=t._list,s=o.get(e),u=void 0!==s;if(n===Ze){if(!u)return t;a.size>=Ye&&a.size>=2*o.size?(r=(i=a.filter(function(t,e){return void 0!==t&&s!==e})).toKeyedSeq().map(function(t){return t[0]}).flip().toMap(),t.__ownerID&&(r.__ownerID=i.__ownerID=t.__ownerID)):(r=o.remove(e),i=s===a.size-1?a.pop():a.set(s,void 0))}else if(u){if(n===a.get(s)[1])return t;r=o,i=a.set(s,[e,n])}else r=o.set(e,a.size),i=a.set(a.size,[e,n]);return t.__ownerID?(t.size=r.size,t._map=r,t._list=i,t.__hash=void 0,t):Vt(r,i)}function Xt(t,e){this._iter=t,this._useKeys=e,this.size=t.size}function Yt(t){this._iter=t,this.size=t.size}function Kt(t){this._iter=t,this.size=t.size}function Zt(t){this._iter=t,this.size=t.size}function Jt(t){var e=pe(t);return e._iter=t,e.size=t.size,e.flip=function(){return t},e.reverse=function(){var e=t.reverse.apply(this);return e.flip=function(){return t.reverse()},e},e.has=function(e){return t.includes(e)},e.includes=function(e){return t.has(e)},e.cacheResult=de,e.__iterateUncached=function(e,n){var r=this;return t.__iterate(function(t,n){return!1!==e(n,t,r)},n)},e.__iteratorUncached=function(e,n){if(e===en){var r=t.__iterator(e,n);return new x(function(){var t=r.next();if(!t.done){var e=t.value[0];t.value[0]=t.value[1],t.value[1]=e}return t})}return t.__iterator(e===tn?$e:tn,n)},e}function Qt(t,e,n){var r=pe(t);return r.size=t.size,r.has=function(e){return t.has(e)},r.get=function(r,i){var o=t.get(r,Ze);return o===Ze?i:e.call(n,o,r,t)},r.__iterateUncached=function(r,i){var o=this;return t.__iterate(function(t,i,a){return!1!==r(e.call(n,t,i,a),i,o)},i)},r.__iteratorUncached=function(r,i){var o=t.__iterator(en,i);return new x(function(){var i=o.next();if(i.done)return i;var a=i.value,s=a[0];return w(r,s,e.call(n,a[1],s,t),i)})},r}function $t(t,e){var n=pe(t);return n._iter=t,n.size=t.size,n.reverse=function(){return t},t.flip&&(n.flip=function(){var e=Jt(t);return e.reverse=function(){return t.flip()},e}),n.get=function(n,r){return t.get(e?n:-1-n,r)},n.has=function(n){return t.has(e?n:-1-n)},n.includes=function(e){return t.includes(e)},n.cacheResult=de,n.__iterate=function(e,n){var r=this;return t.__iterate(function(t,n){return e(t,n,r)},!n)},n.__iterator=function(e,n){return t.__iterator(e,!n)},n}function te(t,e,n,r){var i=pe(t);return r&&(i.has=function(r){var i=t.get(r,Ze);return i!==Ze&&!!e.call(n,i,r,t)},i.get=function(r,i){var o=t.get(r,Ze);return o!==Ze&&e.call(n,o,r,t)?o:i}),i.__iterateUncached=function(i,o){var a=this,s=0;return t.__iterate(function(t,o,u){if(e.call(n,t,o,u))return s++,i(t,r?o:s-1,a)},o),s},i.__iteratorUncached=function(i,o){var a=t.__iterator(en,o),s=0;return new x(function(){for(;;){var o=a.next();if(o.done)return o;var u=o.value,c=u[0],l=u[1];if(e.call(n,l,c,t))return w(i,r?c:s++,l,o)}})},i}function ee(t,e,n,r){var i=t.size;if(void 0!==e&&(e|=0),void 0!==n&&(n===1/0?n=i:n|=0),g(e,n,i))return t;var o=y(e,i),a=_(n,i);if(o!=o||a!=a)return ee(t.toSeq().cacheResult(),e,n,r);var s,u=a-o;u==u&&(s=u<0?0:u);var c=pe(t);return c.size=0===s?s:t.size&&s||void 0,!r&&F(t)&&s>=0&&(c.get=function(e,n){return(e=m(this,e))>=0&&e<s?t.get(e+o,n):n}),c.__iterateUncached=function(e,n){var i=this;if(0===s)return 0;if(n)return this.cacheResult().__iterate(e,n);var a=0,u=!0,c=0;return t.__iterate(function(t,n){if(!u||!(u=a++<o))return c++,!1!==e(t,r?n:c-1,i)&&c!==s}),c},c.__iteratorUncached=function(e,n){if(0!==s&&n)return this.cacheResult().__iterator(e,n);var i=0!==s&&t.__iterator(e,n),a=0,u=0;return new x(function(){for(;a++<o;)i.next();if(++u>s)return{value:void 0,done:!0};var t=i.next();return r||e===tn?t:e===$e?w(e,u-1,void 0,t):w(e,u-1,t.value[1],t)})},c}function ne(t,e,n,r){var i=pe(t);return i.__iterateUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterate(i,o);var s=!0,u=0;return t.__iterate(function(t,o,c){if(!s||!(s=e.call(n,t,o,c)))return u++,i(t,r?o:u-1,a)}),u},i.__iteratorUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterator(i,o);var s=t.__iterator(en,o),u=!0,c=0;return new x(function(){var t,o,l;do{if((t=s.next()).done)return r||i===tn?t:i===$e?w(i,c++,void 0,t):w(i,c++,t.value[1],t);var h=t.value;o=h[0],l=h[1],u&&(u=e.call(n,l,o,a))}while(u);return i===en?t:w(i,o,l,t)})},i}function re(t,e,n){var r=pe(t);return r.__iterateUncached=function(r,i){function a(t,c){var l=this;t.__iterate(function(t,i){return(!e||c<e)&&o(t)?a(t,c+1):!1===r(t,n?i:s++,l)&&(u=!0),!u},i)}var s=0,u=!1;return a(t,0),s},r.__iteratorUncached=function(r,i){var a=t.__iterator(r,i),s=[],u=0;return new x(function(){for(;a;){var t=a.next();if(!1===t.done){var c=t.value;if(r===en&&(c=c[1]),e&&!(s.length<e)||!o(c))return n?t:w(r,u++,c,t);s.push(a),a=c.__iterator(r,i)}else a=s.pop()}return{value:void 0,done:!0}})},r}function ie(t,e,n){e||(e=fe);var r=a(t),i=0,o=t.toSeq().map(function(e,r){return[r,e,i++,n?n(e,r,t):e]}).toArray();return o.sort(function(t,n){return e(t[3],n[3])||t[2]-n[2]}).forEach(r?function(t,e){o[e].length=2}:function(t,e){o[e]=t[1]}),r?R(o):s(t)?L(o):I(o)}function oe(t,e,n){if(e||(e=fe),n){var r=t.toSeq().map(function(e,r){return[e,n(e,r,t)]}).reduce(function(t,n){return ae(e,t[1],n[1])?n:t});return r&&r[0]}return t.reduce(function(t,n){return ae(e,t,n)?n:t})}function ae(t,e,n){var r=t(n,e);return 0===r&&n!==e&&(void 0===n||null===n||n!=n)||r>0}function se(t,n,r){var i=pe(t);return i.size=new O(r).map(function(t){return t.size}).min(),i.__iterate=function(t,e){for(var n,r=this.__iterator(tn,e),i=0;!(n=r.next()).done&&!1!==t(n.value,i++,this););return i},i.__iteratorUncached=function(t,i){var o=r.map(function(t){return t=e(t),S(i?t.reverse():t)}),a=0,s=!1;return new x(function(){var e;return s||(e=o.map(function(t){return t.next()}),s=e.some(function(t){return t.done})),s?{value:void 0,done:!0}:w(t,a++,n.apply(null,e.map(function(t){return t.value})))})},i}function ue(t,e){return F(t)?e:t.constructor(e)}function ce(t){if(t!==Object(t))throw new TypeError("Expected [K, V] tuple: "+t)}function le(t){return at(t.size),f(t)}function he(t){return a(t)?n:s(t)?r:i}function pe(t){return Object.create((a(t)?R:s(t)?L:I).prototype)}function de(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):P.prototype.cacheResult.call(this)}function fe(t,e){return t>e?1:t<e?-1:0}function me(t){var n=S(t);if(!n){if(!A(t))throw new TypeError("Expected iterable or array-like: "+t);n=S(e(t))}return n}function ve(t,e){var n,r=function(o){if(o instanceof r)return o;if(!(this instanceof r))return new r(o);if(!n){n=!0;var a=Object.keys(t);!function(t,e){try{e.forEach(function(t,e){Object.defineProperty(t,e,{get:function(){return this.get(e)},set:function(t){J(this.__ownerID,"Cannot set on an immutable record."),this.set(e,t)}})}.bind(void 0,t))}catch(t){}}(i,a),i.size=a.length,i._name=e,i._keys=a,i._defaultValues=t}this._map=st(o)},i=r.prototype=Object.create(In);return i.constructor=r,r}function ge(t,e,n){var r=Object.create(Object.getPrototypeOf(t));return r._map=e,r.__ownerID=n,r}function ye(t){return t._name||t.constructor.name||"Record"}function _e(t){return null===t||void 0===t?Ee():be(t)&&!c(t)?t:Ee().withMutations(function(e){var n=i(t);at(n.size),n.forEach(function(t){return e.add(t)})})}function be(t){return!(!t||!t[On])}function xe(t,e){return t.__ownerID?(t.size=e.size,t._map=e,t):e===t._map?t:0===e.size?t.__empty():t.__make(e)}function we(t,e){var n=Object.create(Nn);return n.size=t?t.size:0,n._map=t,n.__ownerID=e,n}function Ee(){return Dn||(Dn=we(yt()))}function Me(t){return null===t||void 0===t?Ce():Te(t)?t:Ce().withMutations(function(e){var n=i(t);at(n.size),n.forEach(function(t){return e.add(t)})})}function Te(t){return be(t)&&c(t)}function Se(t,e){var n=Object.create(Un);return n.size=t?t.size:0,n._map=t,n.__ownerID=e,n}function Ce(){return Fn||(Fn=Se(Wt()))}function Ae(t){return null===t||void 0===t?Le():Pe(t)?t:Le().unshiftAll(t)}function Pe(t){return!(!t||!t[kn])}function Re(t,e,n,r){var i=Object.create(zn);return i.size=t,i._head=e,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function Le(){return Bn||(Bn=Re(0))}function Ie(t,e){var n=function(n){t.prototype[n]=e[n]};return Object.keys(e).forEach(n),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(e).forEach(n),t}function Oe(t,e){return e}function Ne(t,e){return[e,t]}function De(t){return function(){return!t.apply(this,arguments)}}function Ue(t){return function(){return-t.apply(this,arguments)}}function Fe(t){return"string"==typeof t?JSON.stringify(t):String(t)}function ke(){return d(arguments)}function ze(t,e){return t<e?1:t>e?-1:0}function Be(t){if(t.size===1/0)return 0;var e=c(t),n=a(t),r=e?1:0;return function(t,e){return e=hn(e,3432918353),e=hn(e<<15|e>>>-15,461845907),e=hn(e<<13|e>>>-13,5),e=(e+3864292196|0)^t,e=hn(e^e>>>16,2246822507),e=hn(e^e>>>13,3266489909),e=rt(e^e>>>16)}(t.__iterate(n?e?function(t,e){r=31*r+He(it(t),it(e))|0}:function(t,e){r=r+He(it(t),it(e))|0}:e?function(t){r=31*r+it(t)|0}:function(t){r=r+it(t)|0}),r)}function He(t,e){return t^e+2654435769+(t<<6)+(t>>2)|0}var Ge=Array.prototype.slice;t(n,e),t(r,e),t(i,e),e.isIterable=o,e.isKeyed=a,e.isIndexed=s,e.isAssociative=u,e.isOrdered=c,e.Keyed=n,e.Indexed=r,e.Set=i;var je="@@__IMMUTABLE_ITERABLE__@@",Ve="@@__IMMUTABLE_KEYED__@@",We="@@__IMMUTABLE_INDEXED__@@",qe="@@__IMMUTABLE_ORDERED__@@",Xe=5,Ye=1<<Xe,Ke=Ye-1,Ze={},Je={value:!1},Qe={value:!1},$e=0,tn=1,en=2,nn="function"==typeof Symbol&&Symbol.iterator,rn="@@iterator",on=nn||rn;x.prototype.toString=function(){return"[Iterator]"},x.KEYS=$e,x.VALUES=tn,x.ENTRIES=en,x.prototype.inspect=x.prototype.toSource=function(){return this.toString()},x.prototype[on]=function(){return this},t(P,e),P.of=function(){return P(arguments)},P.prototype.toSeq=function(){return this},P.prototype.toString=function(){return this.__toString("Seq {","}")},P.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},P.prototype.__iterate=function(t,e){return G(this,t,e,!0)},P.prototype.__iterator=function(t,e){return j(this,t,e,!0)},t(R,P),R.prototype.toKeyedSeq=function(){return this},t(L,P),L.of=function(){return L(arguments)},L.prototype.toIndexedSeq=function(){return this},L.prototype.toString=function(){return this.__toString("Seq [","]")},L.prototype.__iterate=function(t,e){return G(this,t,e,!1)},L.prototype.__iterator=function(t,e){return j(this,t,e,!1)},t(I,P),I.of=function(){return I(arguments)},I.prototype.toSetSeq=function(){return this},P.isSeq=F,P.Keyed=R,P.Set=I,P.Indexed=L;var an="@@__IMMUTABLE_SEQ__@@";P.prototype[an]=!0,t(O,L),O.prototype.get=function(t,e){return this.has(t)?this._array[m(this,t)]:e},O.prototype.__iterate=function(t,e){for(var n=this._array,r=n.length-1,i=0;i<=r;i++)if(!1===t(n[e?r-i:i],i,this))return i+1;return i},O.prototype.__iterator=function(t,e){var n=this._array,r=n.length-1,i=0;return new x(function(){return i>r?{value:void 0,done:!0}:w(t,i,n[e?r-i++:i++])})},t(N,R),N.prototype.get=function(t,e){return void 0===e||this.has(t)?this._object[t]:e},N.prototype.has=function(t){return this._object.hasOwnProperty(t)},N.prototype.__iterate=function(t,e){for(var n=this._object,r=this._keys,i=r.length-1,o=0;o<=i;o++){var a=r[e?i-o:o];if(!1===t(n[a],a,this))return o+1}return o},N.prototype.__iterator=function(t,e){var n=this._object,r=this._keys,i=r.length-1,o=0;return new x(function(){var a=r[e?i-o:o];return o++>i?{value:void 0,done:!0}:w(t,a,n[a])})},N.prototype[qe]=!0,t(D,L),D.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);var n=S(this._iterable),r=0;if(T(n))for(var i;!(i=n.next()).done&&!1!==t(i.value,r++,this););return r},D.prototype.__iteratorUncached=function(t,e){if(e)return this.cacheResult().__iterator(t,e);var n=S(this._iterable);if(!T(n))return new x(E);var r=0;return new x(function(){var e=n.next();return e.done?e:w(t,r++,e.value)})},t(U,L),U.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);for(var n=this._iterator,r=this._iteratorCache,i=0;i<r.length;)if(!1===t(r[i],i++,this))return i;for(var o;!(o=n.next()).done;){var a=o.value;if(r[i]=a,!1===t(a,i++,this))break}return i},U.prototype.__iteratorUncached=function(t,e){if(e)return this.cacheResult().__iterator(t,e);var n=this._iterator,r=this._iteratorCache,i=0;return new x(function(){if(i>=r.length){var e=n.next();if(e.done)return e;r[i]=e.value}return w(t,i,r[i++])})};var sn;t(Z,L),Z.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},Z.prototype.get=function(t,e){return this.has(t)?this._value:e},Z.prototype.includes=function(t){return Y(this._value,t)},Z.prototype.slice=function(t,e){var n=this.size;return g(t,e,n)?this:new Z(this._value,_(e,n)-y(t,n))},Z.prototype.reverse=function(){return this},Z.prototype.indexOf=function(t){return Y(this._value,t)?0:-1},Z.prototype.lastIndexOf=function(t){return Y(this._value,t)?this.size:-1},Z.prototype.__iterate=function(t,e){for(var n=0;n<this.size;n++)if(!1===t(this._value,n,this))return n+1;return n},Z.prototype.__iterator=function(t,e){var n=this,r=0;return new x(function(){return r<n.size?w(t,r++,n._value):{value:void 0,done:!0}})},Z.prototype.equals=function(t){return t instanceof Z?Y(this._value,t._value):K(t)};var un;t(Q,L),Q.prototype.toString=function(){return 0===this.size?"Range []":"Range [ "+this._start+"..."+this._end+(1!==this._step?" by "+this._step:"")+" ]"},Q.prototype.get=function(t,e){return this.has(t)?this._start+m(this,t)*this._step:e},Q.prototype.includes=function(t){var e=(t-this._start)/this._step;return e>=0&&e<this.size&&e===Math.floor(e)},Q.prototype.slice=function(t,e){return g(t,e,this.size)?this:(t=y(t,this.size),(e=_(e,this.size))<=t?new Q(0,0):new Q(this.get(t,this._end),this.get(e,this._end),this._step))},Q.prototype.indexOf=function(t){var e=t-this._start;if(e%this._step==0){var n=e/this._step;if(n>=0&&n<this.size)return n}return-1},Q.prototype.lastIndexOf=function(t){return this.indexOf(t)},Q.prototype.__iterate=function(t,e){for(var n=this.size-1,r=this._step,i=e?this._start+n*r:this._start,o=0;o<=n;o++){if(!1===t(i,o,this))return o+1;i+=e?-r:r}return o},Q.prototype.__iterator=function(t,e){var n=this.size-1,r=this._step,i=e?this._start+n*r:this._start,o=0;return new x(function(){var a=i;return i+=e?-r:r,o>n?{value:void 0,done:!0}:w(t,o++,a)})},Q.prototype.equals=function(t){return t instanceof Q?this._start===t._start&&this._end===t._end&&this._step===t._step:K(this,t)};var cn;t($,e),t(tt,$),t(et,$),t(nt,$),$.Keyed=tt,$.Indexed=et,$.Set=nt;var ln,hn="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(t,e){var n=65535&(t|=0),r=65535&(e|=0);return n*r+((t>>>16)*r+n*(e>>>16)<<16>>>0)|0},pn=Object.isExtensible,dn=function(){try{return Object.defineProperty({},"@",{}),!0}catch(t){return!1}}(),fn="function"==typeof WeakMap;fn&&(ln=new WeakMap);var mn=0,vn="__immutablehash__";"function"==typeof Symbol&&(vn=Symbol(vn));var gn=16,yn=255,_n=0,bn={};t(st,tt),st.of=function(){var t=Ge.call(arguments,0);return yt().withMutations(function(e){for(var n=0;n<t.length;n+=2){if(n+1>=t.length)throw new Error("Missing value for key: "+t[n]);e.set(t[n],t[n+1])}})},st.prototype.toString=function(){return this.__toString("Map {","}")},st.prototype.get=function(t,e){return this._root?this._root.get(0,void 0,t,e):e},st.prototype.set=function(t,e){return _t(this,t,e)},st.prototype.setIn=function(t,e){return this.updateIn(t,Ze,function(){return e})},st.prototype.remove=function(t){return _t(this,t,Ze)},st.prototype.deleteIn=function(t){return this.updateIn(t,function(){return Ze})},st.prototype.update=function(t,e,n){return 1===arguments.length?t(this):this.updateIn([t],e,n)},st.prototype.updateIn=function(t,e,n){n||(n=e,e=void 0);var r=Ct(this,me(t),e,n);return r===Ze?void 0:r},st.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):yt()},st.prototype.merge=function(){return Et(this,void 0,arguments)},st.prototype.mergeWith=function(t){return Et(this,t,Ge.call(arguments,1))},st.prototype.mergeIn=function(t){var e=Ge.call(arguments,1);return this.updateIn(t,yt(),function(t){return"function"==typeof t.merge?t.merge.apply(t,e):e[e.length-1]})},st.prototype.mergeDeep=function(){return Et(this,Mt,arguments)},st.prototype.mergeDeepWith=function(t){var e=Ge.call(arguments,1);return Et(this,Tt(t),e)},st.prototype.mergeDeepIn=function(t){var e=Ge.call(arguments,1);return this.updateIn(t,yt(),function(t){return"function"==typeof t.mergeDeep?t.mergeDeep.apply(t,e):e[e.length-1]})},st.prototype.sort=function(t){return Gt(ie(this,t))},st.prototype.sortBy=function(t,e){return Gt(ie(this,e,t))},st.prototype.withMutations=function(t){var e=this.asMutable();return t(e),e.wasAltered()?e.__ensureOwner(this.__ownerID):this},st.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new p)},st.prototype.asImmutable=function(){return this.__ensureOwner()},st.prototype.wasAltered=function(){return this.__altered},st.prototype.__iterator=function(t,e){return new ft(this,t,e)},st.prototype.__iterate=function(t,e){var n=this,r=0;return this._root&&this._root.iterate(function(e){return r++,t(e[1],e[0],n)},e),r},st.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?gt(this.size,this._root,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)},st.isMap=ut;var xn="@@__IMMUTABLE_MAP__@@",wn=st.prototype;wn[xn]=!0,wn.delete=wn.remove,wn.removeIn=wn.deleteIn,ct.prototype.get=function(t,e,n,r){for(var i=this.entries,o=0,a=i.length;o<a;o++)if(Y(n,i[o][0]))return i[o][1];return r},ct.prototype.update=function(t,e,n,r,i,o,a){for(var s=i===Ze,u=this.entries,c=0,l=u.length;c<l&&!Y(r,u[c][0]);c++);var f=c<l;if(f?u[c][1]===i:s)return this;if(h(a),(s||!f)&&h(o),!s||1!==u.length){if(!f&&!s&&u.length>=Mn)return function(t,e,n,r){t||(t=new p);for(var i=new dt(t,it(n),[n,r]),o=0;o<e.length;o++){var a=e[o];i=i.update(t,0,void 0,a[0],a[1])}return i}(t,u,r,i);var m=t&&t===this.ownerID,v=m?u:d(u);return f?s?c===l-1?v.pop():v[c]=v.pop():v[c]=[r,i]:v.push([r,i]),m?(this.entries=v,this):new ct(t,v)}},lt.prototype.get=function(t,e,n,r){void 0===e&&(e=it(n));var i=1<<((0===t?e:e>>>t)&Ke),o=this.bitmap;return 0==(o&i)?r:this.nodes[At(o&i-1)].get(t+Xe,e,n,r)},lt.prototype.update=function(t,e,n,r,i,o,a){void 0===n&&(n=it(r));var s=(0===e?n:n>>>e)&Ke,u=1<<s,c=this.bitmap,l=0!=(c&u);if(!l&&i===Ze)return this;var h=At(c&u-1),p=this.nodes,d=l?p[h]:void 0,f=bt(d,t,e+Xe,n,r,i,o,a);if(f===d)return this;if(!l&&f&&p.length>=Tn)return function(t,e,n,r,i){for(var o=0,a=new Array(Ye),s=0;0!==n;s++,n>>>=1)a[s]=1&n?e[o++]:void 0;return a[r]=i,new ht(t,o+1,a)}(t,p,c,s,f);if(l&&!f&&2===p.length&&xt(p[1^h]))return p[1^h];if(l&&f&&1===p.length&&xt(f))return f;var m=t&&t===this.ownerID,v=l?f?c:c^u:c|u,g=l?f?Pt(p,h,f,m):function(t,e,n){var r=t.length-1;if(n&&e===r)return t.pop(),t;for(var i=new Array(r),o=0,a=0;a<r;a++)a===e&&(o=1),i[a]=t[a+o];return i}(p,h,m):function(t,e,n,r){var i=t.length+1;if(r&&e+1===i)return t[e]=n,t;for(var o=new Array(i),a=0,s=0;s<i;s++)s===e?(o[s]=n,a=-1):o[s]=t[s+a];return o}(p,h,f,m);return m?(this.bitmap=v,this.nodes=g,this):new lt(t,v,g)},ht.prototype.get=function(t,e,n,r){void 0===e&&(e=it(n));var i=(0===t?e:e>>>t)&Ke,o=this.nodes[i];return o?o.get(t+Xe,e,n,r):r},ht.prototype.update=function(t,e,n,r,i,o,a){void 0===n&&(n=it(r));var s=(0===e?n:n>>>e)&Ke,u=i===Ze,c=this.nodes,l=c[s];if(u&&!l)return this;var h=bt(l,t,e+Xe,n,r,i,o,a);if(h===l)return this;var p=this.count;if(l){if(!h&&--p<Sn)return function(t,e,n,r){for(var i=0,o=0,a=new Array(n),s=0,u=1,c=e.length;s<c;s++,u<<=1){var l=e[s];void 0!==l&&s!==r&&(i|=u,a[o++]=l)}return new lt(t,i,a)}(t,c,p,s)}else p++;var d=t&&t===this.ownerID,f=Pt(c,s,h,d);return d?(this.count=p,this.nodes=f,this):new ht(t,p,f)},pt.prototype.get=function(t,e,n,r){for(var i=this.entries,o=0,a=i.length;o<a;o++)if(Y(n,i[o][0]))return i[o][1];return r},pt.prototype.update=function(t,e,n,r,i,o,a){void 0===n&&(n=it(r));var s=i===Ze;if(n!==this.keyHash)return s?this:(h(a),h(o),wt(this,t,e,n,[r,i]));for(var u=this.entries,c=0,l=u.length;c<l&&!Y(r,u[c][0]);c++);var p=c<l;if(p?u[c][1]===i:s)return this;if(h(a),(s||!p)&&h(o),s&&2===l)return new dt(t,this.keyHash,u[1^c]);var f=t&&t===this.ownerID,m=f?u:d(u);return p?s?c===l-1?m.pop():m[c]=m.pop():m[c]=[r,i]:m.push([r,i]),f?(this.entries=m,this):new pt(t,this.keyHash,m)},dt.prototype.get=function(t,e,n,r){return Y(n,this.entry[0])?this.entry[1]:r},dt.prototype.update=function(t,e,n,r,i,o,a){var s=i===Ze,u=Y(r,this.entry[0]);return(u?i===this.entry[1]:s)?this:(h(a),s?void h(o):u?t&&t===this.ownerID?(this.entry[1]=i,this):new dt(t,this.keyHash,[r,i]):(h(o),wt(this,t,e,it(r),[r,i])))},ct.prototype.iterate=pt.prototype.iterate=function(t,e){for(var n=this.entries,r=0,i=n.length-1;r<=i;r++)if(!1===t(n[e?i-r:r]))return!1},lt.prototype.iterate=ht.prototype.iterate=function(t,e){for(var n=this.nodes,r=0,i=n.length-1;r<=i;r++){var o=n[e?i-r:r];if(o&&!1===o.iterate(t,e))return!1}},dt.prototype.iterate=function(t,e){return t(this.entry)},t(ft,x),ft.prototype.next=function(){for(var t=this._type,e=this._stack;e;){var n,r=e.node,i=e.index++;if(r.entry){if(0===i)return mt(t,r.entry)}else if(r.entries){if(n=r.entries.length-1,i<=n)return mt(t,r.entries[this._reverse?n-i:i])}else if(n=r.nodes.length-1,i<=n){var o=r.nodes[this._reverse?n-i:i];if(o){if(o.entry)return mt(t,o.entry);e=this._stack=vt(o,e)}continue}e=this._stack=this._stack.__prev}return{value:void 0,done:!0}};var En,Mn=Ye/4,Tn=Ye/2,Sn=Ye/4;t(Rt,et),Rt.of=function(){return this(arguments)},Rt.prototype.toString=function(){return this.__toString("List [","]")},Rt.prototype.get=function(t,e){if((t=m(this,t))>=0&&t<this.size){var n=kt(this,t+=this._origin);return n&&n.array[t&Ke]}return e},Rt.prototype.set=function(t,e){return function(t,e,n){if((e=m(t,e))!=e)return t;if(e>=t.size||e<0)return t.withMutations(function(t){e<0?zt(t,e).set(0,n):zt(t,0,e+1).set(e,n)});e+=t._origin;var r=t._tail,i=t._root,o=l(Qe);return e>=Ht(t._capacity)?r=Ut(r,t.__ownerID,0,e,n,o):i=Ut(i,t.__ownerID,t._level,e,n,o),o.value?t.__ownerID?(t._root=i,t._tail=r,t.__hash=void 0,t.__altered=!0,t):Nt(t._origin,t._capacity,t._level,i,r):t}(this,t,e)},Rt.prototype.remove=function(t){return this.has(t)?0===t?this.shift():t===this.size-1?this.pop():this.splice(t,1):this},Rt.prototype.insert=function(t,e){return this.splice(t,0,e)},Rt.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=Xe,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):Dt()},Rt.prototype.push=function(){var t=arguments,e=this.size;return this.withMutations(function(n){zt(n,0,e+t.length);for(var r=0;r<t.length;r++)n.set(e+r,t[r])})},Rt.prototype.pop=function(){return zt(this,0,-1)},Rt.prototype.unshift=function(){var t=arguments;return this.withMutations(function(e){zt(e,-t.length);for(var n=0;n<t.length;n++)e.set(n,t[n])})},Rt.prototype.shift=function(){return zt(this,1)},Rt.prototype.merge=function(){return Bt(this,void 0,arguments)},Rt.prototype.mergeWith=function(t){return Bt(this,t,Ge.call(arguments,1))},Rt.prototype.mergeDeep=function(){return Bt(this,Mt,arguments)},Rt.prototype.mergeDeepWith=function(t){var e=Ge.call(arguments,1);return Bt(this,Tt(t),e)},Rt.prototype.setSize=function(t){return zt(this,0,t)},Rt.prototype.slice=function(t,e){var n=this.size;return g(t,e,n)?this:zt(this,y(t,n),_(e,n))},Rt.prototype.__iterator=function(t,e){var n=0,r=Ot(this,e);return new x(function(){var e=r();return e===Rn?{value:void 0,done:!0}:w(t,n++,e)})},Rt.prototype.__iterate=function(t,e){for(var n,r=0,i=Ot(this,e);(n=i())!==Rn&&!1!==t(n,r++,this););return r},Rt.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?Nt(this._origin,this._capacity,this._level,this._root,this._tail,t,this.__hash):(this.__ownerID=t,this)},Rt.isList=Lt;var Cn="@@__IMMUTABLE_LIST__@@",An=Rt.prototype;An[Cn]=!0,An.delete=An.remove,An.setIn=wn.setIn,An.deleteIn=An.removeIn=wn.removeIn,An.update=wn.update,An.updateIn=wn.updateIn,An.mergeIn=wn.mergeIn,An.mergeDeepIn=wn.mergeDeepIn,An.withMutations=wn.withMutations,An.asMutable=wn.asMutable,An.asImmutable=wn.asImmutable,An.wasAltered=wn.wasAltered,It.prototype.removeBefore=function(t,e,n){if(n===e?1<<e:0===this.array.length)return this;var r=n>>>e&Ke;if(r>=this.array.length)return new It([],t);var i,o=0===r;if(e>0){var a=this.array[r];if((i=a&&a.removeBefore(t,e-Xe,n))===a&&o)return this}if(o&&!i)return this;var s=Ft(this,t);if(!o)for(var u=0;u<r;u++)s.array[u]=void 0;return i&&(s.array[r]=i),s},It.prototype.removeAfter=function(t,e,n){if(n===(e?1<<e:0)||0===this.array.length)return this;var r=n-1>>>e&Ke;if(r>=this.array.length)return this;var i;if(e>0){var o=this.array[r];if((i=o&&o.removeAfter(t,e-Xe,n))===o&&r===this.array.length-1)return this}var a=Ft(this,t);return a.array.splice(r+1),i&&(a.array[r]=i),a};var Pn,Rn={};t(Gt,st),Gt.of=function(){return this(arguments)},Gt.prototype.toString=function(){return this.__toString("OrderedMap {","}")},Gt.prototype.get=function(t,e){var n=this._map.get(t);return void 0!==n?this._list.get(n)[1]:e},Gt.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):Wt()},Gt.prototype.set=function(t,e){return qt(this,t,e)},Gt.prototype.remove=function(t){return qt(this,t,Ze)},Gt.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},Gt.prototype.__iterate=function(t,e){var n=this;return this._list.__iterate(function(e){return e&&t(e[1],e[0],n)},e)},Gt.prototype.__iterator=function(t,e){return this._list.fromEntrySeq().__iterator(t,e)},Gt.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t),n=this._list.__ensureOwner(t);return t?Vt(e,n,t,this.__hash):(this.__ownerID=t,this._map=e,this._list=n,this)},Gt.isOrderedMap=jt,Gt.prototype[qe]=!0,Gt.prototype.delete=Gt.prototype.remove;var Ln;t(Xt,R),Xt.prototype.get=function(t,e){return this._iter.get(t,e)},Xt.prototype.has=function(t){return this._iter.has(t)},Xt.prototype.valueSeq=function(){return this._iter.valueSeq()},Xt.prototype.reverse=function(){var t=this,e=$t(this,!0);return this._useKeys||(e.valueSeq=function(){return t._iter.toSeq().reverse()}),e},Xt.prototype.map=function(t,e){var n=this,r=Qt(this,t,e);return this._useKeys||(r.valueSeq=function(){return n._iter.toSeq().map(t,e)}),r},Xt.prototype.__iterate=function(t,e){var n,r=this;return this._iter.__iterate(this._useKeys?function(e,n){return t(e,n,r)}:(n=e?le(this):0,function(i){return t(i,e?--n:n++,r)}),e)},Xt.prototype.__iterator=function(t,e){if(this._useKeys)return this._iter.__iterator(t,e);var n=this._iter.__iterator(tn,e),r=e?le(this):0;return new x(function(){var i=n.next();return i.done?i:w(t,e?--r:r++,i.value,i)})},Xt.prototype[qe]=!0,t(Yt,L),Yt.prototype.includes=function(t){return this._iter.includes(t)},Yt.prototype.__iterate=function(t,e){var n=this,r=0;return this._iter.__iterate(function(e){return t(e,r++,n)},e)},Yt.prototype.__iterator=function(t,e){var n=this._iter.__iterator(tn,e),r=0;return new x(function(){var e=n.next();return e.done?e:w(t,r++,e.value,e)})},t(Kt,I),Kt.prototype.has=function(t){return this._iter.includes(t)},Kt.prototype.__iterate=function(t,e){var n=this;return this._iter.__iterate(function(e){return t(e,e,n)},e)},Kt.prototype.__iterator=function(t,e){var n=this._iter.__iterator(tn,e);return new x(function(){var e=n.next();return e.done?e:w(t,e.value,e.value,e)})},t(Zt,R),Zt.prototype.entrySeq=function(){return this._iter.toSeq()},Zt.prototype.__iterate=function(t,e){var n=this;return this._iter.__iterate(function(e){if(e){ce(e);var r=o(e);return t(r?e.get(1):e[1],r?e.get(0):e[0],n)}},e)},Zt.prototype.__iterator=function(t,e){var n=this._iter.__iterator(tn,e);return new x(function(){for(;;){var e=n.next();if(e.done)return e;var r=e.value;if(r){ce(r);var i=o(r);return w(t,i?r.get(0):r[0],i?r.get(1):r[1],e)}}})},Yt.prototype.cacheResult=Xt.prototype.cacheResult=Kt.prototype.cacheResult=Zt.prototype.cacheResult=de,t(ve,tt),ve.prototype.toString=function(){return this.__toString(ye(this)+" {","}")},ve.prototype.has=function(t){return this._defaultValues.hasOwnProperty(t)},ve.prototype.get=function(t,e){if(!this.has(t))return e;var n=this._defaultValues[t];return this._map?this._map.get(t,n):n},ve.prototype.clear=function(){if(this.__ownerID)return this._map&&this._map.clear(),this;var t=this.constructor;return t._empty||(t._empty=ge(this,yt()))},ve.prototype.set=function(t,e){if(!this.has(t))throw new Error('Cannot set unknown key "'+t+'" on '+ye(this));if(this._map&&!this._map.has(t)){if(e===this._defaultValues[t])return this}var n=this._map&&this._map.set(t,e);return this.__ownerID||n===this._map?this:ge(this,n)},ve.prototype.remove=function(t){if(!this.has(t))return this;var e=this._map&&this._map.remove(t);return this.__ownerID||e===this._map?this:ge(this,e)},ve.prototype.wasAltered=function(){return this._map.wasAltered()},ve.prototype.__iterator=function(t,e){var r=this;return n(this._defaultValues).map(function(t,e){return r.get(e)}).__iterator(t,e)},ve.prototype.__iterate=function(t,e){var r=this;return n(this._defaultValues).map(function(t,e){return r.get(e)}).__iterate(t,e)},ve.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map&&this._map.__ensureOwner(t);return t?ge(this,e,t):(this.__ownerID=t,this._map=e,this)};var In=ve.prototype;In.delete=In.remove,In.deleteIn=In.removeIn=wn.removeIn,In.merge=wn.merge,In.mergeWith=wn.mergeWith,In.mergeIn=wn.mergeIn,In.mergeDeep=wn.mergeDeep,In.mergeDeepWith=wn.mergeDeepWith,In.mergeDeepIn=wn.mergeDeepIn,In.setIn=wn.setIn,In.update=wn.update,In.updateIn=wn.updateIn,In.withMutations=wn.withMutations,In.asMutable=wn.asMutable,In.asImmutable=wn.asImmutable,t(_e,nt),_e.of=function(){return this(arguments)},_e.fromKeys=function(t){return this(n(t).keySeq())},_e.prototype.toString=function(){return this.__toString("Set {","}")},_e.prototype.has=function(t){return this._map.has(t)},_e.prototype.add=function(t){return xe(this,this._map.set(t,!0))},_e.prototype.remove=function(t){return xe(this,this._map.remove(t))},_e.prototype.clear=function(){return xe(this,this._map.clear())},_e.prototype.union=function(){var t=Ge.call(arguments,0);return 0===(t=t.filter(function(t){return 0!==t.size})).length?this:0!==this.size||this.__ownerID||1!==t.length?this.withMutations(function(e){for(var n=0;n<t.length;n++)i(t[n]).forEach(function(t){return e.add(t)})}):this.constructor(t[0])},_e.prototype.intersect=function(){var t=Ge.call(arguments,0);if(0===t.length)return this;t=t.map(function(t){return i(t)});var e=this;return this.withMutations(function(n){e.forEach(function(e){t.every(function(t){return t.includes(e)})||n.remove(e)})})},_e.prototype.subtract=function(){var t=Ge.call(arguments,0);if(0===t.length)return this;t=t.map(function(t){return i(t)});var e=this;return this.withMutations(function(n){e.forEach(function(e){t.some(function(t){return t.includes(e)})&&n.remove(e)})})},_e.prototype.merge=function(){return this.union.apply(this,arguments)},_e.prototype.mergeWith=function(t){var e=Ge.call(arguments,1);return this.union.apply(this,e)},_e.prototype.sort=function(t){return Me(ie(this,t))},_e.prototype.sortBy=function(t,e){return Me(ie(this,e,t))},_e.prototype.wasAltered=function(){return this._map.wasAltered()},_e.prototype.__iterate=function(t,e){var n=this;return this._map.__iterate(function(e,r){return t(r,r,n)},e)},_e.prototype.__iterator=function(t,e){return this._map.map(function(t,e){return e}).__iterator(t,e)},_e.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t);return t?this.__make(e,t):(this.__ownerID=t,this._map=e,this)},_e.isSet=be;var On="@@__IMMUTABLE_SET__@@",Nn=_e.prototype;Nn[On]=!0,Nn.delete=Nn.remove,Nn.mergeDeep=Nn.merge,Nn.mergeDeepWith=Nn.mergeWith,Nn.withMutations=wn.withMutations,Nn.asMutable=wn.asMutable,Nn.asImmutable=wn.asImmutable,Nn.__empty=Ee,Nn.__make=we;var Dn;t(Me,_e),Me.of=function(){return this(arguments)},Me.fromKeys=function(t){return this(n(t).keySeq())},Me.prototype.toString=function(){return this.__toString("OrderedSet {","}")},Me.isOrderedSet=Te;var Un=Me.prototype;Un[qe]=!0,Un.__empty=Ce,Un.__make=Se;var Fn;t(Ae,et),Ae.of=function(){return this(arguments)},Ae.prototype.toString=function(){return this.__toString("Stack [","]")},Ae.prototype.get=function(t,e){var n=this._head;for(t=m(this,t);n&&t--;)n=n.next;return n?n.value:e},Ae.prototype.peek=function(){return this._head&&this._head.value},Ae.prototype.push=function(){if(0===arguments.length)return this;for(var t=this.size+arguments.length,e=this._head,n=arguments.length-1;n>=0;n--)e={value:arguments[n],next:e};return this.__ownerID?(this.size=t,this._head=e,this.__hash=void 0,this.__altered=!0,this):Re(t,e)},Ae.prototype.pushAll=function(t){if(0===(t=r(t)).size)return this;at(t.size);var e=this.size,n=this._head;return t.reverse().forEach(function(t){e++,n={value:t,next:n}}),this.__ownerID?(this.size=e,this._head=n,this.__hash=void 0,this.__altered=!0,this):Re(e,n)},Ae.prototype.pop=function(){return this.slice(1)},Ae.prototype.unshift=function(){return this.push.apply(this,arguments)},Ae.prototype.unshiftAll=function(t){return this.pushAll(t)},Ae.prototype.shift=function(){return this.pop.apply(this,arguments)},Ae.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Le()},Ae.prototype.slice=function(t,e){if(g(t,e,this.size))return this;var n=y(t,this.size);if(_(e,this.size)!==this.size)return et.prototype.slice.call(this,t,e);for(var r=this.size-n,i=this._head;n--;)i=i.next;return this.__ownerID?(this.size=r,this._head=i,this.__hash=void 0,this.__altered=!0,this):Re(r,i)},Ae.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?Re(this.size,this._head,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)},Ae.prototype.__iterate=function(t,e){if(e)return this.reverse().__iterate(t);for(var n=0,r=this._head;r&&!1!==t(r.value,n++,this);)r=r.next;return n},Ae.prototype.__iterator=function(t,e){if(e)return this.reverse().__iterator(t);var n=0,r=this._head;return new x(function(){if(r){var e=r.value;return r=r.next,w(t,n++,e)}return{value:void 0,done:!0}})},Ae.isStack=Pe;var kn="@@__IMMUTABLE_STACK__@@",zn=Ae.prototype;zn[kn]=!0,zn.withMutations=wn.withMutations,zn.asMutable=wn.asMutable,zn.asImmutable=wn.asImmutable,zn.wasAltered=wn.wasAltered;var Bn;e.Iterator=x,Ie(e,{toArray:function(){at(this.size);var t=new Array(this.size||0);return this.valueSeq().__iterate(function(e,n){t[n]=e}),t},toIndexedSeq:function(){return new Yt(this)},toJS:function(){return this.toSeq().map(function(t){return t&&"function"==typeof t.toJS?t.toJS():t}).__toJS()},toJSON:function(){return this.toSeq().map(function(t){return t&&"function"==typeof t.toJSON?t.toJSON():t}).__toJS()},toKeyedSeq:function(){return new Xt(this,!0)},toMap:function(){return st(this.toKeyedSeq())},toObject:function(){at(this.size);var t={};return this.__iterate(function(e,n){t[n]=e}),t},toOrderedMap:function(){return Gt(this.toKeyedSeq())},toOrderedSet:function(){return Me(a(this)?this.valueSeq():this)},toSet:function(){return _e(a(this)?this.valueSeq():this)},toSetSeq:function(){return new Kt(this)},toSeq:function(){return s(this)?this.toIndexedSeq():a(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return Ae(a(this)?this.valueSeq():this)},toList:function(){return Rt(a(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(t,e){return 0===this.size?t+e:t+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+e},concat:function(){return ue(this,function(t,e){var r=a(t),i=[t].concat(e).map(function(t){return o(t)?r&&(t=n(t)):t=r?z(t):B(Array.isArray(t)?t:[t]),t}).filter(function(t){return 0!==t.size});if(0===i.length)return t;if(1===i.length){var u=i[0];if(u===t||r&&a(u)||s(t)&&s(u))return u}var c=new O(i);return r?c=c.toKeyedSeq():s(t)||(c=c.toSetSeq()),c=c.flatten(!0),c.size=i.reduce(function(t,e){if(void 0!==t){var n=e.size;if(void 0!==n)return t+n}},0),c}(this,Ge.call(arguments,0)))},includes:function(t){return this.some(function(e){return Y(e,t)})},entries:function(){return this.__iterator(en)},every:function(t,e){at(this.size);var n=!0;return this.__iterate(function(r,i,o){if(!t.call(e,r,i,o))return n=!1,!1}),n},filter:function(t,e){return ue(this,te(this,t,e,!0))},find:function(t,e,n){var r=this.findEntry(t,e);return r?r[1]:n},forEach:function(t,e){return at(this.size),this.__iterate(e?t.bind(e):t)},join:function(t){at(this.size),t=void 0!==t?""+t:",";var e="",n=!0;return this.__iterate(function(r){n?n=!1:e+=t,e+=null!==r&&void 0!==r?r.toString():""}),e},keys:function(){return this.__iterator($e)},map:function(t,e){return ue(this,Qt(this,t,e))},reduce:function(t,e,n){at(this.size);var r,i;return arguments.length<2?i=!0:r=e,this.__iterate(function(e,o,a){i?(i=!1,r=e):r=t.call(n,r,e,o,a)}),r},reduceRight:function(t,e,n){var r=this.toKeyedSeq().reverse();return r.reduce.apply(r,arguments)},reverse:function(){return ue(this,$t(this,!0))},slice:function(t,e){return ue(this,ee(this,t,e,!0))},some:function(t,e){return!this.every(De(t),e)},sort:function(t){return ue(this,ie(this,t))},values:function(){return this.__iterator(tn)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some(function(){return!0})},count:function(t,e){return f(t?this.toSeq().filter(t,e):this)},countBy:function(t,e){return function(t,e,n){var r=st().asMutable();return t.__iterate(function(i,o){r.update(e.call(n,i,o,t),0,function(t){return t+1})}),r.asImmutable()}(this,t,e)},equals:function(t){return K(this,t)},entrySeq:function(){var t=this;if(t._cache)return new O(t._cache);var e=t.toSeq().map(Ne).toIndexedSeq();return e.fromEntrySeq=function(){return t.toSeq()},e},filterNot:function(t,e){return this.filter(De(t),e)},findEntry:function(t,e,n){var r=n;return this.__iterate(function(n,i,o){if(t.call(e,n,i,o))return r=[i,n],!1}),r},findKey:function(t,e){var n=this.findEntry(t,e);return n&&n[0]},findLast:function(t,e,n){return this.toKeyedSeq().reverse().find(t,e,n)},findLastEntry:function(t,e,n){return this.toKeyedSeq().reverse().findEntry(t,e,n)},findLastKey:function(t,e){return this.toKeyedSeq().reverse().findKey(t,e)},first:function(){return this.find(v)},flatMap:function(t,e){return ue(this,function(t,e,n){var r=he(t);return t.toSeq().map(function(i,o){return r(e.call(n,i,o,t))}).flatten(!0)}(this,t,e))},flatten:function(t){return ue(this,re(this,t,!0))},fromEntrySeq:function(){return new Zt(this)},get:function(t,e){return this.find(function(e,n){return Y(n,t)},void 0,e)},getIn:function(t,e){for(var n,r=this,i=me(t);!(n=i.next()).done;){var o=n.value;if((r=r&&r.get?r.get(o,Ze):Ze)===Ze)return e}return r},groupBy:function(t,e){return function(t,e,n){var r=a(t),i=(c(t)?Gt():st()).asMutable();t.__iterate(function(o,a){i.update(e.call(n,o,a,t),function(t){return(t=t||[]).push(r?[a,o]:o),t})});var o=he(t);return i.map(function(e){return ue(t,o(e))})}(this,t,e)},has:function(t){return this.get(t,Ze)!==Ze},hasIn:function(t){return this.getIn(t,Ze)!==Ze},isSubset:function(t){return t="function"==typeof t.includes?t:e(t),this.every(function(e){return t.includes(e)})},isSuperset:function(t){return(t="function"==typeof t.isSubset?t:e(t)).isSubset(this)},keyOf:function(t){return this.findKey(function(e){return Y(e,t)})},keySeq:function(){return this.toSeq().map(Oe).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},lastKeyOf:function(t){return this.toKeyedSeq().reverse().keyOf(t)},max:function(t){return oe(this,t)},maxBy:function(t,e){return oe(this,e,t)},min:function(t){return oe(this,t?Ue(t):ze)},minBy:function(t,e){return oe(this,e?Ue(e):ze,t)},rest:function(){return this.slice(1)},skip:function(t){return this.slice(Math.max(0,t))},skipLast:function(t){return ue(this,this.toSeq().reverse().skip(t).reverse())},skipWhile:function(t,e){return ue(this,ne(this,t,e,!0))},skipUntil:function(t,e){return this.skipWhile(De(t),e)},sortBy:function(t,e){return ue(this,ie(this,e,t))},take:function(t){return this.slice(0,Math.max(0,t))},takeLast:function(t){return ue(this,this.toSeq().reverse().take(t).reverse())},takeWhile:function(t,e){return ue(this,function(t,e,n){var r=pe(t);return r.__iterateUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterate(r,i);var a=0;return t.__iterate(function(t,i,s){return e.call(n,t,i,s)&&++a&&r(t,i,o)}),a},r.__iteratorUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterator(r,i);var a=t.__iterator(en,i),s=!0;return new x(function(){if(!s)return{value:void 0,done:!0};var t=a.next();if(t.done)return t;var i=t.value,u=i[0],c=i[1];return e.call(n,c,u,o)?r===en?t:w(r,u,c,t):(s=!1,{value:void 0,done:!0})})},r}(this,t,e))},takeUntil:function(t,e){return this.takeWhile(De(t),e)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=Be(this))}});var Hn=e.prototype;Hn[je]=!0,Hn[on]=Hn.values,Hn.__toJS=Hn.toArray,Hn.__toStringMapper=Fe,Hn.inspect=Hn.toSource=function(){return this.toString()},Hn.chain=Hn.flatMap,Hn.contains=Hn.includes,Ie(n,{flip:function(){return ue(this,Jt(this))},mapEntries:function(t,e){var n=this,r=0;return ue(this,this.toSeq().map(function(i,o){return t.call(e,[o,i],r++,n)}).fromEntrySeq())},mapKeys:function(t,e){var n=this;return ue(this,this.toSeq().flip().map(function(r,i){return t.call(e,r,i,n)}).flip())}});var Gn=n.prototype;Gn[Ve]=!0,Gn[on]=Hn.entries,Gn.__toJS=Hn.toObject,Gn.__toStringMapper=function(t,e){return JSON.stringify(e)+": "+Fe(t)},Ie(r,{toKeyedSeq:function(){return new Xt(this,!1)},filter:function(t,e){return ue(this,te(this,t,e,!1))},findIndex:function(t,e){var n=this.findEntry(t,e);return n?n[0]:-1},indexOf:function(t){var e=this.keyOf(t);return void 0===e?-1:e},lastIndexOf:function(t){var e=this.lastKeyOf(t);return void 0===e?-1:e},reverse:function(){return ue(this,$t(this,!1))},slice:function(t,e){return ue(this,ee(this,t,e,!1))},splice:function(t,e){var n=arguments.length;if(e=Math.max(0|e,0),0===n||2===n&&!e)return this;t=y(t,t<0?this.count():this.size);var r=this.slice(0,t);return ue(this,1===n?r:r.concat(d(arguments,2),this.slice(t+e)))},findLastIndex:function(t,e){var n=this.findLastEntry(t,e);return n?n[0]:-1},first:function(){return this.get(0)},flatten:function(t){return ue(this,re(this,t,!1))},get:function(t,e){return(t=m(this,t))<0||this.size===1/0||void 0!==this.size&&t>this.size?e:this.find(function(e,n){return n===t},void 0,e)},has:function(t){return(t=m(this,t))>=0&&(void 0!==this.size?this.size===1/0||t<this.size:-1!==this.indexOf(t))},interpose:function(t){return ue(this,function(t,e){var n=pe(t);return n.size=t.size&&2*t.size-1,n.__iterateUncached=function(n,r){var i=this,o=0;return t.__iterate(function(t,r){return(!o||!1!==n(e,o++,i))&&!1!==n(t,o++,i)},r),o},n.__iteratorUncached=function(n,r){var i,o=t.__iterator(tn,r),a=0;return new x(function(){return(!i||a%2)&&(i=o.next()).done?i:a%2?w(n,a++,e):w(n,a++,i.value,i)})},n}(this,t))},interleave:function(){var t=[this].concat(d(arguments)),e=se(this.toSeq(),L.of,t),n=e.flatten(!0);return e.size&&(n.size=e.size*t.length),ue(this,n)},keySeq:function(){return Q(0,this.size)},last:function(){return this.get(-1)},skipWhile:function(t,e){return ue(this,ne(this,t,e,!1))},zip:function(){return ue(this,se(this,ke,[this].concat(d(arguments))))},zipWith:function(t){var e=d(arguments);return e[0]=this,ue(this,se(this,t,e))}}),r.prototype[We]=!0,r.prototype[qe]=!0,Ie(i,{get:function(t,e){return this.has(t)?t:e},includes:function(t){return this.has(t)},keySeq:function(){return this.valueSeq()}}),i.prototype.has=Hn.includes,i.prototype.contains=i.prototype.includes,Ie(R,n.prototype),Ie(L,r.prototype),Ie(I,i.prototype),Ie(tt,n.prototype),Ie(et,r.prototype),Ie(nt,i.prototype);return{Iterable:e,Seq:P,Collection:$,Map:st,OrderedMap:Gt,List:Rt,Stack:Ae,Set:_e,OrderedSet:Me,Record:ve,Range:Q,Repeat:Z,is:Y,fromJS:V}})},93:function(t,e,n){"use strict";function r(t){return function(){return t}}var i=function(){};i.thatReturns=r,i.thatReturnsFalse=r(!1),i.thatReturnsTrue=r(!0),i.thatReturnsNull=r(null),i.thatReturnsThis=function(){return this},i.thatReturnsArgument=function(t){return t},t.exports=i},96:function(t,e,n){"use strict";t.exports=function(t,e,n,r,i,o,a,s){if(!t){var u;if(void 0===e)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,i,o,a,s],l=0;(u=new Error(e.replace(/%s/g,function(){return c[l++]}))).name="Invariant Violation"}throw u.framesToPop=1,u}}},97:function(t,e,n){"use strict";function r(t,e,n){function o(){m===f&&(m=f.slice())}function u(){return d}function c(t){if("function"!=typeof t)throw new Error("Expected listener to be a function.");var e=!0;return o(),m.push(t),function(){if(e){e=!1,o();var n=m.indexOf(t);m.splice(n,1)}}}function l(t){if(!Object(i.a)(t))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if(void 0===t.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(v)throw new Error("Reducers may not dispatch actions.");try{v=!0,d=p(d,t)}finally{v=!1}for(var e=f=m,n=0;n<e.length;n++){(0,e[n])()}return t}var h;if("function"==typeof e&&void 0===n&&(n=e,e=void 0),void 0!==n){if("function"!=typeof n)throw new Error("Expected the enhancer to be a function.");return n(r)(t,e)}if("function"!=typeof t)throw new Error("Expected the reducer to be a function.");var p=t,d=e,f=[],m=f,v=!1;return l({type:s.INIT}),h={dispatch:l,subscribe:c,getState:u,replaceReducer:function(t){if("function"!=typeof t)throw new Error("Expected the nextReducer to be a function.");p=t,l({type:s.INIT})}},h[a.a]=function(){var t,e=c;return t={subscribe:function(t){function n(){t.next&&t.next(u())}if("object"!=typeof t)throw new TypeError("Expected the observer to be an object.");return n(),{unsubscribe:e(n)}}},t[a.a]=function(){return this},t},h}n.d(e,"a",function(){return s}),e.b=r;var i=n(60),o=n(226),a=n.n(o),s={INIT:"@@redux/INIT"}},98:function(t,e,n){"use strict";var r=n(219).a.Symbol;e.a=r},99:function(t,e,n){"use strict"}},[654]);
//# sourceMappingURL=c9c291341ab2d77a8b9b.vendor.js.map