(function(a,b){"object"===typeof exports&&"undefined"!==typeof module?b(exports):"function"===typeof define&&define.amd?define(["exports"],b):b(a.GLE={})})(this,function(a){function b(){}function d(c,g){this.x=c||0;this.y=g||0}function e(){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];0g&&(g=c[n]);return g}function R(){Object.defineProperty(this,"id",{value:jh+=2});this.uuid=Aa.generateUUID();this.name="";this.type="BufferGeometry";this.index=null;this.attributes={};this.morphAttributes={};this.groups=[];this.boundingSphere=this.boundingBox=null;this.drawRange={start:0,count:Infinity};this.userData={}}function Z(c,g,n,a,y,b){L.call(this);this.type="BoxGeometry";this.parameters={width:c,height:g,depth:n,widthSegments:a,heightSegments:y,depthSegments:b};this.fromBufferGeometry(new ta(c,g,n,a,y,b));this.mergeVertices()}function ta(c,g,n,a,y,b){function t(c,g,n,a,t,y,b,O,ea,ma,u){var m=y/ea,p=b/ma,Tb=y/2,v=b/2,r=O/2;b=ea+1;var q=ma+1,E=y=0,C,Gb,Ub=new h;for(Gb=0;Gbe;e++){if(h=a[e])if(t=h[0],I=h[1]){f&&y.addAttribute("morphTarget"+e,f[t]);b&&y.addAttribute("morphNormal"+e,b[t]);n[e]=I;continue}n[e]=0}d.getUniforms().setValue(c,"morphTargetInfluences",n)}}}function nh(c,g){var n={};return{update:function(a){var t=g.render.frame,b=a.geometry,d=c.get(a,b);n[d.id]!==t&&(b.isGeometry&&d.updateFromObject(a),c.update(d),n[d.id]=t);return d},dispose:function(){n={}}}}function Ua(c,g,n,a,y,b,d,e,f,h){c=void 0!==c?c:[];m.call(this,c,void 0!==g?g:301,n,a,y,b,d,e,f,h);this.flipY=!1}function kb(c,g,n,a){m.call(this,null);this.image={data:c,width:g,height:n,depth:a};this.minFilter=this.magFilter=1003;this.flipY=this.generateMipmaps=!1}function za(c,g,n){var a=c[0];if(0>=a||0/gm,function(c,n){var g=Ca[n];if(void 0===g)throw Error("Can not resolve #include \x3c"+n+"\x3e");return tb(g)})}function Xa(c){return c.replace(/#pragma unroll_loop[\s]+?for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}/g,function(c,n,a,y){c="";for(n=parseInt(n);ng||c.height>g){if("data"in c){console.warn("GLE.Wr: image in DataTexture is too big ("+c.width+"x"+c.height+").");return}var n=g/Math.max(c.width,c.height),a=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");a.width=Math.floor(c.width*n);a.height=Math.floor(c.height*n);a.getContext("2d").drawImage(c,0,0,c.width,c.height,0,0,a.width,a.height);console.warn("GLE.Wr: image is too big ("+c.width+"x"+c.height+"). Resized to "+a.width+"x"+a.height);return a}return c}function y(c){return Aa.isPowerOfTwo(c.width)&&Aa.isPowerOfTwo(c.height)}function f(c,g){return c.generateMipmaps&&g&&1003!==c.minFilter&&1006!==c.minFilter}function I(g,n,t,b){c.generateMipmap(g);a.get(n).__maxMipLevel=Math.log(Math.max(t,b))*Math.LOG2E}function h(g,n){if(!b.isWebGL2)return g;if(g===c.RED){if(n===c.FLOAT)return c.R32F;if(n===c.HALF_FLOAT)return c.R16F;if(n===c.UNSIGNED_BYTE)return c.R8}if(g===c.RGB){if(n===c.FLOAT)return c.RGB32F;if(n===c.HALF_FLOAT)return c.RGB16F;if(n===c.UNSIGNED_BYTE)return c.RGB8}if(g===c.RGBA){if(n===c.FLOAT)return c.RGBA32F;if(n===c.HALF_FLOAT)return c.RGBA16F;if(n===c.UNSIGNED_BYTE)return c.RGBA8}return g}function O(g){return 1003===g||1004===g||1005===g?c.NEAREST:c.LINEAR}function k(g){g=g.target;g.removeEventListener("dispose",k);a:{var n=a.get(g);if(g.image&&n.__image__webglTextureCube)c.deleteTexture(n.__image__webglTextureCube);else{if(void 0===n.__webglInit)break a;c.deleteTexture(n.__webglTexture)}a.remove(g)}g.isVideoTexture&&delete q[g.id];e.memory.textures--}function l(g){g=g.target;g.removeEventListener("dispose",l);var n=a.get(g),t=a.get(g.texture);if(g){void 0!==t.__webglTexture&&c.deleteTexture(t.__webglTexture);g.depthTexture&&g.depthTexture.dispose();if(g.isWtCube)for(t=0;6>t;t++)c.deleteFramebuffer(n.__webglFramebuffer[t]),n.__webglDepthbuffer&&c.deleteRenderbuffer(n.__webglDepthbuffer[t]);else c.deleteFramebuffer(n.__webglFramebuffer),n.__webglDepthbuffer&&c.deleteRenderbuffer(n.__webglDepthbuffer);a.remove(g.texture);a.remove(g)}e.memory.textures--}function p(g,t){var b=a.get(g);if(g.isVideoTexture){var y=g.id,d=e.render.frame;q[y]!==d&&(q[y]=d,g.update())}if(0m;m++)ma[m]=ea||p?p?g.image[m].image:g.image[m]:t(g.image[m],b.maxCubemapSize);var u=ma[0],v=y(u),q=d.convert(g.format),r=d.convert(g.type),E=h(q,r);z(c.TEXTURE_CUBE_MAP,g,v);for(m=0;6>m;m++)if(ea)for(var Tb,C=ma[m].mipmaps,w=0,Gb=C.length;wO;O++)t.__webglFramebuffer[O]=c.createFramebuffer()}else t.__webglFramebuffer=c.createFramebuffer();if(d){n.bindTexture(c.TEXTURE_CUBE_MAP,b.__webglTexture);z(c.TEXTURE_CUBE_MAP,g.texture,h);for(O=0;6>O;O++)u(t.__webglFramebuffer[O],g,c.COLOR_ATTACHMENT0,c.TEXTURE_CUBE_MAP_POSITIVE_X+O);f(g.texture,h)&&I(c.TEXTURE_CUBE_MAP,g.texture,g.width,g.height);n.bindTexture(c.TEXTURE_CUBE_MAP,null)}else n.bindTexture(c.TEXTURE_2D,b.__webglTexture),z(c.TEXTURE_2D,g.texture,h),u(t.__webglFramebuffer,g,c.COLOR_ATTACHMENT0,c.TEXTURE_2D),f(g.texture,h)&&I(c.TEXTURE_2D,g.texture,g.width,g.height),n.bindTexture(c.TEXTURE_2D,null);if(g.depthBuffer){t=a.get(g);b=!0===g.isWtCube;if(g.depthTexture){if(b)throw Error("target.depthTexture not supported in Cube render targets");if(g&&g.isWtCube)throw Error("Depth Texture with cube render targets is not supported");c.bindFramebuffer(c.FRAMEBUFFER,t.__webglFramebuffer);if(!g.depthTexture||!g.depthTexture.isDepthTexture)throw Error("renderTarget.depthTexture must be an instance of GLE.DepthTexture");a.get(g.depthTexture).__webglTexture&&g.depthTexture.image.width===g.width&&g.depthTexture.image.height===g.height||(g.depthTexture.image.width=g.width,g.depthTexture.image.height=g.height,g.depthTexture.needsUpdate=!0);p(g.depthTexture,0);t=a.get(g.depthTexture).__webglTexture;if(1026===g.depthTexture.format)c.framebufferTexture2D(c.FRAMEBUFFER,c.DEPTH_ATTACHMENT,c.TEXTURE_2D,t,0);else if(1027===g.depthTexture.format)c.framebufferTexture2D(c.FRAMEBUFFER,c.DEPTH_STENCIL_ATTACHMENT,c.TEXTURE_2D,t,0);else throw Error("Unknown depthTexture format");}else if(b)for(t.__webglDepthbuffer=[],b=0;6>b;b++)c.bindFramebuffer(c.FRAMEBUFFER,t.__webglFramebuffer[b]),t.__webglDepthbuffer[b]=c.createRenderbuffer(),v(t.__webglDepthbuffer[b],g);else c.bindFramebuffer(c.FRAMEBUFFER,t.__webglFramebuffer),t.__webglDepthbuffer=c.createRenderbuffer(),v(t.__webglDepthbuffer,g);c.bindFramebuffer(c.FRAMEBUFFER,null)}};this.updateRenderTargetMipmap=function(g){var t=g.texture,b=y(g);if(f(t,b)){var b=g.isWtCube?c.TEXTURE_CUBE_MAP:c.TEXTURE_2D,d=a.get(t).__webglTexture;n.bindTexture(b,d);I(b,t,g.width,g.height);n.bindTexture(b,null)}}}function uh(c,g,n){return{convert:function(a){var t;if(1E3===a)return c.REPEAT;if(1001===a)return c.CLAMP_TO_EDGE;if(1002===a)return c.MIRRORED_REPEAT;if(1003===a)return c.NEAREST;if(1004===a)return c.NEAREST_MIPMAP_NEAREST;if(1005===a)return c.NEAREST_MIPMAP_LINEAR;if(1006===a)return c.LINEAR;if(1007===a)return c.LINEAR_MIPMAP_NEAREST;if(1008===a)return c.LINEAR_MIPMAP_LINEAR;if(1009===a)return c.UNSIGNED_BYTE;if(1017===a)return c.UNSIGNED_SHORT_4_4_4_4;if(1018===a)return c.UNSIGNED_SHORT_5_5_5_1;if(1019===a)return c.UNSIGNED_SHORT_5_6_5;if(1010===a)return c.BYTE;if(1011===a)return c.SHORT;if(1012===a)return c.UNSIGNED_SHORT;if(1013===a)return c.INT;if(1014===a)return c.UNSIGNED_INT;if(1015===a)return c.FLOAT;if(1016===a){if(n.isWebGL2)return c.HALF_FLOAT;t=g.get("OES_texture_half_float");if(null!==t)return t.HALF_FLOAT_OES}if(1021===a)return c.ALPHA;if(1022===a)return c.RGB;if(1023===a)return c.RGBA;if(1024===a)return c.LUMINANCE;if(1025===a)return c.LUMINANCE_ALPHA;if(1026===a)return c.DEPTH_COMPONENT;if(1027===a)return c.DEPTH_STENCIL;if(1028===a)return c.RED;if(100===a)return c.FUNC_ADD;if(101===a)return c.FUNC_SUBTRACT;if(102===a)return c.FUNC_REVERSE_SUBTRACT;if(200===a)return c.ZERO;if(201===a)return c.ONE;if(202===a)return c.SRC_COLOR;if(203===a)return c.ONE_MINUS_SRC_COLOR;if(204===a)return c.SRC_ALPHA;if(205===a)return c.ONE_MINUS_SRC_ALPHA;if(206===a)return c.DST_ALPHA;if(207===a)return c.ONE_MINUS_DST_ALPHA;if(208===a)return c.DST_COLOR;if(209===a)return c.ONE_MINUS_DST_COLOR;if(210===a)return c.SRC_ALPHA_SATURATE;if(33776===a||33777===a||33778===a||33779===a)if(t=g.get("WEBGL_compressed_texture_s3tc"),null!==t){if(33776===a)return t.COMPRESSED_RGB_S3TC_DXT1_EXT;if(33777===a)return t.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(33778===a)return t.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(33779===a)return t.COMPRESSED_RGBA_S3TC_DXT5_EXT}if(35840===a||35841===a||35842===a||35843===a)if(t=g.get("WEBGL_compressed_texture_pvrtc"),null!==t){if(35840===a)return t.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(35841===a)return t.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(35842===a)return t.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(35843===a)return t.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(36196===a&&(t=g.get("WEBGL_compressed_texture_etc1"),null!==t))return t.COMPRESSED_RGB_ETC1_WEBGL;if(37808===a||37809===a||37810===a||37811===a||37812===a||37813===a||37814===a||37815===a||37816===a||37817===a||37818===a||37819===a||37820===a||37821===a)if(t=g.get("WEBGL_compressed_texture_astc"),null!==t)return a;if(103===a||104===a){if(n.isWebGL2){if(103===a)return c.MIN;if(104===a)return c.MAX}t=g.get("EXT_blend_minmax");if(null!==t){if(103===a)return t.MIN_EXT;if(104===a)return t.MAX_EXT}}if(1020===a){if(n.isWebGL2)return c.UNSIGNED_INT_24_8;t=g.get("WEBGL_depth_texture");if(null!==t)return t.UNSIGNED_INT_24_8_WEBGL}return 0}}}function $b(){F.call(this);this.type="Group"}function nb(){F.call(this);this.type="Camera";this.matrixWorldInverse=new e;this.projectionMatrix=new e;this.projectionMatrixInverse=new e}function Ra(c,g,n,a){nb.call(this);this.type="Pa";this.fov=void 0!==c?c:50;this.zoom=1;this.near=void 0!==n?n:.1;this.far=void 0!==a?a:2E3;this.focus=10;this.aspect=void 0!==g?g:1;this.view=null;this.filmGauge=35;this.filmOffset=0;this.ux()}function Ne(c){Ra.call(this);this.cameras=c||[]}function Zd(c){function g(){return null!==b&&!0===b.isPresenting}function n(){if(g()){var n=b.getEyeParameters("left"),t=n.renderWidth,n=n.renderHeight;D=c.getPixelRatio();B=c.getSize();c.setDrawingBufferSize(2*t,n,1);x.start()}else a.enabled&&c.setDrawingBufferSize(B.width,B.height,D),x.stop()}var a=this,b=null,d=null,O=null,k=[],l=new e,m=new e,z="stage";"undefined"!==typeof window&&"VRFrameData"in window&&(d=new window.VRFrameData,window.addEventListener("vrdisplaypresentchange",n,!1));var u=new e,v=new f,q=new h,E=new Ra;E.bounds=new r(0,0,.5,1);E.layers.enable(1);var C=new Ra;C.bounds=new r(.5,0,.5,1);C.layers.enable(2);var w=new Ne([E,C]);w.layers.enable(1);w.layers.enable(2);var B,D,J=[];this.enabled=!1;this.getController=function(c){var g=k[c];void 0===g&&(g=new $b,g.matrixAutoUpdate=!1,g.visible=!1,k[c]=g);return g};this.getDevice=function(){return b};this.setDevice=function(c){void 0!==c&&(b=c);x.setContext(c)};this.setFrameOfReferenceType=function(c){z=c};this.setPoseTarget=function(c){void 0!==c&&(O=c)};this.getCamera=function(c){var g="stage"===z?1.6:0;if(null===b)return c.position.set(0,g,0),c;b.depthNear=c.near;b.depthFar=c.far;b.getFrameData(d);if("stage"===z){var n=b.stageParameters;n?l.fromArray(n.sittingToStandingTransform):l.makeTranslation(0,g,0)}g=d.pose;n=null!==O?O:c;n.matrix.copy(l);n.matrix.decompose(n.position,n.quaternion,n.scale);null!==g.orientation&&(v.fromArray(g.orientation),n.quaternion.multiply(v));null!==g.position&&(v.setFromRotationMatrix(l),q.fromArray(g.position),q.applyQuaternion(v),n.position.add(q));n.uld();if(!1===b.isPresenting)return c;E.near=c.near;C.near=c.near;E.far=c.far;C.far=c.far;w.matrixWorld.copy(c.matrixWorld);w.matrixWorldInverse.copy(c.matrixWorldInverse);E.matrixWorldInverse.fromArray(d.leftViewMatrix);C.matrixWorldInverse.fromArray(d.rightViewMatrix);m.getInverse(l);"stage"===z&&(E.matrixWorldInverse.multiply(m),C.matrixWorldInverse.multiply(m));c=n.parent;null!==c&&(u.getInverse(c.matrixWorld),E.matrixWorldInverse.multiply(u),C.matrixWorldInverse.multiply(u));E.matrixWorld.getInverse(E.matrixWorldInverse);C.matrixWorld.getInverse(C.matrixWorldInverse);E.projectionMatrix.fromArray(d.leftProjectionMatrix);C.projectionMatrix.fromArray(d.rightProjectionMatrix);w.projectionMatrix.copy(E.projectionMatrix);c=b.getLayers();c.length&&(c=c[0],null!==c.leftBounds&&4===c.leftBounds.length&&E.bounds.fromArray(c.leftBounds),null!==c.rightBounds&&4===c.rightBounds.length&&C.bounds.fromArray(c.rightBounds));a:for(c=0;cd.normalMatrix.determinant();za.setMaterial(y,I);var f=B(c,t,y,d),h=!1;if(g!==b.id||n!==f.id||a!==(!0===y.wireframe))g=b.id,n=f.id,a=!0===y.wireframe,h=!0;d.morphTargetInfluences&&(Ca.update(d,b,y,f),h=!0);var I=b.index,O=b.attributes.position;t=1;!0===y.wireframe&&(I=Ib.getWireframeAttribute(b),t=2);var k;c=Tc;null!==I&&(k=Ma.get(I),c=Ha,c.setIndex(k));if(h){if(b&&b.isInstancedBufferGeometry&!pb.isWebGL2&&null===ja.get("ANGLE_instanced_arrays"))console.error("GLE.Wr.setupVertexAttributes: using GLE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");else{za.initAttributes();var h=b.attributes,f=f.getAttributes(),l=y.defaultAttributeValues,m;for(m in f){var p=f[m];if(0<=p){var ea=h[m];if(void 0!==ea){var z=ea.normalized,u=ea.itemSize,ma=Ma.get(ea);if(void 0!==ma){var v=ma.buffer,q=ma.type,ma=ma.bytesPerElement;if(ea.isInterleavedBufferAttribute){var r=ea.data,E=r.stride,ea=ea.offset;r&&r.isInstancedInterleavedBuffer?(za.enableAttributeAndDivisor(p,r.meshPerAttribute),void 0===b.maxInstancedCount&&(b.maxInstancedCount=r.meshPerAttribute*r.count)):za.enableAttribute(p);U.bindBuffer(U.ARRAY_BUFFER,v);U.vertexAttribPointer(p,u,q,z,E*ma,ea*ma)}else ea.isInstancedBufferAttribute?(za.enableAttributeAndDivisor(p,ea.meshPerAttribute),void 0===b.maxInstancedCount&&(b.maxInstancedCount=ea.meshPerAttribute*ea.count)):za.enableAttribute(p),U.bindBuffer(U.ARRAY_BUFFER,v),U.vertexAttribPointer(p,u,q,z,0,0)}}else if(void 0!==l&&(z=l[m],void 0!==z))switch(z.length){case 2:U.vertexAttrib2fv(p,z);break;case 3:U.vertexAttrib3fv(p,z);break;case 4:U.vertexAttrib4fv(p,z);break;default:U.vertexAttrib1fv(p,z)}}}za.disableUnusedAttributes()}null!==I&&U.bindBuffer(U.ELEMENT_ARRAY_BUFFER,k.buffer)}k=Infinity;null!==I?k=I.count:void 0!==O&&(k=O.count);I=b.drawRange.start*t;O=null!==e?e.start*t:0;m=Math.max(I,O);e=Math.max(0,Math.min(k,I+b.drawRange.count*t,O+(null!==e?e.count*t:Infinity))-1-m+1);if(0!==e){if(d.isMesh)if(!0===y.wireframe)za.setLineWidth(y.wireframeLinewidth*(null===M?Ua:1)),c.setMode(U.LINES);else switch(d.drawMode){case 0:c.setMode(U.TRIANGLES);break;case 1:c.setMode(U.TRIANGLE_STRIP);break;case 2:c.setMode(U.TRIANGLE_FAN)}else d.isLine?(y=y.linewidth,void 0===y&&(y=1),za.setLineWidth(y*(null===M?Ua:1)),d.isLineSegments?c.setMode(U.LINES):d.isLineLoop?c.setMode(U.LINE_LOOP):c.setMode(U.LINE_STRIP)):d.isPoints?c.setMode(U.POINTS):d.isSprite&&c.setMode(U.TRIANGLES);b&&b.isInstancedBufferGeometry?0=pb.maxTextures&&console.warn("GLE.Wr: Trying to use "+c+" texture units while this GPU supports only "+pb.maxTextures);N+=1;return c};this.setTexture2D=function(){var c=!1;return function(g,n){g&&g.isWt&&(c||(console.warn("GLE.Wr.setTexture2D: don't use render targets as textures. Use their .texture property instead."),c=!0),g=g.texture);ka.setTexture2D(g,n)}}();this.setTexture3D=function(){return function(c,g){ka.setTexture3D(c,g)}}();this.setTexture=function(){var c=!1;return function(g,n){c||(console.warn("GLE.Wr: .setTexture is deprecated, use setTexture2D instead."),c=!0);ka.setTexture2D(g,n)}}();this.setTextureCube=function(){var c=!1;return function(g,n){g&&g.isWtCube&&(c||(console.warn("GLE.Wr.setTextureCube: don't use cube render targets as textures. Use their .texture property instead."),c=!0),g=g.texture);g&&g.isCubeTexture||Array.isArray(g.image)&&6===g.image.length?ka.setTextureCube(g,n):ka.setTextureCubeDynamic(g,n)}}();this.setFramebuffer=function(c){H=c};this.getRenderTarget=function(){return M};this.setRenderTarget=function(c){(M=c)&&void 0===Wa.get(c).__webglFramebuffer&&ka.setupRenderTarget(c);var g=H,n=!1;c?(g=Wa.get(c).__webglFramebuffer,c.isWtCube&&(g=g[c.activeCubeFace],n=!0),Z.copy(c.viewport),Na.copy(c.scissor),mb=c.scissorTest):(Z.copy(V).multiplyScalar(Ua),Na.copy(Y).multiplyScalar(Ua),mb=da);aa!==g&&(U.bindFramebuffer(U.FRAMEBUFFER,g),aa=g);za.viewport(Z);za.scissor(Na);za.setScissorTest(mb);n&&(n=Wa.get(c.texture),U.framebufferTexture2D(U.FRAMEBUFFER,U.COLOR_ATTACHMENT0,U.TEXTURE_CUBE_MAP_POSITIVE_X+c.activeCubeFace,n.__webglTexture,c.activeMipMapLevel))};this.rls=function(c,g,n,a,t,b){if(c&&c.isWt){var y=Wa.get(c).__webglFramebuffer;if(y){var d=!1;y!==aa&&(U.bindFramebuffer(U.FRAMEBUFFER,y),d=!0);try{var e=c.texture,I=e.format,f=e.type;1023!==I&&Da.convert(I)!==U.getParameter(U.IMPLEMENTATION_COLOR_READ_FORMAT)?console.error("GLE.Wr.rls: renderTarget is not in RGBA or implementation defined format."):1009===f||Da.convert(f)===U.getParameter(U.IMPLEMENTATION_COLOR_READ_TYPE)||1015===f&&(pb.isWebGL2||ja.get("OES_texture_float")||ja.get("WEBGL_color_buffer_float"))||1016===f&&(pb.isWebGL2?ja.get("EXT_color_buffer_float"):ja.get("EXT_color_buffer_half_float"))?U.checkFramebufferStatus(U.FRAMEBUFFER)===U.FRAMEBUFFER_COMPLETE?0<=g&&g<=c.width-a&&0<=n&&n<=c.height-t&&U.readPixels(g,n,a,t,Da.convert(I),Da.convert(f),b):console.error("GLE.Wr.rls: readPixels from renderTarget failed. Framebuffer not complete."):console.error("GLE.Wr.rls: renderTarget is not in UnsignedByteType or implementation defined type.")}finally{d&&U.bindFramebuffer(U.FRAMEBUFFER,aa)}}}else console.error("GLE.Wr.rls: renderTarget is not GLE.Wt.")};this.copyFramebufferToTexture=function(c,g,n){var a=g.image.width,t=g.image.height,b=Da.convert(g.format);this.setTexture2D(g,0);U.copyTexImage2D(U.TEXTURE_2D,n||0,b,c.x,c.y,a,t,0)};this.copyTextureToTexture=function(c,g,n,a){var t=g.image.width,b=g.image.height,y=Da.convert(n.format),d=Da.convert(n.type);this.setTexture2D(n,0);g.isDataTexture?U.texSubImage2D(U.TEXTURE_2D,a||0,c.x,c.y,t,b,y,d,g.image.data):U.texSubImage2D(U.TEXTURE_2D,a||0,c.x,c.y,y,d,g.image)}}function gd(c,g){this.name="";this.color=new u(c);this.density=void 0!==g?g:2.5E-4}function $d(c,g,n){this.name="";this.color=new u(c);this.near=void 0!==g?g:1;this.far=void 0!==n?n:1E3}function Bf(){F.call(this);this.type="Scene";this.overrideMaterial=this.fog=this.background=null;this.autoUpdate=!0}function ae(c,g){this.array=c;this.stride=g;this.count=void 0!==c?c.length/g:0;this.dynamic=!1;this.updateRange={offset:0,count:-1};this.version=0}function be(c,g,n,a){this.data=c;this.itemSize=g;this.offset=n;this.normalized=!0===a}function Uc(c){S.call(this);this.type="SpriteMaterial";this.color=new u(16777215);this.map=null;this.rotation=0;this.sizeAttenuation=!0;this.lights=!1;this.transparent=!0;this.setValues(c)}function yd(c){F.call(this);this.type="Sprite";if(void 0===Oe){Oe=new R;var g=new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]),g=new ae(g,5);Oe.setIndex([0,1,2,0,2,3]);Oe.addAttribute("position",new be(g,3,0,!1));Oe.addAttribute("uv",new be(g,2,3,!1))}this.geometry=Oe;this.material=void 0!==c?c:new Uc;this.center=new d(.5,.5)}function ce(){F.call(this);this.type="LOD";Object.defineProperties(this,{levels:{enumerable:!0,value:[]}})}function Fc(c,g){c=c||[];this.bones=c.slice(0);this.boneMatrices=new Float32Array(16*this.bones.length);if(void 0===g)this.calculateInverses();else if(this.bones.length===g.length)this.boneInverses=g.slice(0);else{console.warn("GLE.Skeleton boneInverses is the wrong length.");this.boneInverses=[];for(var n=0,a=this.bones.length;na;a++)k=z[p[a]],l=z[p[(a+1)%3]],e[0]=Math.min(k,l),e[1]=Math.max(k,l),k=e[0]+","+e[1],void 0===f[k]&&(f[k]={index1:e[0],index2:e[1]})}for(k in f)n=f[k],p=c.vertices[n.index1],g.push(p.x,p.y,p.z),p=c.vertices[n.index2],g.push(p.x,p.y,p.z)}else if(c&&c.isBufferGeometry){var u,p=new h;if(null!==c.index){m=c.attributes.position;z=c.index;u=c.groups;0===u.length&&(u=[{start:0,count:z.count,materialIndex:0}]);c=0;for(d=u.length;ca;a++)k=z.getX(n+a),l=z.getX(n+(a+1)%3),e[0]=Math.min(k,l),e[1]=Math.max(k,l),k=e[0]+","+e[1],void 0===f[k]&&(f[k]={index1:e[0],index2:e[1]});for(k in f)n=f[k],p.fromBufferAttribute(m,n.index1),g.push(p.x,p.y,p.z),p.fromBufferAttribute(m,n.index2),g.push(p.x,p.y,p.z)}else for(m=c.attributes.position,n=0,b=m.count/3;na;a++)f=3*n+a,p.fromBufferAttribute(m,f),g.push(p.x,p.y,p.z),f=3*n+(a+1)%3,p.fromBufferAttribute(m,f),g.push(p.x,p.y,p.z)}this.addAttribute("position",new K(g,3))}function Df(c,g,n){L.call(this);this.type="ParametricGeometry";this.parameters={func:c,slices:g,stacks:n};this.fromBufferGeometry(new id(c,g,n));this.mergeVertices()}function id(c,g,n){R.call(this);this.type="ParametricBufferGeometry";this.parameters={func:c,slices:g,stacks:n};var a=[],b=[],d=[],e=[],f=new h,k=new h,l=new h,p=new h,m=new h,z,u;3>c.length&&console.error("GLE.ParametricGeometry: Function must now modify a Vector3 as third parameter.");var v=g+1;for(z=0;z<=n;z++){var q=z/n;for(u=0;u<=g;u++){var r=u/g;c(r,q,k);b.push(k.x,k.y,k.z);0<=r-1E-5?(c(r-1E-5,q,l),p.subVectors(k,l)):(c(r+1E-5,q,l),p.subVectors(l,k));0<=q-1E-5?(c(r,q-1E-5,l),m.subVectors(k,l)):(c(r,q+1E-5,l),m.subVectors(l,k));f.crossVectors(p,m).normalize();d.push(f.x,f.y,f.z);e.push(r,q)}}for(z=0;za&&1===c.x&&(k[g]=c.x-1);0===n.x&&0===n.z&&(k[g]=a/2/Math.PI+.5)}R.call(this);this.type="PolyhedronBufferGeometry";this.parameters={vertices:c,indices:g,radius:n,detail:a};n=n||1;a=a||0;var f=[],k=[];(function(c){for(var n=new h,a=new h,y=new h,d=0;dt&&(.2>g&&(k[c+0]+=1),.2>n&&(k[c+2]+=1),.2>a&&(k[c+4]+=1))})();this.addAttribute("position",new K(f,3));this.addAttribute("normal",new K(f.slice(),3));this.addAttribute("uv",new K(k,2));0===a?this.computeVertexNormals():this.normalizeNormals()}function Ef(c,g){L.call(this);this.type="TetrahedronGeometry";this.parameters={radius:c,detail:g};this.fromBufferGeometry(new Ad(c,g));this.mergeVertices()}function Ad(c,g){bc.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],c,g);this.type="TetrahedronBufferGeometry";this.parameters={radius:c,detail:g}}function fe(c,g){L.call(this);this.type="OctahedronGeometry";this.parameters={radius:c,detail:g};this.fromBufferGeometry(new kd(c,g));this.mergeVertices()}function kd(c,g){bc.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],c,g);this.type="OctahedronBufferGeometry";this.parameters={radius:c,detail:g}}function ge(c,g){L.call(this);this.type="IcosahedronGeometry";this.parameters={radius:c,detail:g};this.fromBufferGeometry(new Bd(c,g));this.mergeVertices()}function Bd(c,g){var n=(1+Math.sqrt(5))/2;bc.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],c,g);this.type="IcosahedronBufferGeometry";this.parameters={radius:c,detail:g}}function wc(c,g){L.call(this);this.type="DodecahedronGeometry";this.parameters={radius:c,detail:g};this.fromBufferGeometry(new Qe(c,g));this.mergeVertices()}function Qe(c,g){var n=(1+Math.sqrt(5))/2,a=1/n;bc.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,-a,-n,0,-a,n,0,a,-n,0,a,n,-a,-n,0,-a,n,0,a,-n,0,a,n,0,-n,0,-a,n,0,-a,-n,0,a,n,0,a],[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],c,g);this.type="DodecahedronBufferGeometry";this.parameters={radius:c,detail:g}}function Ff(c,g,n,a,b,d){L.call(this);this.type="TubeGeometry";this.parameters={path:c,tubularSegments:g,radius:n,radialSegments:a,closed:b};void 0!==d&&console.warn("GLE.TubeGeometry: taper has been removed.");c=new Re(c,g,n,a,b);this.tangents=c.tangents;this.normals=c.normals;this.binormals=c.binormals;this.fromBufferGeometry(c);this.mergeVertices()}function Re(c,g,n,a,b){function t(t){l=c.getPointAt(t/g,l);var b=y.normals[t];t=y.binormals[t];for(m=0;m<=a;m++){var d=m/a*Math.PI*2,I=Math.sin(d),d=-Math.cos(d);f.x=d*b.x+I*t.x;f.y=d*b.y+I*t.y;f.z=d*b.z+I*t.z;f.normalize();u.push(f.x,f.y,f.z);e.x=l.x+n*f.x;e.y=l.y+n*f.y;e.z=l.z+n*f.z;z.push(e.x,e.y,e.z)}}R.call(this);this.type="TubeBufferGeometry";this.parameters={path:c,tubularSegments:g,radius:n,radialSegments:a,closed:b};g=g||64;n=n||1;a=a||8;b=b||!1;var y=c.computeFrenetFrames(g,b);this.tangents=y.tangents;this.normals=y.normals;this.binormals=y.binormals;var e=new h,f=new h,k=new d,l=new h,p,m,z=[],u=[],v=[],q=[];for(p=0;p=g;b-=a)t=Bi(b,c[b],c[b+1],t);t&&Dd(t,t.next)&&(Hf(t),t=t.next);return t}function If(c,g){if(!c)return c;g||(g=c);var n=c,a;do if(a=!1,n.steiner||!Dd(n,n.next)&&0!==Qb(n.prev,n,n.next))n=n.next;else{Hf(n);n=g=n.prev;if(n===n.next)break;a=!0}while(a||n!==g);return g}function Te(c,g,n,a,b,d,e){if(c){if(!e&&d){var t=c,y=t;do null===y.z&&(y.z=rg(y.x,y.y,a,b,d)),y.prevZ=y.prev,y=y.nextZ=y.next;while(y!==t);y.prevZ.nextZ=null;y.prevZ=null;var t=y,f,I,h,k,l,O,p=1;do{y=t;h=t=null;for(k=0;y;){k++;I=y;for(f=l=0;fl.x?k.x>p.x?k.x:p.x:l.x>p.x?l.x:p.x,v=k.y>l.y?k.y>p.y?k.y:p.y:l.y>p.y?l.y:p.y;f=rg(k.x=f;){if(m!==h.prev&&m!==h.next&&Gc(k.x,k.y,l.x,l.y,p.x,p.y,m.x,m.y)&&0<=Qb(m.prev,m,m.next)){h=!1;break a}m=m.prevZ}h=!0}}else a:if(h=c,k=h.prev,l=h,p=h.next,0<=Qb(k,l,p))h=!1;else{for(f=h.next.next;f!==h.prev;){if(Gc(k.x,k.y,l.x,l.y,p.x,p.y,f.x,f.y)&&0<=Qb(f.prev,f,f.next)){h=!1;break a}f=f.next}h=!0}if(h)g.push(y.i/n),g.push(c.i/n),g.push(I.i/n),Hf(c),t=c=I.next;else if(c=I,c===t){if(!e)Te(If(c),g,n,a,b,d,1);else if(1===e){e=g;t=n;y=c;do I=y.prev,h=y.next.next,!Dd(I,h)&&sg(I,y,y.next,h)&&he(I,h)&&he(h,I)&&(e.push(I.i/t),e.push(y.i/t),e.push(h.i/t),Hf(y),Hf(y.next),y=c=h),y=y.next;while(y!==c);c=y;Te(c,g,n,a,b,d,2)}else if(2===e)a:{e=c;do{for(t=e.next.next;t!==e.prev;){if(y=e.i!==t.i){y=e;I=t;if(h=y.next.i!==I.i&&y.prev.i!==I.i){b:{h=y;do{if(h.i!==y.i&&h.next.i!==y.i&&h.i!==I.i&&h.next.i!==I.i&&sg(h,h.next,y,I)){h=!0;break b}h=h.next}while(h!==y);h=!1}h=!h}if(h=h&&he(y,I)&&he(I,y)){h=y;k=!1;l=(y.x+I.x)/2;I=(y.y+I.y)/2;do h.y>I!==h.next.y>I&&h.next.y!==h.y&&l<(h.next.x-h.x)*(I-h.y)/(h.next.y-h.y)+h.x&&(k=!k),h=h.next;while(h!==y);h=k}y=h}if(y){c=Ci(e,t);e=If(e,e.next);c=If(c,c.next);Te(e,g,n,a,b,d);Te(c,g,n,a,b,d);break a}t=t.next}e=e.next}while(e!==c)}break}}}}function Di(c,g){return c.x-g.x}function tg(c,g){var n=g,a=c.x,b=c.y,d=-Infinity,e;do{if(b<=n.y&&b>=n.next.y&&n.next.y!==n.y){var f=n.x+(b-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(f<=a&&f>d){d=f;if(f===a){if(b===n.y)return n;if(b===n.next.y)return n.next}e=n.x=n.x&&n.x>=h&&a!==n.x&&Gc(be.x)&&he(n,c)&&(e=n,l=p)),n=n.next;return e}function rg(c,g,n,a,b){c=32767*(c-n)*b;g=32767*(g-a)*b;c=(c|c<<8)&16711935;c=(c|c<<4)&252645135;c=(c|c<<2)&858993459;g=(g|g<<8)&16711935;g=(g|g<<4)&252645135;g=(g|g<<2)&858993459;return(c|c<<1)&1431655765|((g|g<<1)&1431655765)<<1}function Uj(c){var g=c,n=c;do g.xQb(c.prev,c,c.next)?0<=Qb(c,g,c.next)&&0<=Qb(c,c.prev,g):0>Qb(c,g,c.prev)||0>Qb(c,c.next,g)}function Ci(c,g){var n=new ug(c.i,c.x,c.y),a=new ug(g.i,g.x,g.y),b=c.next,d=g.prev;c.next=g;g.prev=c;n.next=b;b.prev=n;a.next=n;n.prev=a;d.next=a;a.prev=d;return a}function Bi(c,g,n,a){c=new ug(c,g,n);a?(c.next=a.next,c.prev=a,a.next.prev=c,a.next=c):(c.prev=c,c.next=c);return c}function Hf(c){c.next.prev=c.prev;c.prev.next=c.next;c.prevZ&&(c.prevZ.nextZ=c.nextZ);c.nextZ&&(c.nextZ.prevZ=c.prevZ)}function ug(c,g,n){this.i=c;this.x=g;this.y=n;this.nextZ=this.prevZ=this.z=this.next=this.prev=null;this.steiner=!1}function Jf(c){var g=c.length;2Number.EPSILON){var f=Math.sqrt(e),I=Math.sqrt(a*a+y*y),e=g.x-b/f;g=g.y+t/f;y=((n.x-y/I-e)*y-(n.y+a/I-g)*a)/(t*y-b*a);a=e+t*y-c.x;t=g+b*y-c.y;b=a*a+t*t;if(2>=b)return new d(a,t);b=Math.sqrt(b/2)}else c=!1,t>Number.EPSILON?a>Number.EPSILON&&(c=!0):t<-Number.EPSILON?a<-Number.EPSILON&&(c=!0):Math.sign(b)===Math.sign(y)&&(c=!0),c?(a=-b,b=Math.sqrt(e)):(a=t,t=b,b=Math.sqrt(e/2));return new d(a/b,t/b)}function y(c,g){var n,t;for(T=c.length;0<=--T;){n=T;t=T-1;0>t&&(t=c.length-1);var y,d=m+2*q;for(y=0;yu;u++)e=z[h[u]],f=z[h[(u+1)%3]],b[0]=Math.min(e,f),b[1]=Math.max(e,f),e=b[0]+","+b[1],void 0===d[e]?d[e]={index1:b[0],index2:b[1],face1:p,face2:void 0}:d[e].face2=p;for(e in d)if(b=d[e],void 0===b.face2||k[b.face1].normal.dot(k[b.face2].normal)<=a)h=l[b.index1],n.push(h.x,h.y,h.z),h=l[b.index2],n.push(h.x,h.y,h.z);this.addAttribute("position",new K(n,3))}function ne(c,g,n,a,b,d,e,f){L.call(this);this.type="CylinderGeometry";this.parameters={radiusTop:c,radiusBottom:g,height:n,radialSegments:a,heightSegments:b,openEnded:d,thetaStart:e,thetaLength:f};this.fromBufferGeometry(new ld(c,g,n,a,b,d,e,f));this.mergeVertices()}function ld(c,g,n,a,b,e,f,k){function t(n){var t,b,e,z=new d,q=new h,ea=0,r=!0===n?c:g,E=!0===n?1:-1;b=O;for(t=1;t<=a;t++)l.push(0,u*E,0),p.push(0,E,0),m.push(.5,.5),O++;e=O;for(t=0;t<=a;t++){var ma=t/a*k+f,C=Math.cos(ma),ma=Math.sin(ma);q.x=r*ma;q.y=u*E;q.z=r*C;l.push(q.x,q.y,q.z);p.push(0,E,0);z.x=.5*C+.5;z.y=.5*ma*E+.5;m.push(z.x,z.y);O++}for(t=0;tthis.duration&&this.resetDuration()}function Hi(c){switch(c.toLowerCase()){case "scalar":case "double":case "float":case "number":case "integer":return Kd;case "vector":case "vector2":case "vector3":case "vector4":return re;case "color":return od;case "quaternion":return qe;case "bool":case "boolean":return Sf;case "string":return Tf}throw Error("GLE.KeyframeTrack: Unsupported typeName: "+c);}function Ii(c){if(void 0===c.type)throw Error("GLE.KeyframeTrack: track type undefined, can not parse");var g=Hi(c.type);if(void 0===c.times){var a=[],t=[];wb.flattenJSON(c.keys,a,t,"value");c.times=a;c.values=t}return void 0!==g.parse?g.parse(c):new g(c.name,c.times,c.values,c.interpolation)}function Uf(c){this.manager=void 0!==c?c:yb;this.textures={}}function Dg(c){this.manager=void 0!==c?c:yb}function pd(){}function cf(c){"boolean"===typeof c&&(console.warn("GLE.JSONLoader: showStatus parameter has been removed from constructor."),c=void 0);this.manager=void 0!==c?c:yb;this.withCredentials=!1}function wh(c){this.manager=void 0!==c?c:yb;this.texturePath=""}function Eg(c){"undefined"===typeof createImageBitmap&&console.warn("GLE.ImageBitmapLoader: createImageBitmap() not supported.");"undefined"===typeof fetch&&console.warn("GLE.ImageBitmapLoader: fetch() not supported.");this.manager=void 0!==c?c:yb;this.options=void 0}function Fg(){this.type="ShapePath";this.color=new u;this.subPaths=[];this.currentPath=null}function Gg(c){this.type="Font";this.data=c}function Ji(c){this.manager=void 0!==c?c:yb}function xh(c){this.manager=void 0!==c?c:yb}function yh(){this.type="StereoCamera";this.aspect=1;this.eyeSep=.064;this.cameraL=new Ra;this.cameraL.layers.enable(1);this.cameraL.matrixAutoUpdate=!1;this.cameraR=new Ra;this.cameraR.layers.enable(2);this.cameraR.matrixAutoUpdate=!1}function Ld(c,g,a){F.call(this);this.type="CubeCamera";var n=new Ra(90,1,c,g);n.up.set(0,-1,0);n.lookAt(new h(1,0,0));this.add(n);var b=new Ra(90,1,c,g);b.up.set(0,-1,0);b.lookAt(new h(-1,0,0));this.add(b);var d=new Ra(90,1,c,g);d.up.set(0,0,1);d.lookAt(new h(0,1,0));this.add(d);var e=new Ra(90,1,c,g);e.up.set(0,0,-1);e.lookAt(new h(0,-1,0));this.add(e);var f=new Ra(90,1,c,g);f.up.set(0,-1,0);f.lookAt(new h(0,0,1));this.add(f);var k=new Ra(90,1,c,g);k.up.set(0,-1,0);k.lookAt(new h(0,0,-1));this.add(k);this.renderTarget=new x(a,a,{format:1022,magFilter:1006,minFilter:1006});this.renderTarget.texture.name="CubeCamera";this.update=function(c,g){null===this.parent&&this.uld();var a=this.renderTarget,t=a.texture.generateMipmaps;a.texture.generateMipmaps=!1;a.activeCubeFace=0;c.render(g,n,a);a.activeCubeFace=1;c.render(g,b,a);a.activeCubeFace=2;c.render(g,d,a);a.activeCubeFace=3;c.render(g,e,a);a.activeCubeFace=4;c.render(g,f,a);a.texture.generateMipmaps=t;a.activeCubeFace=5;c.render(g,k,a);c.setRenderTarget(null)};this.clear=function(c,g,a,n){for(var t=this.renderTarget,b=0;6>b;b++)t.activeCubeFace=b,c.setRenderTarget(t),c.clear(g,a,n);c.setRenderTarget(null)}}function zh(){F.call(this);this.type="AudioListener";this.context=Hg.getContext();this.gain=this.context.createGain();this.gain.connect(this.context.destination);this.filter=null}function df(c){F.call(this);this.type="Audio";this.context=c.context;this.gain=this.context.createGain();this.gain.connect(c.getInput());this.autoplay=!1;this.buffer=null;this.loop=!1;this.offset=this.startTime=0;this.playbackRate=1;this.isPlaying=!1;this.hasPlaybackControl=!0;this.sourceType="empty";this.filters=[]}function Ah(c){df.call(this,c);this.panner=this.context.createPanner();this.panner.connect(this.gain)}function Ig(c,g){this.analyser=c.context.createAnalyser();this.analyser.fftSize=void 0!==g?g:2048;this.data=new Uint8Array(this.analyser.frequencyBinCount);c.getOutput().connect(this.analyser)}function Md(c,g,a){this.binding=c;this.valueSize=a;c=Float64Array;switch(g){case "quaternion":g=this._slerp;break;case "string":case "bool":c=Array;g=this._select;break;default:g=this._lerp}this.buffer=new c(4*a);this._mixBufferRegion=g;this.referenceCount=this.useCount=this.cumulativeWeight=0}function Vf(c,g,a){a=a||Eb.parseTrackName(g);this._targetGroup=c;this._bindings=c.subscribe_(g,a)}function Eb(c,g,a){this.path=g;this.parsedPath=a||Eb.parseTrackName(g);this.node=Eb.findNode(c,this.parsedPath.nodeName)||c;this.rootNode=c}function Bh(){this.uuid=Aa.generateUUID();this._objects=Array.prototype.slice.call(arguments);this.nCachedObjects_=0;var c={};this._indicesByUUID=c;for(var g=0,a=arguments.length;g!==a;++g)c[arguments[g].uuid]=g;this._paths=[];this._parsedPaths=[];this._bindings=[];this._bindingsIndicesByPath={};var t=this;this.stats={objects:{get total(){return t._objects.length},get inUse(){return this.total-t.nCachedObjects_}},get bindingsPerObject(){return t._bindings.length}}}function Ki(c,g,a){this._mixer=c;this._clip=g;this._localRoot=a||null;c=g.tracks;g=c.length;a=Array(g);for(var n={endingStart:2400,endingEnd:2400},b=0;b!==g;++b){var d=c[b].createInterpolant(null);a[b]=d;d.settings=n}this._interpolantSettings=n;this._interpolants=a;this._propertyBindings=Array(g);this._weightInterpolant=this._timeScaleInterpolant=this._byClipCacheIndex=this._cacheIndex=null;this.loop=2200;this._loopCount=-1;this._startTime=null;this.time=0;this._effectiveWeight=this.weight=this._effectiveTimeScale=this.timeScale=1;this.repetitions=Infinity;this.paused=!1;this.enabled=!0;this.clampWhenFinished=!1;this.zeroSlopeAtEnd=this.zeroSlopeAtStart=!0}function Jg(c){this._root=c;this._initMemoryManager();this.time=this._accuIndex=0;this.timeScale=1}function Wf(c,g){"string"===typeof c&&(console.warn("GLE.Uniform: Type parameter is no longer needed."),c=g);this.value=c}function Kg(){R.call(this);this.type="InstancedBufferGeometry";this.maxInstancedCount=void 0}function Lg(c,g,a){ae.call(this,c,g);this.meshPerAttribute=a||1}function qd(c,g,a,t){"number"===typeof a&&(t=a,a=!1,console.error("GLE.InstancedBufferAttribute: The constructor now expects normalized as the third argument."));A.call(this,c,g,a);this.meshPerAttribute=t||1}function Li(c,g,a,t){this.ray=new ja(c,g);this.near=a||0;this.far=t||Infinity;this.params={Mesh:{},Line:{},LOD:{},Points:{threshold:1},Sprite:{}};Object.defineProperties(this.params,{PointCloud:{get:function(){console.warn("GLE.Rr: params.PointCloud has been renamed to params.Points.");return this.Points}}})}function Mi(c,g){return c.distance-g.distance}function Mg(c,g,a,t){if(!1!==c.visible&&(c.raycast(g,a),!0===t)){c=c.children;t=0;for(var n=c.length;tb;b++,d++){var e=b/32*Math.PI*2,f=d/32*Math.PI*2;t.push(Math.cos(e),Math.sin(e),1,Math.cos(f),Math.sin(f),1)}a.addAttribute("position",new K(t,3));t=new Da({fog:!1});this.cone=new Ha(a,t);this.add(this.cone);this.update()}function Oi(c){var g=[];c&&c.isBone&&g.push(c);for(var a=0;ac?-1:0g;g++)c[g]=(16>g?"0":"")+g.toString(16);return function(){var g=4294967295*Math.random()|0,a=4294967295*Math.random()|0,b=4294967295*Math.random()|0,d=4294967295*Math.random()|0;return(c[g&255]+c[g>>8&255]+c[g>>16&255]+c[g>>24&255]+"-"+c[a&255]+c[a>>8&255]+"-"+c[a>>16&15|64]+c[a>>24&255]+"-"+c[b&63|128]+c[b>>8&255]+"-"+c[b>>16&255]+c[b>>24&255]+c[d&255]+c[d>>8&255]+c[d>>16&255]+c[d>>24&255]).toUpperCase()}}(),clamp:function(c,g,a){return Math.max(g,Math.min(a,c))},euclideanModulo:function(c,g){return(c%g+g)%g},mapLinear:function(c,g,a,b,d){return b+(c-g)*(d-b)/(a-g)},lerp:function(c,g,a){return(1-a)*c+a*g},smoothstep:function(c,g,a){if(c<=g)return 0;if(c>=a)return 1;c=(c-g)/(a-g);return c*c*(3-2*c)},smootherstep:function(c,g,a){if(c<=g)return 0;if(c>=a)return 1;c=(c-g)/(a-g);return c*c*c*(c*(6*c-15)+10)},randInt:function(c,g){return c+Math.floor(Math.random()*(g-c+1))},randFloat:function(c,g){return c+Math.random()*(g-c)},randFloatSpread:function(c){return c*(.5-Math.random())},degToRad:function(c){return c*Aa.DEG2RAD},radToDeg:function(c){return c*Aa.RAD2DEG},isPowerOfTwo:function(c){return 0===(c&c-1)&&0!==c},ceilPowerOfTwo:function(c){return Math.pow(2,Math.ceil(Math.log(c)/Math.LN2))},floorPowerOfTwo:function(c){return Math.pow(2,Math.floor(Math.log(c)/Math.LN2))}};Object.defineProperties(d.prototype,{width:{get:function(){return this.x},set:function(c){this.x=c}},height:{get:function(){return this.y},set:function(c){this.y=c}}});Object.assign(d.prototype,{isVector2:!0,set:function(c,g){this.x=c;this.y=g;return this},setScalar:function(c){this.y=this.x=c;return this},setX:function(c){this.x=c;return this},setY:function(c){this.y=c;return this},setComponent:function(c,g){switch(c){case 0:this.x=g;break;case 1:this.y=g;break;default:throw Error("index is out of range: "+c);}return this},getComponent:function(c){switch(c){case 0:return this.x;case 1:return this.y;default:throw Error("index is out of range: "+c);}},clone:function(){return new this.constructor(this.x,this.y)},copy:function(c){this.x=c.x;this.y=c.y;return this},add:function(c,g){if(void 0!==g)return console.warn("GLE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(c,g);this.x+=c.x;this.y+=c.y;return this},addScalar:function(c){this.x+=c;this.y+=c;return this},addVectors:function(c,g){this.x=c.x+g.x;this.y=c.y+g.y;return this},addScaledVector:function(c,g){this.x+=c.x*g;this.y+=c.y*g;return this},sub:function(c,g){if(void 0!==g)return console.warn("GLE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(c,g);this.x-=c.x;this.y-=c.y;return this},subScalar:function(c){this.x-=c;this.y-=c;return this},subVectors:function(c,g){this.x=c.x-g.x;this.y=c.y-g.y;return this},multiply:function(c){this.x*=c.x;this.y*=c.y;return this},multiplyScalar:function(c){this.x*=c;this.y*=c;return this},divide:function(c){this.x/=c.x;this.y/=c.y;return this},divideScalar:function(c){return this.multiplyScalar(1/c)},applyMatrix3:function(c){var g=this.x,a=this.y;c=c.elements;this.x=c[0]*g+c[3]*a+c[6];this.y=c[1]*g+c[4]*a+c[7];return this},min:function(c){this.x=Math.min(this.x,c.x);this.y=Math.min(this.y,c.y);return this},max:function(c){this.x=Math.max(this.x,c.x);this.y=Math.max(this.y,c.y);return this},clamp:function(c,g){this.x=Math.max(c.x,Math.min(g.x,this.x));this.y=Math.max(c.y,Math.min(g.y,this.y));return this},clampScalar:function(){var c=new d,g=new d;return function(a,b){c.set(a,a);g.set(b,b);return this.clamp(c,g)}}(),clampLength:function(c,g){var a=this.length();return this.divideScalar(a||1).multiplyScalar(Math.max(c,Math.min(g,a)))},floor:function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);return this},ceil:function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);return this},round:function(){this.x=Math.round(this.x);this.y=Math.round(this.y);return this},roundToZero:function(){this.x=0>this.x?Math.ceil(this.x):Math.floor(this.x);this.y=0>this.y?Math.ceil(this.y):Math.floor(this.y);return this},negate:function(){this.x=-this.x;this.y=-this.y;return this},dot:function(c){return this.x*c.x+this.y*c.y},cross:function(c){return this.x*c.y-this.y*c.x},lengthSq:function(){return this.x*this.x+this.y*this.y},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)},normalize:function(){return this.divideScalar(this.length()||1)},angle:function(){var c=Math.atan2(this.y,this.x);0>c&&(c+=2*Math.PI);return c},distanceTo:function(c){return Math.sqrt(this.distanceToSquared(c))},distanceToSquared:function(c){var g=this.x-c.x;c=this.y-c.y;return g*g+c*c},manhattanDistanceTo:function(c){return Math.abs(this.x-c.x)+Math.abs(this.y-c.y)},setLength:function(c){return this.normalize().multiplyScalar(c)},lerp:function(c,g){this.x+=(c.x-this.x)*g;this.y+=(c.y-this.y)*g;return this},lerpVectors:function(c,g,a){return this.subVectors(g,c).multiplyScalar(a).add(c)},equals:function(c){return c.x===this.x&&c.y===this.y},fromArray:function(c,g){void 0===g&&(g=0);this.x=c[g];this.y=c[g+1];return this},toArray:function(c,g){void 0===c&&(c=[]);void 0===g&&(g=0);c[g]=this.x;c[g+1]=this.y;return c},fromBufferAttribute:function(c,g,a){void 0!==a&&console.warn("GLE.Vector2: offset has been removed from .fromBufferAttribute().");this.x=c.getX(g);this.y=c.getY(g);return this},rotateAround:function(c,g){var a=Math.cos(g),b=Math.sin(g),d=this.x-c.x,e=this.y-c.y;this.x=d*a-e*b+c.x;this.y=d*b+e*a+c.y;return this}});Object.assign(e.prototype,{isMatrix4:!0,set:function(c,g,a,b,d,e,f,h,k,l,p,m,z,u,v,q){var n=this.elements;n[0]=c;n[4]=g;n[8]=a;n[12]=b;n[1]=d;n[5]=e;n[9]=f;n[13]=h;n[2]=k;n[6]=l;n[10]=p;n[14]=m;n[3]=z;n[7]=u;n[11]=v;n[15]=q;return this},identity:function(){this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1);return this},clone:function(){return(new e).fromArray(this.elements)},copy:function(c){var g=this.elements;c=c.elements;g[0]=c[0];g[1]=c[1];g[2]=c[2];g[3]=c[3];g[4]=c[4];g[5]=c[5];g[6]=c[6];g[7]=c[7];g[8]=c[8];g[9]=c[9];g[10]=c[10];g[11]=c[11];g[12]=c[12];g[13]=c[13];g[14]=c[14];g[15]=c[15];return this},copyPosition:function(c){var g=this.elements;c=c.elements;g[12]=c[12];g[13]=c[13];g[14]=c[14];return this},extractBasis:function(c,g,a){c.setFromMatrixColumn(this,0);g.setFromMatrixColumn(this,1);a.setFromMatrixColumn(this,2);return this},makeBasis:function(c,g,a){this.set(c.x,g.x,a.x,0,c.y,g.y,a.y,0,c.z,g.z,a.z,0,0,0,0,1);return this},extractRotation:function(){var c=new h;return function(g){var a=this.elements,b=g.elements,d=1/c.setFromMatrixColumn(g,0).length(),e=1/c.setFromMatrixColumn(g,1).length();g=1/c.setFromMatrixColumn(g,2).length();a[0]=b[0]*d;a[1]=b[1]*d;a[2]=b[2]*d;a[3]=0;a[4]=b[4]*e;a[5]=b[5]*e;a[6]=b[6]*e;a[7]=0;a[8]=b[8]*g;a[9]=b[9]*g;a[10]=b[10]*g;a[11]=0;a[12]=0;a[13]=0;a[14]=0;a[15]=1;return this}}(),makeRotationFromEuler:function(c){c&&c.isEuler||console.error("GLE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");var g=this.elements,a=c.x,b=c.y,d=c.z,e=Math.cos(a),a=Math.sin(a),f=Math.cos(b),b=Math.sin(b),h=Math.cos(d),d=Math.sin(d);if("XYZ"===c.order){c=e*h;var k=e*d,l=a*h,p=a*d;g[0]=f*h;g[4]=-f*d;g[8]=b;g[1]=k+l*b;g[5]=c-p*b;g[9]=-a*f;g[2]=p-c*b;g[6]=l+k*b;g[10]=e*f}else"YXZ"===c.order?(c=f*h,k=f*d,l=b*h,p=b*d,g[0]=c+p*a,g[4]=l*a-k,g[8]=e*b,g[1]=e*d,g[5]=e*h,g[9]=-a,g[2]=k*a-l,g[6]=p+c*a,g[10]=e*f):"ZXY"===c.order?(c=f*h,k=f*d,l=b*h,p=b*d,g[0]=c-p*a,g[4]=-e*d,g[8]=l+k*a,g[1]=k+l*a,g[5]=e*h,g[9]=p-c*a,g[2]=-e*b,g[6]=a,g[10]=e*f):"ZYX"===c.order?(c=e*h,k=e*d,l=a*h,p=a*d,g[0]=f*h,g[4]=l*b-k,g[8]=c*b+p,g[1]=f*d,g[5]=p*b+c,g[9]=k*b-l,g[2]=-b,g[6]=a*f,g[10]=e*f):"YZX"===c.order?(c=e*f,k=e*b,l=a*f,p=a*b,g[0]=f*h,g[4]=p-c*d,g[8]=l*d+k,g[1]=d,g[5]=e*h,g[9]=-a*h,g[2]=-b*h,g[6]=k*d+l,g[10]=c-p*d):"XZY"===c.order&&(c=e*f,k=e*b,l=a*f,p=a*b,g[0]=f*h,g[4]=-d,g[8]=b*h,g[1]=c*d+p,g[5]=e*h,g[9]=k*d-l,g[2]=l*d-k,g[6]=a*h,g[10]=p*d+c);g[3]=0;g[7]=0;g[11]=0;g[12]=0;g[13]=0;g[14]=0;g[15]=1;return this},makeRotationFromQuaternion:function(){var c=new h(0,0,0),g=new h(1,1,1);return function(a){return this.compose(c,a,g)}}(),lookAt:function(){var c=new h,g=new h,a=new h;return function(n,b,d){var t=this.elements;a.subVectors(n,b);0===a.lengthSq()&&(a.z=1);a.normalize();c.crossVectors(d,a);0===c.lengthSq()&&(1===Math.abs(d.z)?a.x+=1E-4:a.z+=1E-4,a.normalize(),c.crossVectors(d,a));c.normalize();g.crossVectors(a,c);t[0]=c.x;t[4]=g.x;t[8]=a.x;t[1]=c.y;t[5]=g.y;t[9]=a.y;t[2]=c.z;t[6]=g.z;t[10]=a.z;return this}}(),multiply:function(c,g){return void 0!==g?(console.warn("GLE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."),this.multiplyMatrices(c,g)):this.multiplyMatrices(this,c)},premultiply:function(c){return this.multiplyMatrices(c,this)},multiplyMatrices:function(c,g){var a=c.elements,b=g.elements,d=this.elements,e=a[0],f=a[4],h=a[8],k=a[12],l=a[1],p=a[5],m=a[9],z=a[13],u=a[2],v=a[6],q=a[10],r=a[14],E=a[3],C=a[7],w=a[11],a=a[15],B=b[0],D=b[4],x=b[8],J=b[12],A=b[1],X=b[5],sa=b[9],G=b[13],xa=b[2],la=b[6],K=b[10],fa=b[14],Ba=b[3],T=b[7],F=b[11],b=b[15];d[0]=e*B+f*A+h*xa+k*Ba;d[4]=e*D+f*X+h*la+k*T;d[8]=e*x+f*sa+h*K+k*F;d[12]=e*J+f*G+h*fa+k*b;d[1]=l*B+p*A+m*xa+z*Ba;d[5]=l*D+p*X+m*la+z*T;d[9]=l*x+p*sa+m*K+z*F;d[13]=l*J+p*G+m*fa+z*b;d[2]=u*B+v*A+q*xa+r*Ba;d[6]=u*D+v*X+q*la+r*T;d[10]=u*x+v*sa+q*K+r*F;d[14]=u*J+v*G+q*fa+r*b;d[3]=E*B+C*A+w*xa+a*Ba;d[7]=E*D+C*X+w*la+a*T;d[11]=E*x+C*sa+w*K+a*F;d[15]=E*J+C*G+w*fa+a*b;return this},multiplyScalar:function(c){var g=this.elements;g[0]*=c;g[4]*=c;g[8]*=c;g[12]*=c;g[1]*=c;g[5]*=c;g[9]*=c;g[13]*=c;g[2]*=c;g[6]*=c;g[10]*=c;g[14]*=c;g[3]*=c;g[7]*=c;g[11]*=c;g[15]*=c;return this},applyToBufferAttribute:function(){var c=new h;return function(g){for(var a=0,b=g.count;athis.determinant()&&(t=-t);a.x=n[12];a.y=n[13];a.z=n[14];g.copy(this);a=1/t;var n=1/e,f=1/y;g.elements[0]*=a;g.elements[1]*=a;g.elements[2]*=a;g.elements[4]*=n;g.elements[5]*=n;g.elements[6]*=n;g.elements[8]*=f;g.elements[9]*=f;g.elements[10]*=f;b.setFromRotationMatrix(g);d.x=t;d.y=e;d.z=y;return this}}(),makePerspective:function(c,g,a,b,d,e){void 0===e&&console.warn("GLE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.");var n=this.elements;n[0]=2*d/(g-c);n[4]=0;n[8]=(g+c)/(g-c);n[12]=0;n[1]=0;n[5]=2*d/(a-b);n[9]=(a+b)/(a-b);n[13]=0;n[2]=0;n[6]=0;n[10]=-(e+d)/(e-d);n[14]=-2*e*d/(e-d);n[3]=0;n[7]=0;n[11]=-1;n[15]=0;return this},makeOrthographic:function(c,g,a,b,d,e){var n=this.elements,t=1/(g-c),y=1/(a-b),f=1/(e-d);n[0]=2*t;n[4]=0;n[8]=0;n[12]=-((g+c)*t);n[1]=0;n[5]=2*y;n[9]=0;n[13]=-((a+b)*y);n[2]=0;n[6]=0;n[10]=-2*f;n[14]=-((e+d)*f);n[3]=0;n[7]=0;n[11]=0;n[15]=1;return this},equals:function(c){var g=this.elements;c=c.elements;for(var a=0;16>a;a++)if(g[a]!==c[a])return!1;return!0},fromArray:function(c,g){void 0===g&&(g=0);for(var a=0;16>a;a++)this.elements[a]=c[a+g];return this},toArray:function(c,g){void 0===c&&(c=[]);void 0===g&&(g=0);var a=this.elements;c[g]=a[0];c[g+1]=a[1];c[g+2]=a[2];c[g+3]=a[3];c[g+4]=a[4];c[g+5]=a[5];c[g+6]=a[6];c[g+7]=a[7];c[g+8]=a[8];c[g+9]=a[9];c[g+10]=a[10];c[g+11]=a[11];c[g+12]=a[12];c[g+13]=a[13];c[g+14]=a[14];c[g+15]=a[15];return c}});Object.assign(f,{isQuaternion:!0,slerp:function(c,g,a,b){return a.copy(c).slerp(g,b)},slerpFlat:function(c,g,a,b,d,e,f){var n=a[b+0],t=a[b+1],y=a[b+2];a=a[b+3];b=d[e+0];var h=d[e+1],k=d[e+2];d=d[e+3];if(a!==d||n!==b||t!==h||y!==k){e=1-f;var l=n*b+t*h+y*k+a*d,I=0<=l?1:-1,p=1-l*l;p>Number.EPSILON&&(p=Math.sqrt(p),l=Math.atan2(p,l*I),e=Math.sin(e*l)/p,f=Math.sin(f*l)/p);I*=f;n=n*e+b*I;t=t*e+h*I;y=y*e+k*I;a=a*e+d*I;e===1-f&&(f=1/Math.sqrt(n*n+t*t+y*y+a*a),n*=f,t*=f,y*=f,a*=f)}c[g]=n;c[g+1]=t;c[g+2]=y;c[g+3]=a}});Object.defineProperties(f.prototype,{x:{get:function(){return this._x},set:function(c){this._x=c;this.onChangeCallback()}},y:{get:function(){return this._y},set:function(c){this._y=c;this.onChangeCallback()}},z:{get:function(){return this._z},set:function(c){this._z=c;this.onChangeCallback()}},w:{get:function(){return this._w},set:function(c){this._w=c;this.onChangeCallback()}}});Object.assign(f.prototype,{set:function(c,g,a,b){this._x=c;this._y=g;this._z=a;this._w=b;this.onChangeCallback();return this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._w)},copy:function(c){this._x=c.x;this._y=c.y;this._z=c.z;this._w=c.w;this.onChangeCallback();return this},setFromEuler:function(c,g){if(!c||!c.isEuler)throw Error("GLE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");var a=c._x,b=c._y,d=c._z,e=c.order,f=Math.cos,h=Math.sin,k=f(a/2),l=f(b/2),f=f(d/2),a=h(a/2),b=h(b/2),d=h(d/2);"XYZ"===e?(this._x=a*l*f+k*b*d,this._y=k*b*f-a*l*d,this._z=k*l*d+a*b*f,this._w=k*l*f-a*b*d):"YXZ"===e?(this._x=a*l*f+k*b*d,this._y=k*b*f-a*l*d,this._z=k*l*d-a*b*f,this._w=k*l*f+a*b*d):"ZXY"===e?(this._x=a*l*f-k*b*d,this._y=k*b*f+a*l*d,this._z=k*l*d+a*b*f,this._w=k*l*f-a*b*d):"ZYX"===e?(this._x=a*l*f-k*b*d,this._y=k*b*f+a*l*d,this._z=k*l*d-a*b*f,this._w=k*l*f+a*b*d):"YZX"===e?(this._x=a*l*f+k*b*d,this._y=k*b*f+a*l*d,this._z=k*l*d-a*b*f,this._w=k*l*f-a*b*d):"XZY"===e&&(this._x=a*l*f-k*b*d,this._y=k*b*f-a*l*d,this._z=k*l*d+a*b*f,this._w=k*l*f+a*b*d);if(!1!==g)this.onChangeCallback();return this},setFromAxisAngle:function(c,g){var a=g/2,b=Math.sin(a);this._x=c.x*b;this._y=c.y*b;this._z=c.z*b;this._w=Math.cos(a);this.onChangeCallback();return this},setFromRotationMatrix:function(c){var g=c.elements,a=g[0];c=g[4];var b=g[8],d=g[1],e=g[5],f=g[9],h=g[2],k=g[6],g=g[10],l=a+e+g;0e&&a>g?(a=2*Math.sqrt(1+a-e-g),this._w=(k-f)/a,this._x=.25*a,this._y=(c+d)/a,this._z=(b+h)/a):e>g?(a=2*Math.sqrt(1+e-a-g),this._w=(b-h)/a,this._x=(c+d)/a,this._y=.25*a,this._z=(f+k)/a):(a=2*Math.sqrt(1+g-a-e),this._w=(d-c)/a,this._x=(b+h)/a,this._y=(f+k)/a,this._z=.25*a);this.onChangeCallback();return this},setFromUnitVectors:function(){var c=new h,g;return function(a,b){void 0===c&&(c=new h);g=a.dot(b)+1;1E-6>g?(g=0,Math.abs(a.x)>Math.abs(a.z)?c.set(-a.y,a.x,0):c.set(0,-a.z,a.y)):c.crossVectors(a,b);this._x=c.x;this._y=c.y;this._z=c.z;this._w=g;return this.normalize()}}(),angleTo:function(c){return 2*Math.acos(Math.abs(Aa.clamp(this.dot(c),-1,1)))},rotateTowards:function(c,g){var a=this.angleTo(c);if(0===a)return this;this.slerp(c,Math.min(1,g/a));return this},inverse:function(){return this.conjugate()},conjugate:function(){this._x*=-1;this._y*=-1;this._z*=-1;this.onChangeCallback();return this},dot:function(c){return this._x*c._x+this._y*c._y+this._z*c._z+this._w*c._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 c=this.length();0===c?(this._z=this._y=this._x=0,this._w=1):(c=1/c,this._x*=c,this._y*=c,this._z*=c,this._w*=c);this.onChangeCallback();return this},multiply:function(c,g){return void 0!==g?(console.warn("GLE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."),this.multiplyQuaternions(c,g)):this.multiplyQuaternions(this,c)},premultiply:function(c){return this.multiplyQuaternions(c,this)},multiplyQuaternions:function(c,g){var a=c._x,b=c._y,d=c._z,e=c._w,f=g._x,h=g._y,k=g._z,l=g._w;this._x=a*l+e*f+b*k-d*h;this._y=b*l+e*h+d*f-a*k;this._z=d*l+e*k+a*h-b*f;this._w=e*l-a*f-b*h-d*k;this.onChangeCallback();return this},slerp:function(c,g){if(0===g)return this;if(1===g)return this.copy(c);var a=this._x,b=this._y,d=this._z,e=this._w,f=e*c._w+a*c._x+b*c._y+d*c._z;0>f?(this._w=-c._w,this._x=-c._x,this._y=-c._y,this._z=-c._z,f=-f):this.copy(c);if(1<=f)return this._w=e,this._x=a,this._y=b,this._z=d,this;var h=1-f*f;if(h<=Number.EPSILON)return h=1-g,this._w=h*e+g*this._w,this._x=h*a+g*this._x,this._y=h*b+g*this._y,this._z=h*d+g*this._z,this.normalize();var h=Math.sqrt(h),k=Math.atan2(h,f),f=Math.sin((1-g)*k)/h,h=Math.sin(g*k)/h;this._w=e*f+this._w*h;this._x=a*f+this._x*h;this._y=b*f+this._y*h;this._z=d*f+this._z*h;this.onChangeCallback();return this},equals:function(c){return c._x===this._x&&c._y===this._y&&c._z===this._z&&c._w===this._w},fromArray:function(c,g){void 0===g&&(g=0);this._x=c[g];this._y=c[g+1];this._z=c[g+2];this._w=c[g+3];this.onChangeCallback();return this},toArray:function(c,g){void 0===c&&(c=[]);void 0===g&&(g=0);c[g]=this._x;c[g+1]=this._y;c[g+2]=this._z;c[g+3]=this._w;return c},onChange:function(c){this.onChangeCallback=c;return this},onChangeCallback:function(){}});Object.assign(h.prototype,{isVector3:!0,set:function(c,g,a){this.x=c;this.y=g;this.z=a;return this},setScalar:function(c){this.z=this.y=this.x=c;return this},setX:function(c){this.x=c;return this},setY:function(c){this.y=c;return this},setZ:function(c){this.z=c;return this},setComponent:function(c,g){switch(c){case 0:this.x=g;break;case 1:this.y=g;break;case 2:this.z=g;break;default:throw Error("index is out of range: "+c);}return this},getComponent:function(c){switch(c){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw Error("index is out of range: "+c);}},clone:function(){return new this.constructor(this.x,this.y,this.z)},copy:function(c){this.x=c.x;this.y=c.y;this.z=c.z;return this},add:function(c,g){if(void 0!==g)return console.warn("GLE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(c,g);this.x+=c.x;this.y+=c.y;this.z+=c.z;return this},addScalar:function(c){this.x+=c;this.y+=c;this.z+=c;return this},addVectors:function(c,g){this.x=c.x+g.x;this.y=c.y+g.y;this.z=c.z+g.z;return this},addScaledVector:function(c,g){this.x+=c.x*g;this.y+=c.y*g;this.z+=c.z*g;return this},sub:function(c,g){if(void 0!==g)return console.warn("GLE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(c,g);this.x-=c.x;this.y-=c.y;this.z-=c.z;return this},subScalar:function(c){this.x-=c;this.y-=c;this.z-=c;return this},subVectors:function(c,g){this.x=c.x-g.x;this.y=c.y-g.y;this.z=c.z-g.z;return this},multiply:function(c,g){if(void 0!==g)return console.warn("GLE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead."),this.multiplyVectors(c,g);this.x*=c.x;this.y*=c.y;this.z*=c.z;return this},multiplyScalar:function(c){this.x*=c;this.y*=c;this.z*=c;return this},multiplyVectors:function(c,g){this.x=c.x*g.x;this.y=c.y*g.y;this.z=c.z*g.z;return this},applyEuler:function(){var c=new f;return function(g){g&&g.isEuler||console.error("GLE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order.");return this.applyQuaternion(c.setFromEuler(g))}}(),applyAxisAngle:function(){var c=new f;return function(g,a){return this.applyQuaternion(c.setFromAxisAngle(g,a))}}(),applyMatrix3:function(c){var g=this.x,a=this.y,b=this.z;c=c.elements;this.x=c[0]*g+c[3]*a+c[6]*b;this.y=c[1]*g+c[4]*a+c[7]*b;this.z=c[2]*g+c[5]*a+c[8]*b;return this},applyMatrix4:function(c){var g=this.x,a=this.y,b=this.z;c=c.elements;var d=1/(c[3]*g+c[7]*a+c[11]*b+c[15]);this.x=(c[0]*g+c[4]*a+c[8]*b+c[12])*d;this.y=(c[1]*g+c[5]*a+c[9]*b+c[13])*d;this.z=(c[2]*g+c[6]*a+c[10]*b+c[14])*d;return this},applyQuaternion:function(c){var g=this.x,a=this.y,b=this.z,d=c.x,e=c.y,f=c.z;c=c.w;var h=c*g+e*b-f*a,k=c*a+f*g-d*b,l=c*b+d*a-e*g,g=-d*g-e*a-f*b;this.x=h*c+g*-d+k*-f-l*-e;this.y=k*c+g*-e+l*-d-h*-f;this.z=l*c+g*-f+h*-e-k*-d;return this},project:function(c){return this.applyMatrix4(c.matrixWorldInverse).applyMatrix4(c.projectionMatrix)},unproject:function(){var c=new e;return function(g){return this.applyMatrix4(c.getInverse(g.projectionMatrix)).applyMatrix4(g.matrixWorld)}}(),transformDirection:function(c){var g=this.x,a=this.y,b=this.z;c=c.elements;this.x=c[0]*g+c[4]*a+c[8]*b;this.y=c[1]*g+c[5]*a+c[9]*b;this.z=c[2]*g+c[6]*a+c[10]*b;return this.normalize()},divide:function(c){this.x/=c.x;this.y/=c.y;this.z/=c.z;return this},divideScalar:function(c){return this.multiplyScalar(1/c)},min:function(c){this.x=Math.min(this.x,c.x);this.y=Math.min(this.y,c.y);this.z=Math.min(this.z,c.z);return this},max:function(c){this.x=Math.max(this.x,c.x);this.y=Math.max(this.y,c.y);this.z=Math.max(this.z,c.z);return this},clamp:function(c,g){this.x=Math.max(c.x,Math.min(g.x,this.x));this.y=Math.max(c.y,Math.min(g.y,this.y));this.z=Math.max(c.z,Math.min(g.z,this.z));return this},clampScalar:function(){var c=new h,g=new h;return function(a,b){c.set(a,a,a);g.set(b,b,b);return this.clamp(c,g)}}(),clampLength:function(c,g){var a=this.length();return this.divideScalar(a||1).multiplyScalar(Math.max(c,Math.min(g,a)))},floor:function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);this.z=Math.floor(this.z);return this},ceil:function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);this.z=Math.ceil(this.z);return this},round:function(){this.x=Math.round(this.x);this.y=Math.round(this.y);this.z=Math.round(this.z);return this},roundToZero:function(){this.x=0>this.x?Math.ceil(this.x):Math.floor(this.x);this.y=0>this.y?Math.ceil(this.y):Math.floor(this.y);this.z=0>this.z?Math.ceil(this.z):Math.floor(this.z);return this},negate:function(){this.x=-this.x;this.y=-this.y;this.z=-this.z;return this},dot:function(c){return this.x*c.x+this.y*c.y+this.z*c.z},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)},normalize:function(){return this.divideScalar(this.length()||1)},setLength:function(c){return this.normalize().multiplyScalar(c)},lerp:function(c,g){this.x+=(c.x-this.x)*g;this.y+=(c.y-this.y)*g;this.z+=(c.z-this.z)*g;return this},lerpVectors:function(c,g,a){return this.subVectors(g,c).multiplyScalar(a).add(c)},cross:function(c,g){return void 0!==g?(console.warn("GLE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(c,g)):this.crossVectors(this,c)},crossVectors:function(c,g){var a=c.x,b=c.y,d=c.z,e=g.x,f=g.y,h=g.z;this.x=b*h-d*f;this.y=d*e-a*h;this.z=a*f-b*e;return this},projectOnVector:function(c){var g=c.dot(this)/c.lengthSq();return this.copy(c).multiplyScalar(g)},projectOnPlane:function(){var c=new h;return function(g){c.copy(this).projectOnVector(g);return this.sub(c)}}(),reflect:function(){var c=new h;return function(g){return this.sub(c.copy(g).multiplyScalar(2*this.dot(g)))}}(),angleTo:function(c){c=this.dot(c)/Math.sqrt(this.lengthSq()*c.lengthSq());return Math.acos(Aa.clamp(c,-1,1))},distanceTo:function(c){return Math.sqrt(this.distanceToSquared(c))},distanceToSquared:function(c){var g=this.x-c.x,a=this.y-c.y;c=this.z-c.z;return g*g+a*a+c*c},manhattanDistanceTo:function(c){return Math.abs(this.x-c.x)+Math.abs(this.y-c.y)+Math.abs(this.z-c.z)},setFromSpherical:function(c){return this.setFromSphericalCoords(c.radius,c.phi,c.theta)},setFromSphericalCoords:function(c,g,a){var n=Math.sin(g)*c;this.x=n*Math.sin(a);this.y=Math.cos(g)*c;this.z=n*Math.cos(a);return this},setFromCylindrical:function(c){return this.setFromCylindricalCoords(c.radius,c.theta,c.y)},setFromCylindricalCoords:function(c,g,a){this.x=c*Math.sin(g);this.y=a;this.z=c*Math.cos(g);return this},setFromMatrixPosition:function(c){c=c.elements;this.x=c[12];this.y=c[13];this.z=c[14];return this},setFromMatrixScale:function(c){var g=this.setFromMatrixColumn(c,0).length(),a=this.setFromMatrixColumn(c,1).length();c=this.setFromMatrixColumn(c,2).length();this.x=g;this.y=a;this.z=c;return this},setFromMatrixColumn:function(c,g){return this.fromArray(c.elements,4*g)},equals:function(c){return c.x===this.x&&c.y===this.y&&c.z===this.z},fromArray:function(c,g){void 0===g&&(g=0);this.x=c[g];this.y=c[g+1];this.z=c[g+2];return this},toArray:function(c,g){void 0===c&&(c=[]);void 0===g&&(g=0);c[g]=this.x;c[g+1]=this.y;c[g+2]=this.z;return c},fromBufferAttribute:function(c,g,a){void 0!==a&&console.warn("GLE.Vector3: offset has been removed from .fromBufferAttribute().");this.x=c.getX(g);this.y=c.getY(g);this.z=c.getZ(g);return this}});Object.assign(l.prototype,{isMatrix3:!0,set:function(c,g,a,b,d,e,f,h,k){var n=this.elements;n[0]=c;n[1]=b;n[2]=f;n[3]=g;n[4]=d;n[5]=h;n[6]=a;n[7]=e;n[8]=k;return this},identity:function(){this.set(1,0,0,0,1,0,0,0,1);return this},clone:function(){return(new this.constructor).fromArray(this.elements)},copy:function(c){var g=this.elements;c=c.elements;g[0]=c[0];g[1]=c[1];g[2]=c[2];g[3]=c[3];g[4]=c[4];g[5]=c[5];g[6]=c[6];g[7]=c[7];g[8]=c[8];return this},setFromMatrix4:function(c){c=c.elements;this.set(c[0],c[4],c[8],c[1],c[5],c[9],c[2],c[6],c[10]);return this},applyToBufferAttribute:function(){var c=new h;return function(g){for(var a=0,b=g.count;aa;a++)if(g[a]!==c[a])return!1;return!0},fromArray:function(c,g){void 0===g&&(g=0);for(var a=0;9>a;a++)this.elements[a]=c[a+g];return this},toArray:function(c,g){void 0===c&&(c=[]);void 0===g&&(g=0);var a=this.elements;c[g]=a[0];c[g+1]=a[1];c[g+2]=a[2];c[g+3]=a[3];c[g+4]=a[4];c[g+5]=a[5];c[g+6]=a[6];c[g+7]=a[7];c[g+8]=a[8];return c}});var Kc={getDataURL:function(c){var g;if(c instanceof HTMLCanvasElement)g=c;else{g=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");g.width=c.width;g.height=c.height;var a=g.getContext("2d");c instanceof ImageData?a.putImageData(c,0,0):a.drawImage(c,0,0,c.width,c.height)}return 2048c.x||1c.x?0:1;break;case 1002:c.x=1===Math.abs(Math.floor(c.x)%2)?Math.ceil(c.x)-c.x:c.x-Math.floor(c.x)}if(0>c.y||1c.y?0:1;break;case 1002:c.y=1===Math.abs(Math.floor(c.y)%2)?Math.ceil(c.y)-c.y:c.y-Math.floor(c.y)}this.flipY&&(c.y=1-c.y);return c}});Object.defineProperty(m.prototype,"needsUpdate",{set:function(c){!0===c&&this.version++}});Object.assign(r.prototype,{isVector4:!0,set:function(c,g,a,b){this.x=c;this.y=g;this.z=a;this.w=b;return this},setScalar:function(c){this.w=this.z=this.y=this.x=c;return this},setX:function(c){this.x=c;return this},setY:function(c){this.y=c;return this},setZ:function(c){this.z=c;return this},setW:function(c){this.w=c;return this},setComponent:function(c,g){switch(c){case 0:this.x=g;break;case 1:this.y=g;break;case 2:this.z=g;break;case 3:this.w=g;break;default:throw Error("index is out of range: "+c);}return this},getComponent:function(c){switch(c){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw Error("index is out of range: "+c);}},clone:function(){return new this.constructor(this.x,this.y,this.z,this.w)},copy:function(c){this.x=c.x;this.y=c.y;this.z=c.z;this.w=void 0!==c.w?c.w:1;return this},add:function(c,g){if(void 0!==g)return console.warn("GLE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(c,g);this.x+=c.x;this.y+=c.y;this.z+=c.z;this.w+=c.w;return this},addScalar:function(c){this.x+=c;this.y+=c;this.z+=c;this.w+=c;return this},addVectors:function(c,g){this.x=c.x+g.x;this.y=c.y+g.y;this.z=c.z+g.z;this.w=c.w+g.w;return this},addScaledVector:function(c,g){this.x+=c.x*g;this.y+=c.y*g;this.z+=c.z*g;this.w+=c.w*g;return this},sub:function(c,g){if(void 0!==g)return console.warn("GLE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(c,g);this.x-=c.x;this.y-=c.y;this.z-=c.z;this.w-=c.w;return this},subScalar:function(c){this.x-=c;this.y-=c;this.z-=c;this.w-=c;return this},subVectors:function(c,g){this.x=c.x-g.x;this.y=c.y-g.y;this.z=c.z-g.z;this.w=c.w-g.w;return this},multiplyScalar:function(c){this.x*=c;this.y*=c;this.z*=c;this.w*=c;return this},applyMatrix4:function(c){var g=this.x,a=this.y,b=this.z,d=this.w;c=c.elements;this.x=c[0]*g+c[4]*a+c[8]*b+c[12]*d;this.y=c[1]*g+c[5]*a+c[9]*b+c[13]*d;this.z=c[2]*g+c[6]*a+c[10]*b+c[14]*d;this.w=c[3]*g+c[7]*a+c[11]*b+c[15]*d;return this},divideScalar:function(c){return this.multiplyScalar(1/c)},setAxisAngleFromQuaternion:function(c){this.w=2*Math.acos(c.w);var g=Math.sqrt(1-c.w*c.w);1E-4>g?(this.x=1,this.z=this.y=0):(this.x=c.x/g,this.y=c.y/g,this.z=c.z/g);return this},setAxisAngleFromRotationMatrix:function(c){var g,a,b;c=c.elements;var d=c[0];b=c[4];var e=c[8],f=c[1],h=c[5],k=c[9];a=c[2];g=c[6];var l=c[10];if(.01>Math.abs(b-f)&&.01>Math.abs(e-a)&&.01>Math.abs(k-g)){if(.1>Math.abs(b+f)&&.1>Math.abs(e+a)&&.1>Math.abs(k+g)&&.1>Math.abs(d+h+l-3))return this.set(1,0,0,0),this;c=Math.PI;d=(d+1)/2;h=(h+1)/2;l=(l+1)/2;b=(b+f)/4;e=(e+a)/4;k=(k+g)/4;d>h&&d>l?.01>d?(g=0,b=a=.707106781):(g=Math.sqrt(d),a=b/g,b=e/g):h>l?.01>h?(g=.707106781,a=0,b=.707106781):(a=Math.sqrt(h),g=b/a,b=k/a):.01>l?(a=g=.707106781,b=0):(b=Math.sqrt(l),g=e/b,a=k/b);this.set(g,a,b,c);return this}c=Math.sqrt((g-k)*(g-k)+(e-a)*(e-a)+(f-b)*(f-b));.001>Math.abs(c)&&(c=1);this.x=(g-k)/c;this.y=(e-a)/c;this.z=(f-b)/c;this.w=Math.acos((d+h+l-1)/2);return this},min:function(c){this.x=Math.min(this.x,c.x);this.y=Math.min(this.y,c.y);this.z=Math.min(this.z,c.z);this.w=Math.min(this.w,c.w);return this},max:function(c){this.x=Math.max(this.x,c.x);this.y=Math.max(this.y,c.y);this.z=Math.max(this.z,c.z);this.w=Math.max(this.w,c.w);return this},clamp:function(c,g){this.x=Math.max(c.x,Math.min(g.x,this.x));this.y=Math.max(c.y,Math.min(g.y,this.y));this.z=Math.max(c.z,Math.min(g.z,this.z));this.w=Math.max(c.w,Math.min(g.w,this.w));return this},clampScalar:function(){var c,g;return function(a,b){void 0===c&&(c=new r,g=new r);c.set(a,a,a,a);g.set(b,b,b,b);return this.clamp(c,g)}}(),clampLength:function(c,g){var a=this.length();return this.divideScalar(a||1).multiplyScalar(Math.max(c,Math.min(g,a)))},floor:function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);this.z=Math.floor(this.z);this.w=Math.floor(this.w);return this},ceil:function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);this.z=Math.ceil(this.z);this.w=Math.ceil(this.w);return this},round:function(){this.x=Math.round(this.x);this.y=Math.round(this.y);this.z=Math.round(this.z);this.w=Math.round(this.w);return this},roundToZero:function(){this.x=0>this.x?Math.ceil(this.x):Math.floor(this.x);this.y=0>this.y?Math.ceil(this.y):Math.floor(this.y);this.z=0>this.z?Math.ceil(this.z):Math.floor(this.z);this.w=0>this.w?Math.ceil(this.w):Math.floor(this.w);return this},negate:function(){this.x=-this.x;this.y=-this.y;this.z=-this.z;this.w=-this.w;return this},dot:function(c){return this.x*c.x+this.y*c.y+this.z*c.z+this.w*c.w},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)},normalize:function(){return this.divideScalar(this.length()||1)},setLength:function(c){return this.normalize().multiplyScalar(c)},lerp:function(c,g){this.x+=(c.x-this.x)*g;this.y+=(c.y-this.y)*g;this.z+=(c.z-this.z)*g;this.w+=(c.w-this.w)*g;return this},lerpVectors:function(c,g,a){return this.subVectors(g,c).multiplyScalar(a).add(c)},equals:function(c){return c.x===this.x&&c.y===this.y&&c.z===this.z&&c.w===this.w},fromArray:function(c,g){void 0===g&&(g=0);this.x=c[g];this.y=c[g+1];this.z=c[g+2];this.w=c[g+3];return this},toArray:function(c,g){void 0===c&&(c=[]);void 0===g&&(g=0);c[g]=this.x;c[g+1]=this.y;c[g+2]=this.z;c[g+3]=this.w;return c},fromBufferAttribute:function(c,g,a){void 0!==a&&console.warn("GLE.Vector4: offset has been removed from .fromBufferAttribute().");this.x=c.getX(g);this.y=c.getY(g);this.z=c.getZ(g);this.w=c.getW(g);return this}});q.prototype=Object.assign(Object.create(b.prototype),{constructor:q,isWt:!0,setSize:function(c,g){if(this.width!==c||this.height!==g)this.width=c,this.height=g,this.dispose();this.viewport.set(0,0,c,g);this.scissor.set(0,0,c,g)},clone:function(){return(new this.constructor).copy(this)},copy:function(c){this.width=c.width;this.height=c.height;this.viewport.copy(c.viewport);this.texture=c.texture.clone();this.depthBuffer=c.depthBuffer;this.stencilBuffer=c.stencilBuffer;this.depthTexture=c.depthTexture;return this},dispose:function(){this.dispatchEvent({type:"dispose"})}});x.prototype=Object.create(q.prototype);x.prototype.constructor=x;x.prototype.isWtCube=!0;G.prototype=Object.create(m.prototype);G.prototype.constructor=G;G.prototype.isDataTexture=!0;Object.assign(B.prototype,{isBox3:!0,set:function(c,g){this.min.copy(c);this.max.copy(g);return this},setFromArray:function(c){for(var g=Infinity,a=Infinity,b=Infinity,d=-Infinity,e=-Infinity,f=-Infinity,h=0,k=c.length;hd&&(d=l);p>e&&(e=p);m>f&&(f=m)}this.min.set(g,a,b);this.max.set(d,e,f);return this},setFromBufferAttribute:function(c){for(var g=Infinity,a=Infinity,b=Infinity,d=-Infinity,e=-Infinity,f=-Infinity,h=0,k=c.count;hd&&(d=l);p>e&&(e=p);m>f&&(f=m)}this.min.set(g,a,b);this.max.set(d,e,f);return this},setFromPoints:function(c){this.makeEmpty();for(var g=0,a=c.length;gthis.max.x||c.ythis.max.y||c.zthis.max.z?!1:!0},containsBox:function(c){return this.min.x<=c.min.x&&c.max.x<=this.max.x&&this.min.y<=c.min.y&&c.max.y<=this.max.y&&this.min.z<=c.min.z&&c.max.z<=this.max.z},getParameter:function(c,g){void 0===g&&(console.warn("GLE.Box3: .getParameter() target is now required"),g=new h);return g.set((c.x-this.min.x)/(this.max.x-this.min.x),(c.y-this.min.y)/(this.max.y-this.min.y),(c.z-this.min.z)/(this.max.z-this.min.z))},intersectsBox:function(c){return c.max.xthis.max.x||c.max.ythis.max.y||c.max.zthis.max.z?!1:!0},intersectsSphere:function(){var c=new h;return function(g){this.clampPoint(g.center,c);return c.distanceToSquared(g.center)<=g.radius*g.radius}}(),intersectsPlane:function(c){var g,a;0=-c.constant},intersectsTriangle:function(){function c(c){var n,d;n=0;for(d=c.length-3;n<=d;n+=3){k.fromArray(c,n);var t=p.x*Math.abs(k.x)+p.y*Math.abs(k.y)+p.z*Math.abs(k.z),e=g.dot(k),f=a.dot(k),y=b.dot(k);if(Math.max(-Math.max(e,f,y),Math.min(e,f,y))>t)return!1}return!0}var g=new h,a=new h,b=new h,d=new h,e=new h,f=new h,k=new h,l=new h,p=new h,m=new h;return function(n){if(this.isEmpty())return!1;this.getCenter(l);p.subVectors(this.max,l);g.subVectors(n.a,l);a.subVectors(n.b,l);b.subVectors(n.c,l);d.subVectors(a,g);e.subVectors(b,a);f.subVectors(g,b);n=[0,-d.z,d.y,0,-e.z,e.y,0,-f.z,f.y,d.z,0,-d.x,e.z,0,-e.x,f.z,0,-f.x,-d.y,d.x,0,-e.y,e.x,0,-f.y,f.x,0];if(!c(n))return!1;n=[1,0,0,0,1,0,0,0,1];if(!c(n))return!1;m.crossVectors(d,e);n=[m.x,m.y,m.z];return c(n)}}(),clampPoint:function(c,g){void 0===g&&(console.warn("GLE.Box3: .clampPoint() target is now required"),g=new h);return g.copy(c).clamp(this.min,this.max)},distanceToPoint:function(){var c=new h;return function(g){return c.copy(g).clamp(this.min,this.max).sub(g).length()}}(),getBoundingSphere:function(){var c=new h;return function(g){void 0===g&&(console.warn("GLE.Box3: .getBoundingSphere() target is now required"),g=new w);this.getCenter(g.center);g.radius=.5*this.getSize(c).length();return g}}(),intersect:function(c){this.min.max(c.min);this.max.min(c.max);this.isEmpty()&&this.makeEmpty();return this},union:function(c){this.min.min(c.min);this.max.max(c.max);return this},applyMatrix4:function(){var c=[new h,new h,new h,new h,new h,new h,new h,new h];return function(g){if(this.isEmpty())return this;c[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(g);c[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(g);c[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(g);c[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(g);c[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(g);c[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(g);c[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(g);c[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(g);this.setFromPoints(c);return this}}(),translate:function(c){this.min.add(c);this.max.add(c);return this},equals:function(c){return c.min.equals(this.min)&&c.max.equals(this.max)}});Object.assign(w.prototype,{set:function(c,g){this.center.copy(c);this.radius=g;return this},setFromPoints:function(){var c=new B;return function(g,a){var n=this.center;void 0!==a?n.copy(a):c.setFromPoints(g).getCenter(n);for(var b=0,d=0,e=g.length;d=this.radius},containsPoint:function(c){return c.distanceToSquared(this.center)<=this.radius*this.radius},distanceToPoint:function(c){return c.distanceTo(this.center)-this.radius},intersectsSphere:function(c){var g=this.radius+c.radius;return c.center.distanceToSquared(this.center)<=g*g},intersectsBox:function(c){return c.intersectsSphere(this)},intersectsPlane:function(c){return Math.abs(c.distanceToPoint(this.center))<=this.radius},clampPoint:function(c,g){var a=this.center.distanceToSquared(c);void 0===g&&(console.warn("GLE.Sphere: .clampPoint() target is now required"),g=new h);g.copy(c);a>this.radius*this.radius&&(g.sub(this.center).normalize(),g.multiplyScalar(this.radius).add(this.center));return g},getBoundingBox:function(c){void 0===c&&(console.warn("GLE.Sphere: .getBoundingBox() target is now required"),c=new B);c.set(this.center,this.center);c.expandByScalar(this.radius);return c},applyMatrix4:function(c){this.center.applyMatrix4(c);this.radius*=c.getMaxScaleOnAxis();return this},translate:function(c){this.center.add(c);return this},equals:function(c){return c.center.equals(this.center)&&c.radius===this.radius}});Object.assign(v.prototype,{set:function(c,g){this.normal.copy(c);this.constant=g;return this},setComponents:function(c,g,a,b){this.normal.set(c,g,a);this.constant=b;return this},setFromNormalAndCoplanarPoint:function(c,g){this.normal.copy(c);this.constant=-g.dot(this.normal);return this},setFromCoplanarPoints:function(){var c=new h,g=new h;return function(a,b,d){b=c.subVectors(d,b).cross(g.subVectors(a,b)).normalize();this.setFromNormalAndCoplanarPoint(b,a);return this}}(),clone:function(){return(new this.constructor).copy(this)},copy:function(c){this.normal.copy(c.normal);this.constant=c.constant;return this},normalize:function(){var c=1/this.normal.length();this.normal.multiplyScalar(c);this.constant*=c;return this},negate:function(){this.constant*=-1;this.normal.negate();return this},distanceToPoint:function(c){return this.normal.dot(c)+this.constant},distanceToSphere:function(c){return this.distanceToPoint(c.center)-c.radius},projectPoint:function(c,g){void 0===g&&(console.warn("GLE.Plane: .projectPoint() target is now required"),g=new h);return g.copy(this.normal).multiplyScalar(-this.distanceToPoint(c)).add(c)},intersectLine:function(){var c=new h;return function(g,a){void 0===a&&(console.warn("GLE.Plane: .intersectLine() target is now required"),a=new h);var n=g.delta(c),b=this.normal.dot(n);if(0===b){if(0===this.distanceToPoint(g.start))return a.copy(g.start)}else if(b=-(g.start.dot(this.normal)+this.constant)/b,!(0>b||1g&&0c&&0a;a++)g[a].copy(c.planes[a]);return this},setFromMatrix:function(c){var g=this.planes,a=c.elements;c=a[0];var b=a[1],d=a[2],e=a[3],f=a[4],h=a[5],k=a[6],l=a[7],p=a[8],m=a[9],z=a[10],u=a[11],q=a[12],v=a[13],r=a[14],a=a[15];g[0].setComponents(e-c,l-f,u-p,a-q).normalize();g[1].setComponents(e+c,l+f,u+p,a+q).normalize();g[2].setComponents(e+b,l+h,u+m,a+v).normalize();g[3].setComponents(e-b,l-h,u-m,a-v).normalize();g[4].setComponents(e-d,l-k,u-z,a-r).normalize();g[5].setComponents(e+d,l+k,u+z,a+r).normalize();return this},intersectsObject:function(){var c=new w;return function(g){var a=g.geometry;null===a.boundingSphere&&a.computeBoundingSphere();c.copy(a.boundingSphere).applyMatrix4(g.matrixWorld);return this.intersectsSphere(c)}}(),intersectsSprite:function(){var c=new w;return function(g){c.center.set(0,0,0);c.radius=.7071067811865476;c.applyMatrix4(g.matrixWorld);return this.intersectsSphere(c)}}(),intersectsSphere:function(c){var g=this.planes,a=c.center;c=-c.radius;for(var b=0;6>b;b++)if(g[b].distanceToPoint(a)b;b++){var d=a[b];c.x=0d.distanceToPoint(c))return!1}return!0}}(),containsPoint:function(c){for(var g=this.planes,a=0;6>a;a++)if(0>g[a].distanceToPoint(c))return!1;return!0}});var Ca={alphamap_fragment:"#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *\x3d 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 \x3c ALPHATEST ) discard;\n#endif\n",aomap_fragment:"#ifdef USE_AOMAP\n\tfloat ambientOcclusion \x3d ( texture2D( aoMap, vUv2 ).r - 1.0 ) * aoMapIntensity + 1.0;\n\treflectedLight.indirectDiffuse *\x3d ambientOcclusion;\n\t#if defined( USE_ENVMAP ) \x26\x26 defined( PHYSICAL )\n\t\tfloat dotNV \x3d saturate( dot( geometry.normal, geometry.viewDir ) );\n\t\treflectedLight.indirectSpecular *\x3d 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 \x3d vec3( position );\n",beginnormal_vertex:"\nvec3 objectNormal \x3d vec3( normal );\n",bsdfs:"float punctualLightIntensityToIrradianceFactor( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n\tif( decayExponent \x3e 0.0 ) {\n#if defined ( PHYSICALLY_CORRECT_LIGHTS )\n\t\tfloat distanceFalloff \x3d 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\t\tfloat maxDistanceCutoffFactor \x3d 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 \x3d 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 \x3d pow2( alpha );\n\tfloat gl \x3d dotNL + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\tfloat gv \x3d 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 \x3d pow2( alpha );\n\tfloat gv \x3d dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\tfloat gl \x3d 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 \x3d pow2( alpha );\n\tfloat denom \x3d 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 \x3d pow2( roughness );\n\tvec3 halfDir \x3d normalize( incidentLight.direction + geometry.viewDir );\n\tfloat dotNL \x3d saturate( dot( geometry.normal, incidentLight.direction ) );\n\tfloat dotNV \x3d saturate( dot( geometry.normal, geometry.viewDir ) );\n\tfloat dotNH \x3d saturate( dot( geometry.normal, halfDir ) );\n\tfloat dotLH \x3d saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F \x3d F_Schlick( specularColor, dotLH );\n\tfloat G \x3d G_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\tfloat D \x3d 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 \x3d 64.0;\n\tconst float LUT_SCALE \x3d ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS \x3d 0.5 / LUT_SIZE;\n\tfloat dotNV \x3d saturate( dot( N, V ) );\n\tvec2 uv \x3d vec2( roughness, sqrt( 1.0 - dotNV ) );\n\tuv \x3d uv * LUT_SCALE + LUT_BIAS;\n\treturn uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n\tfloat l \x3d 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 \x3d dot( v1, v2 );\n\tfloat y \x3d abs( x );\n\tfloat a \x3d 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n\tfloat b \x3d 3.4175940 + ( 4.1616724 + y ) * y;\n\tfloat v \x3d a / b;\n\tfloat theta_sintheta \x3d ( x \x3e 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\treturn cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\tvec3 v1 \x3d rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 \x3d rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal \x3d cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) \x3c 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 \x3d normalize( V - N * dot( V, N ) );\n\tT2 \x3d - cross( N, T1 );\n\tmat3 mat \x3d mInv * transposeMat3( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] \x3d mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] \x3d mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] \x3d mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] \x3d mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] \x3d normalize( coords[ 0 ] );\n\tcoords[ 1 ] \x3d normalize( coords[ 1 ] );\n\tcoords[ 2 ] \x3d normalize( coords[ 2 ] );\n\tcoords[ 3 ] \x3d normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor \x3d vec3( 0.0 );\n\tvectorFormFactor +\x3d LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor +\x3d LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor +\x3d LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor +\x3d LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tfloat result \x3d LTC_ClippedSphereFormFactor( vectorFormFactor );\n\treturn vec3( result );\n}\nvec3 BRDF_Specular_GGX_Environment( const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\n\tfloat dotNV \x3d saturate( dot( geometry.normal, geometry.viewDir ) );\n\tconst vec4 c0 \x3d vec4( - 1, - 0.0275, - 0.572, 0.022 );\n\tconst vec4 c1 \x3d vec4( 1, 0.0425, 1.04, - 0.04 );\n\tvec4 r \x3d roughness * c0 + c1;\n\tfloat a004 \x3d min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n\tvec2 AB \x3d 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 \x3d normalize( incidentLight.direction + geometry.viewDir );\n\tfloat dotNH \x3d saturate( dot( geometry.normal, halfDir ) );\n\tfloat dotLH \x3d saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F \x3d F_Schlick( specularColor, dotLH );\n\tfloat G \x3d G_BlinnPhong_Implicit( );\n\tfloat D \x3d 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 \x3d dFdx( vUv );\n\t\tvec2 dSTdy \x3d dFdy( vUv );\n\t\tfloat Hll \x3d bumpScale * texture2D( bumpMap, vUv ).x;\n\t\tfloat dBx \x3d bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;\n\t\tfloat dBy \x3d 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 \x3d vec3( dFdx( surf_pos.x ), dFdx( surf_pos.y ), dFdx( surf_pos.z ) );\n\t\tvec3 vSigmaY \x3d vec3( dFdy( surf_pos.x ), dFdy( surf_pos.y ), dFdy( surf_pos.z ) );\n\t\tvec3 vN \x3d surf_norm;\n\t\tvec3 R1 \x3d cross( vSigmaY, vN );\n\t\tvec3 R2 \x3d cross( vN, vSigmaX );\n\t\tfloat fDet \x3d dot( vSigmaX, R1 );\n\t\tfDet *\x3d ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\tvec3 vGrad \x3d 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 \x3e 0\n\tvec4 plane;\n\t#pragma unroll_loop\n\tfor ( int i \x3d 0; i \x3c UNION_CLIPPING_PLANES; i ++ ) {\n\t\tplane \x3d cs[ i ];\n\t\tif ( dot( vViewPosition, plane.xyz ) \x3e plane.w ) discard;\n\t}\n\t#if UNION_CLIPPING_PLANES \x3c NUM_CLIPPING_PLANES\n\t\tbool clipped \x3d true;\n\t\t#pragma unroll_loop\n\t\tfor ( int i \x3d UNION_CLIPPING_PLANES; i \x3c NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane \x3d cs[ i ];\n\t\t\tclipped \x3d ( dot( vViewPosition, plane.xyz ) \x3e plane.w ) \x26\x26 clipped;\n\t\t}\n\t\tif ( clipped ) discard;\n\t#endif\n#endif\n",clipping_planes_pars_fragment:"#if NUM_CLIPPING_PLANES \x3e 0\n\t#if ! defined( PHYSICAL ) \x26\x26 ! defined( PHONG ) \x26\x26 ! defined( MATCAP )\n\t\tvarying vec3 vViewPosition;\n\t#endif\n\tuniform vec4 cs[ NUM_CLIPPING_PLANES ];\n#endif\n",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES \x3e 0 \x26\x26 ! defined( PHYSICAL ) \x26\x26 ! defined( PHONG ) \x26\x26 ! defined( MATCAP )\n\tvarying vec3 vViewPosition;\n#endif\n",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES \x3e 0 \x26\x26 ! defined( PHYSICAL ) \x26\x26 ! defined( PHONG ) \x26\x26 ! defined( MATCAP )\n\tvViewPosition \x3d - mvPosition.xyz;\n#endif\n",color_fragment:"#ifdef USE_COLOR\n\tdiffuseColor.rgb *\x3d 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 \x3d 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 \x3d 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 \x3d 12.9898, b \x3d 78.233, c \x3d 43758.5453;\n\thighp float dt \x3d dot( uv.xy, vec2( a,b ) ), sn \x3d 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 \x3d dot( planeNormal, point - pointOnPlane );\n\treturn - distance * planeNormal + point;\n}\nfloat sideOfPlane( in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\treturn sign( dot( point - pointOnPlane, planeNormal ) );\n}\nvec3 linePlaneIntersect( in vec3 pointOnLine, in vec3 lineDirection, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\treturn lineDirection * ( dot( planeNormal, pointOnPlane - pointOnLine ) / dot( planeNormal, lineDirection ) ) + pointOnLine;\n}\nmat3 transposeMat3( const in mat3 m ) {\n\tmat3 tmp;\n\ttmp[ 0 ] \x3d vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n\ttmp[ 1 ] \x3d vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n\ttmp[ 2 ] \x3d vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n\treturn tmp;\n}\nfloat linearToRelativeLuminance( const in vec3 color ) {\n\tvec3 weights \x3d vec3( 0.2126, 0.7152, 0.0722 );\n\treturn dot( weights, color.rgb );\n}\n",cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\n#define cubeUV_textureSize (1024.0)\nint getFaceFromDirection(vec3 direction) {\n\tvec3 absDirection \x3d abs(direction);\n\tint face \x3d -1;\n\tif( absDirection.x \x3e absDirection.z ) {\n\t\tif(absDirection.x \x3e absDirection.y )\n\t\t\tface \x3d direction.x \x3e 0.0 ? 0 : 3;\n\t\telse\n\t\t\tface \x3d direction.y \x3e 0.0 ? 1 : 4;\n\t}\n\telse {\n\t\tif(absDirection.z \x3e absDirection.y )\n\t\t\tface \x3d direction.z \x3e 0.0 ? 2 : 5;\n\t\telse\n\t\t\tface \x3d direction.y \x3e 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 \x3d exp2(cubeUV_maxLods1 - roughnessLevel);\n\tfloat dxRoughness \x3d dFdx(roughness);\n\tfloat dyRoughness \x3d dFdy(roughness);\n\tvec3 dx \x3d dFdx( vec * scale * dxRoughness );\n\tvec3 dy \x3d dFdy( vec * scale * dyRoughness );\n\tfloat d \x3d max( dot( dx, dx ), dot( dy, dy ) );\n\td \x3d clamp(d, 1.0, cubeUV_rangeClamp);\n\tfloat mipLevel \x3d 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 \x3d roughnessLevel \x3e cubeUV_maxLods2 - 3.0 ? 0.0 : mipLevel;\n\tfloat a \x3d 16.0 * cubeUV_rcpTextureSize;\n\tvec2 exp2_packed \x3d exp2( vec2( roughnessLevel, mipLevel ) );\n\tvec2 rcp_exp2_packed \x3d vec2( 1.0 ) / exp2_packed;\n\tfloat powScale \x3d exp2_packed.x * exp2_packed.y;\n\tfloat scale \x3d rcp_exp2_packed.x * rcp_exp2_packed.y * 0.25;\n\tfloat mipOffset \x3d 0.75*(1.0 - rcp_exp2_packed.y) * rcp_exp2_packed.x;\n\tbool bRes \x3d mipLevel \x3d\x3d 0.0;\n\tscale \x3d bRes \x26\x26 (scale \x3c a) ? a : scale;\n\tvec3 r;\n\tvec2 offset;\n\tint face \x3d getFaceFromDirection(direction);\n\tfloat rcpPowScale \x3d 1.0 / powScale;\n\tif( face \x3d\x3d 0) {\n\t\tr \x3d vec3(direction.x, -direction.z, direction.y);\n\t\toffset \x3d vec2(0.0+mipOffset,0.75 * rcpPowScale);\n\t\toffset.y \x3d bRes \x26\x26 (offset.y \x3c 2.0*a) ? a : offset.y;\n\t}\n\telse if( face \x3d\x3d 1) {\n\t\tr \x3d vec3(direction.y, direction.x, direction.z);\n\t\toffset \x3d vec2(scale+mipOffset, 0.75 * rcpPowScale);\n\t\toffset.y \x3d bRes \x26\x26 (offset.y \x3c 2.0*a) ? a : offset.y;\n\t}\n\telse if( face \x3d\x3d 2) {\n\t\tr \x3d vec3(direction.z, direction.x, direction.y);\n\t\toffset \x3d vec2(2.0*scale+mipOffset, 0.75 * rcpPowScale);\n\t\toffset.y \x3d bRes \x26\x26 (offset.y \x3c 2.0*a) ? a : offset.y;\n\t}\n\telse if( face \x3d\x3d 3) {\n\t\tr \x3d vec3(direction.x, direction.z, direction.y);\n\t\toffset \x3d vec2(0.0+mipOffset,0.5 * rcpPowScale);\n\t\toffset.y \x3d bRes \x26\x26 (offset.y \x3c 2.0*a) ? 0.0 : offset.y;\n\t}\n\telse if( face \x3d\x3d 4) {\n\t\tr \x3d vec3(direction.y, direction.x, -direction.z);\n\t\toffset \x3d vec2(scale+mipOffset, 0.5 * rcpPowScale);\n\t\toffset.y \x3d bRes \x26\x26 (offset.y \x3c 2.0*a) ? 0.0 : offset.y;\n\t}\n\telse {\n\t\tr \x3d vec3(direction.z, -direction.x, direction.y);\n\t\toffset \x3d vec2(2.0*scale+mipOffset, 0.5 * rcpPowScale);\n\t\toffset.y \x3d bRes \x26\x26 (offset.y \x3c 2.0*a) ? 0.0 : offset.y;\n\t}\n\tr \x3d normalize(r);\n\tfloat texelOffset \x3d 0.5 * cubeUV_rcpTextureSize;\n\tvec2 s \x3d ( r.yz / abs( r.x ) + vec2( 1.0 ) ) * 0.5;\n\tvec2 base \x3d 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( sampler2D envMap, vec3 reflectedDirection, float roughness ) {\n\tfloat roughnessVal \x3d roughness* cubeUV_maxLods3;\n\tfloat r1 \x3d floor(roughnessVal);\n\tfloat r2 \x3d r1 + 1.0;\n\tfloat t \x3d fract(roughnessVal);\n\tvec2 mipInfo \x3d MipLevelInfo(reflectedDirection, r1, roughness);\n\tfloat s \x3d mipInfo.y;\n\tfloat level0 \x3d mipInfo.x;\n\tfloat level1 \x3d level0 + 1.0;\n\tlevel1 \x3d level1 \x3e 5.0 ? 5.0 : level1;\n\tlevel0 +\x3d min( floor( s + 0.5 ), 5.0 );\n\tvec2 uv_10 \x3d getCubeUV(reflectedDirection, r1, level0);\n\tvec4 color10 \x3d envMapTexelToLinear(texture2D(envMap, uv_10));\n\tvec2 uv_20 \x3d getCubeUV(reflectedDirection, r2, level0);\n\tvec4 color20 \x3d envMapTexelToLinear(texture2D(envMap, uv_20));\n\tvec4 result \x3d mix(color10, color20, t);\n\treturn vec4(result.rgb, 1.0);\n}\n#endif\n",defaultnormal_vertex:"vec3 transformedNormal \x3d normalMatrix * objectNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal \x3d - 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 +\x3d normalize( objectNormal ) * ( texture2D( displacementMap, uv ).x * displacementScale + displacementBias );\n#endif\n",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor \x3d texture2D( emissiveMap, vUv );\n\temissiveColor.rgb \x3d emissiveMapTexelToLinear( emissiveColor ).rgb;\n\ttotalEmissiveRadiance *\x3d emissiveColor.rgb;\n#endif\n",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif\n",encodings_fragment:" gl_FragColor \x3d 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.rgb, vec3( gammaFactor ) ), value.a );\n}\nvec4 LinearToGamma( in vec4 value, in float gammaFactor ) {\n\treturn vec4( pow( value.rgb, vec3( 1.0 / gammaFactor ) ), value.a );\n}\nvec4 sRGBToLinear( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.a );\n}\nvec4 LinearTosRGB( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );\n}\nvec4 RGBEToLinear( in vec4 value ) {\n\treturn vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 );\n}\nvec4 LinearToRGBE( in vec4 value ) {\n\tfloat maxComponent \x3d max( max( value.r, value.g ), value.b );\n\tfloat fExp \x3d clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 );\n\treturn vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 );\n}\nvec4 RGBMToLinear( in vec4 value, in float maxRange ) {\n\treturn vec4( value.rgb * value.a * maxRange, 1.0 );\n}\nvec4 LinearToRGBM( in vec4 value, in float maxRange ) {\n\tfloat maxRGB \x3d max( value.r, max( value.g, value.b ) );\n\tfloat M \x3d clamp( maxRGB / maxRange, 0.0, 1.0 );\n\tM \x3d 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 \x3d max( value.r, max( value.g, value.b ) );\n\tfloat D \x3d max( maxRange / maxRGB, 1.0 );\n\tD \x3d min( floor( D ) / 255.0, 1.0 );\n\treturn vec4( value.rgb * ( D * ( 255.0 / maxRange ) ), D );\n}\nconst mat3 cLogLuvM \x3d 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 \x3d value.rgb * cLogLuvM;\n\tXp_Y_XYZp \x3d max( Xp_Y_XYZp, vec3( 1e-6, 1e-6, 1e-6 ) );\n\tvec4 vResult;\n\tvResult.xy \x3d Xp_Y_XYZp.xy / Xp_Y_XYZp.z;\n\tfloat Le \x3d 2.0 * log2(Xp_Y_XYZp.y) + 127.0;\n\tvResult.w \x3d fract( Le );\n\tvResult.z \x3d ( Le - ( floor( vResult.w * 255.0 ) ) / 255.0 ) / 255.0;\n\treturn vResult;\n}\nconst mat3 cLogLuvInverseM \x3d 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 \x3d value.z * 255.0 + value.w;\n\tvec3 Xp_Y_XYZp;\n\tXp_Y_XYZp.y \x3d exp2( ( Le - 127.0 ) / 2.0 );\n\tXp_Y_XYZp.z \x3d Xp_Y_XYZp.y / value.y;\n\tXp_Y_XYZp.x \x3d value.x * Xp_Y_XYZp.z;\n\tvec3 vRGB \x3d 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 \x3d normalize( vWorldPosition - cameraPosition );\n\t\tvec3 worldNormal \x3d inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec \x3d reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec \x3d refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectVec \x3d vReflect;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor \x3d textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#elif defined( ENVMAP_TYPE_EQUIREC )\n\t\tvec2 sampleUV;\n\t\treflectVec \x3d normalize( reflectVec );\n\t\tsampleUV.y \x3d asin( clamp( reflectVec.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\t\tsampleUV.x \x3d atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\n\t\tvec4 envColor \x3d texture2D( envMap, sampleUV );\n\t#elif defined( ENVMAP_TYPE_SPHERE )\n\t\treflectVec \x3d normalize( reflectVec );\n\t\tvec3 reflectView \x3d normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0, 0.0, 1.0 ) );\n\t\tvec4 envColor \x3d texture2D( envMap, reflectView.xy * 0.5 + 0.5 );\n\t#else\n\t\tvec4 envColor \x3d vec4( 0.0 );\n\t#endif\n\tenvColor \x3d envMapTexelToLinear( envColor );\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\t\toutgoingLight \x3d mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\t\toutgoingLight \x3d mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\t\toutgoingLight +\x3d 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 ) \x26\x26 ( 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\tuniform int maxMipLevel;\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_physical_pars_fragment:"#if defined( USE_ENVMAP ) \x26\x26 defined( PHYSICAL )\n\tvec3 getLightProbeIndirectIrradiance( const in GeometricContext geometry, const in int maxMIPLevel ) {\n\t\tvec3 worldNormal \x3d inverseTransformDirection( geometry.normal, viewMatrix );\n\t\t#ifdef ENVMAP_TYPE_CUBE\n\t\t\tvec3 queryVec \x3d vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor \x3d textureCubeLodEXT( envMap, queryVec, float( maxMIPLevel ) );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor \x3d textureCube( envMap, queryVec, float( maxMIPLevel ) );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb \x3d envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec3 queryVec \x3d vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\n\t\t\tvec4 envMapColor \x3d textureCubeUV( envMap, queryVec, 1.0 );\n\t\t#else\n\t\t\tvec4 envMapColor \x3d 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 \x3d float( maxMIPLevel );\n\t\tfloat desiredMIPLevel \x3d 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 \x3d reflect( -geometry.viewDir, geometry.normal );\n\t\t#else\n\t\t\tvec3 reflectVec \x3d refract( -geometry.viewDir, geometry.normal, refractionRatio );\n\t\t#endif\n\t\treflectVec \x3d inverseTransformDirection( reflectVec, viewMatrix );\n\t\tfloat specularMIPLevel \x3d getSpecularMIPLevel( blinnShininessExponent, maxMIPLevel );\n\t\t#ifdef ENVMAP_TYPE_CUBE\n\t\t\tvec3 queryReflectVec \x3d vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor \x3d textureCubeLodEXT( envMap, queryReflectVec, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor \x3d textureCube( envMap, queryReflectVec, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb \x3d envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec3 queryReflectVec \x3d vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\n\t\t\tvec4 envMapColor \x3d textureCubeUV( envMap, queryReflectVec, BlinnExponentToGGXRoughness(blinnShininessExponent ));\n\t\t#elif defined( ENVMAP_TYPE_EQUIREC )\n\t\t\tvec2 sampleUV;\n\t\t\tsampleUV.y \x3d asin( clamp( reflectVec.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\t\t\tsampleUV.x \x3d atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor \x3d texture2DLodEXT( envMap, sampleUV, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor \x3d texture2D( envMap, sampleUV, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb \x3d envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_SPHERE )\n\t\t\tvec3 reflectView \x3d 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 \x3d texture2DLodEXT( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor \x3d texture2D( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb \x3d envMapTexelToLinear( envMapColor ).rgb;\n\t\t#endif\n\t\treturn envMapColor.rgb * envMapIntensity;\n\t}\n#endif\n",envmap_vertex:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\tvWorldPosition \x3d worldPosition.xyz;\n\t#else\n\t\tvec3 cameraToVertex \x3d normalize( worldPosition.xyz - cameraPosition );\n\t\tvec3 worldNormal \x3d inverseTransformDirection( transformedNormal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvReflect \x3d reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvReflect \x3d refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#endif\n#endif\n",fog_vertex:"#ifdef USE_FOG\n\tfogDepth \x3d -mvPosition.z;\n#endif\n",fog_pars_vertex:"#ifdef USE_FOG\n\tvarying float fogDepth;\n#endif\n",fog_fragment:"#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor \x3d whiteCompliment( exp2( - fogDensity * fogDensity * fogDepth * fogDepth * LOG2 ) );\n\t#else\n\t\tfloat fogFactor \x3d smoothstep( fogNear, fogFar, fogDepth );\n\t#endif\n\tgl_FragColor.rgb \x3d 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 \x3d dot( normal, lightDirection );\n\t\tvec2 coord \x3d 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 \x3c 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 +\x3d 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 \x3d vec3( 1.0 );\nGeometricContext geometry;\ngeometry.position \x3d mvPosition.xyz;\ngeometry.normal \x3d normalize( transformedNormal );\ngeometry.viewDir \x3d normalize( -mvPosition.xyz );\nGeometricContext backGeometry;\nbackGeometry.position \x3d geometry.position;\nbackGeometry.normal \x3d -geometry.normal;\nbackGeometry.viewDir \x3d geometry.viewDir;\nvLightFront \x3d vec3( 0.0 );\n#ifdef DOUBLE_SIDED\n\tvLightBack \x3d vec3( 0.0 );\n#endif\nIncidentLight directLight;\nfloat dotNL;\nvec3 directLightColor_Diffuse;\n#if NUM_POINT_LIGHTS \x3e 0\n\t#pragma unroll_loop\n\tfor ( int i \x3d 0; i \x3c NUM_POINT_LIGHTS; i ++ ) {\n\t\tgetPointDirectLightIrradiance( pointLights[ i ], geometry, directLight );\n\t\tdotNL \x3d dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse \x3d PI * directLight.color;\n\t\tvLightFront +\x3d saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack +\x3d saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n#endif\n#if NUM_SPOT_LIGHTS \x3e 0\n\t#pragma unroll_loop\n\tfor ( int i \x3d 0; i \x3c NUM_SPOT_LIGHTS; i ++ ) {\n\t\tgetSpotDirectLightIrradiance( spotLights[ i ], geometry, directLight );\n\t\tdotNL \x3d dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse \x3d PI * directLight.color;\n\t\tvLightFront +\x3d saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack +\x3d saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n#endif\n#if NUM_DIR_LIGHTS \x3e 0\n\t#pragma unroll_loop\n\tfor ( int i \x3d 0; i \x3c NUM_DIR_LIGHTS; i ++ ) {\n\t\tgetDirectionalDirectLightIrradiance( directionalLights[ i ], geometry, directLight );\n\t\tdotNL \x3d dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse \x3d PI * directLight.color;\n\t\tvLightFront +\x3d saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack +\x3d saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n#endif\n#if NUM_HEMI_LIGHTS \x3e 0\n\t#pragma unroll_loop\n\tfor ( int i \x3d 0; i \x3c NUM_HEMI_LIGHTS; i ++ ) {\n\t\tvLightFront +\x3d getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack +\x3d getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry );\n\t\t#endif\n\t}\n#endif\n",lights_pars_begin:"uniform vec3 ambientLightColor;\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance \x3d ambientLightColor;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *\x3d PI;\n\t#endif\n\treturn irradiance;\n}\n#if NUM_DIR_LIGHTS \x3e 0\n\tstruct Dt {\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 Dt directionalLights[ NUM_DIR_LIGHTS ];\n\tvoid getDirectionalDirectLightIrradiance( const in Dt directionalLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tdirectLight.color \x3d directionalLight.color;\n\t\tdirectLight.direction \x3d directionalLight.direction;\n\t\tdirectLight.visible \x3d true;\n\t}\n#endif\n#if NUM_POINT_LIGHTS \x3e 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 \x3d pointLight.position - geometry.position;\n\t\tdirectLight.direction \x3d normalize( lVector );\n\t\tfloat lightDistance \x3d length( lVector );\n\t\tdirectLight.color \x3d pointLight.color;\n\t\tdirectLight.color *\x3d punctualLightIntensityToIrradianceFactor( lightDistance, pointLight.distance, pointLight.decay );\n\t\tdirectLight.visible \x3d ( directLight.color !\x3d vec3( 0.0 ) );\n\t}\n#endif\n#if NUM_SPOT_LIGHTS \x3e 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 \x3d spotLight.position - geometry.position;\n\t\tdirectLight.direction \x3d normalize( lVector );\n\t\tfloat lightDistance \x3d length( lVector );\n\t\tfloat angleCos \x3d dot( directLight.direction, spotLight.direction );\n\t\tif ( angleCos \x3e spotLight.coneCos ) {\n\t\t\tfloat spotEffect \x3d smoothstep( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\t\tdirectLight.color \x3d spotLight.color;\n\t\t\tdirectLight.color *\x3d spotEffect * punctualLightIntensityToIrradianceFactor( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tdirectLight.visible \x3d true;\n\t\t} else {\n\t\t\tdirectLight.color \x3d vec3( 0.0 );\n\t\t\tdirectLight.visible \x3d false;\n\t\t}\n\t}\n#endif\n#if NUM_RECT_AREA_LIGHTS \x3e 0\n\tstruct RectAreaLight {\n\t\tvec3 color;\n\t\tvec3 position;\n\t\tvec3 halfWidth;\n\t\tvec3 halfHeight;\n\t};\n\tuniform sampler2D ltc_1;\tuniform sampler2D ltc_2;\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS \x3e 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 \x3d dot( geometry.normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight \x3d 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance \x3d mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tirradiance *\x3d PI;\n\t\t#endif\n\t\treturn irradiance;\n\t}\n#endif\n",lights_phong_fragment:"BlinnPhongMaterial material;\nmaterial.diffuseColor \x3d diffuseColor.rgb;\nmaterial.specularColor \x3d specular;\nmaterial.specularShininess \x3d shininess;\nmaterial.specularStrength \x3d 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 \x3d getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\n\t#else\n\t\tfloat dotNL \x3d saturate( dot( geometry.normal, directLight.direction ) );\n\t\tvec3 irradiance \x3d dotNL * directLight.color;\n\t#endif\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *\x3d PI;\n\t#endif\n\treflectedLight.directDiffuse +\x3d irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular +\x3d 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 +\x3d 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 \x3d diffuseColor.rgb * ( 1.0 - metalnessFactor );\nmaterial.specularRoughness \x3d clamp( roughnessFactor, 0.04, 1.0 );\n#ifdef STANDARD\n\tmaterial.specularColor \x3d mix( vec3( DEFAULT_SPECULAR_COEFFICIENT ), diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor \x3d mix( vec3( MAXIMUM_SPECULAR_COEFFICIENT * pow2( reflectivity ) ), diffuseColor.rgb, metalnessFactor );\n\tmaterial.clearCoat \x3d saturate( clearCoat );\tmaterial.clearCoatRoughness \x3d 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 \x3e 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 \x3d geometry.normal;\n\t\tvec3 viewDir \x3d geometry.viewDir;\n\t\tvec3 position \x3d geometry.position;\n\t\tvec3 lightPos \x3d rectAreaLight.position;\n\t\tvec3 halfWidth \x3d rectAreaLight.halfWidth;\n\t\tvec3 halfHeight \x3d rectAreaLight.halfHeight;\n\t\tvec3 lightColor \x3d rectAreaLight.color;\n\t\tfloat roughness \x3d material.specularRoughness;\n\t\tvec3 rectCoords[ 4 ];\n\t\trectCoords[ 0 ] \x3d lightPos - halfWidth - halfHeight;\t\trectCoords[ 1 ] \x3d lightPos + halfWidth - halfHeight;\n\t\trectCoords[ 2 ] \x3d lightPos + halfWidth + halfHeight;\n\t\trectCoords[ 3 ] \x3d lightPos - halfWidth + halfHeight;\n\t\tvec2 uv \x3d LTC_Uv( normal, viewDir, roughness );\n\t\tvec4 t1 \x3d texture2D( ltc_1, uv );\n\t\tvec4 t2 \x3d texture2D( ltc_2, uv );\n\t\tmat3 mInv \x3d mat3(\n\t\t\tvec3( t1.x, 0, t1.y ),\n\t\t\tvec3( 0, 1, 0 ),\n\t\t\tvec3( t1.z, 0, t1.w )\n\t\t);\n\t\tvec3 fresnel \x3d ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\n\t\treflectedLight.directSpecular +\x3d lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\t\treflectedLight.directDiffuse +\x3d lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n\t}\n#endif\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL \x3d saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance \x3d dotNL * directLight.color;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *\x3d PI;\n\t#endif\n\t#ifndef STANDARD\n\t\tfloat clearCoatDHR \x3d material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, dotNL );\n\t#else\n\t\tfloat clearCoatDHR \x3d 0.0;\n\t#endif\n\treflectedLight.directSpecular +\x3d ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Specular_GGX( directLight, geometry, material.specularColor, material.specularRoughness );\n\treflectedLight.directDiffuse +\x3d ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n\t#ifndef STANDARD\n\t\treflectedLight.directSpecular +\x3d 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 +\x3d 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 \x3d saturate( dot( geometry.normal, geometry.viewDir ) );\n\t\tfloat dotNL \x3d dotNV;\n\t\tfloat clearCoatDHR \x3d material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, dotNL );\n\t#else\n\t\tfloat clearCoatDHR \x3d 0.0;\n\t#endif\n\treflectedLight.indirectSpecular +\x3d ( 1.0 - clearCoatDHR ) * radiance * BRDF_Specular_GGX_Environment( geometry, material.specularColor, material.specularRoughness );\n\t#ifndef STANDARD\n\t\treflectedLight.indirectSpecular +\x3d 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_fragment_begin:"\nGeometricContext geometry;\ngeometry.position \x3d - vViewPosition;\ngeometry.normal \x3d normal;\ngeometry.viewDir \x3d normalize( vViewPosition );\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS \x3e 0 ) \x26\x26 defined( RE_Direct )\n\tPointLight pointLight;\n\t#pragma unroll_loop\n\tfor ( int i \x3d 0; i \x3c NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight \x3d pointLights[ i ];\n\t\tgetPointDirectLightIrradiance( pointLight, geometry, directLight );\n\t\t#ifdef USE_SHADOWMAP\n\t\tdirectLight.color *\x3d 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 \x3e 0 ) \x26\x26 defined( RE_Direct )\n\tSpotLight spotLight;\n\t#pragma unroll_loop\n\tfor ( int i \x3d 0; i \x3c NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight \x3d spotLights[ i ];\n\t\tgetSpotDirectLightIrradiance( spotLight, geometry, directLight );\n\t\t#ifdef USE_SHADOWMAP\n\t\tdirectLight.color *\x3d 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 \x3e 0 ) \x26\x26 defined( RE_Direct )\n\tDt directionalLight;\n\t#pragma unroll_loop\n\tfor ( int i \x3d 0; i \x3c NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight \x3d directionalLights[ i ];\n\t\tgetDirectionalDirectLightIrradiance( directionalLight, geometry, directLight );\n\t\t#ifdef USE_SHADOWMAP\n\t\tdirectLight.color *\x3d 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 \x3e 0 ) \x26\x26 defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\n\t#pragma unroll_loop\n\tfor ( int i \x3d 0; i \x3c NUM_RECT_AREA_LIGHTS; i ++ ) {\n\t\trectAreaLight \x3d rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 irradiance \x3d getAmbientLightIrradiance( ambientLightColor );\n\t#if ( NUM_HEMI_LIGHTS \x3e 0 )\n\t\t#pragma unroll_loop\n\t\tfor ( int i \x3d 0; i \x3c NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance +\x3d getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t}\n\t#endif\n#endif\n#if defined( RE_IndirectSpecular )\n\tvec3 radiance \x3d vec3( 0.0 );\n\tvec3 clearCoatRadiance \x3d vec3( 0.0 );\n#endif\n",lights_fragment_maps:"#if defined( RE_IndirectDiffuse )\n\t#ifdef USE_LIGHTMAP\n\t\tvec3 lightMapIrradiance \x3d texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tlightMapIrradiance *\x3d PI;\n\t\t#endif\n\t\tirradiance +\x3d lightMapIrradiance;\n\t#endif\n\t#if defined( USE_ENVMAP ) \x26\x26 defined( PHYSICAL ) \x26\x26 defined( ENVMAP_TYPE_CUBE_UV )\n\t\tirradiance +\x3d getLightProbeIndirectIrradiance( geometry, maxMipLevel );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) \x26\x26 defined( RE_IndirectSpecular )\n\tradiance +\x3d getLightProbeIndirectRadiance( geometry, Material_BlinnShininessExponent( material ), maxMipLevel );\n\t#ifndef STANDARD\n\t\tclearCoatRadiance +\x3d getLightProbeIndirectRadiance( geometry, Material_ClearCoat_BlinnShininessExponent( material ), maxMipLevel );\n\t#endif\n#endif\n",lights_fragment_end:"#if defined( RE_IndirectDiffuse )\n\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n\tRE_IndirectSpecular( radiance, clearCoatRadiance, geometry, material, reflectedLight );\n#endif\n",logdepthbuf_fragment:"#if defined( USE_LOGDEPTHBUF ) \x26\x26 defined( USE_LOGDEPTHBUF_EXT )\n\tgl_FragDepthEXT \x3d log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif",logdepthbuf_pars_fragment:"#if defined( USE_LOGDEPTHBUF ) \x26\x26 defined( USE_LOGDEPTHBUF_EXT )\n\tuniform float logDepthBufFC;\n\tvarying float vFragDepth;\n#endif\n",logdepthbuf_pars_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t#else\n\t\tuniform float logDepthBufFC;\n\t#endif\n#endif\n",logdepthbuf_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvFragDepth \x3d 1.0 + gl_Position.w;\n\t#else\n\t\tgl_Position.z \x3d log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\n\t\tgl_Position.z *\x3d gl_Position.w;\n\t#endif\n#endif\n",map_fragment:"#ifdef USE_MAP\n\tvec4 texelColor \x3d texture2D( map, vUv );\n\ttexelColor \x3d mapTexelToLinear( texelColor );\n\tdiffuseColor *\x3d texelColor;\n#endif\n",map_pars_fragment:"#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n",map_particle_fragment:"#ifdef USE_MAP\n\tvec2 uv \x3d ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n\tvec4 mapTexel \x3d texture2D( map, uv );\n\tdiffuseColor *\x3d mapTexelToLinear( mapTexel );\n#endif\n",map_particle_pars_fragment:"#ifdef USE_MAP\n\tuniform mat3 uvTransform;\n\tuniform sampler2D map;\n#endif\n",metalnessmap_fragment:"float metalnessFactor \x3d metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness \x3d texture2D( metalnessMap, vUv );\n\tmetalnessFactor *\x3d texelMetalness.b;\n#endif\n",metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\n\tobjectNormal +\x3d ( morphNormal0 - normal ) * morphTargetInfluences[ 0 ];\n\tobjectNormal +\x3d ( morphNormal1 - normal ) * morphTargetInfluences[ 1 ];\n\tobjectNormal +\x3d ( morphNormal2 - normal ) * morphTargetInfluences[ 2 ];\n\tobjectNormal +\x3d ( 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 +\x3d ( morphTarget0 - position ) * morphTargetInfluences[ 0 ];\n\ttransformed +\x3d ( morphTarget1 - position ) * morphTargetInfluences[ 1 ];\n\ttransformed +\x3d ( morphTarget2 - position ) * morphTargetInfluences[ 2 ];\n\ttransformed +\x3d ( morphTarget3 - position ) * morphTargetInfluences[ 3 ];\n\t#ifndef USE_MORPHNORMALS\n\ttransformed +\x3d ( morphTarget4 - position ) * morphTargetInfluences[ 4 ];\n\ttransformed +\x3d ( morphTarget5 - position ) * morphTargetInfluences[ 5 ];\n\ttransformed +\x3d ( morphTarget6 - position ) * morphTargetInfluences[ 6 ];\n\ttransformed +\x3d ( morphTarget7 - position ) * morphTargetInfluences[ 7 ];\n\t#endif\n#endif\n",normal_fragment_begin:"#ifdef FLAT_SHADED\n\tvec3 fdx \x3d vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) );\n\tvec3 fdy \x3d vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) );\n\tvec3 normal \x3d normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal \x3d normalize( vNormal );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal \x3d normal * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t#endif\n#endif\n",normal_fragment_maps:"#ifdef USE_NORMALMAP\n\t#ifdef OBJECTSPACE_NORMALMAP\n\t\tnormal \x3d texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\t\t#ifdef FLIP_SIDED\n\t\t\tnormal \x3d - normal;\n\t\t#endif\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tnormal \x3d normal * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\t#endif\n\t\tnormal \x3d normalize( normalMatrix * normal );\n\t#else\n\t\tnormal \x3d perturbNormal2Arb( -vViewPosition, normal );\n\t#endif\n#elif defined( USE_BUMPMAP )\n\tnormal \x3d perturbNormalArb( -vViewPosition, normal, dHdxy_fwd() );\n#endif\n",normalmap_pars_fragment:"#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n\t#ifdef OBJECTSPACE_NORMALMAP\n\t\tuniform mat3 normalMatrix;\n\t#else\n\t\tvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm ) {\n\t\t\tvec3 q0 \x3d vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );\n\t\t\tvec3 q1 \x3d vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );\n\t\t\tvec2 st0 \x3d dFdx( vUv.st );\n\t\t\tvec2 st1 \x3d dFdy( vUv.st );\n\t\t\tfloat scale \x3d sign( st1.t * st0.s - st0.t * st1.s );\n\t\t\tvec3 S \x3d normalize( ( q0 * st1.t - q1 * st0.t ) * scale );\n\t\t\tvec3 T \x3d normalize( ( - q0 * st1.s + q1 * st0.s ) * scale );\n\t\t\tvec3 N \x3d normalize( surf_norm );\n\t\t\tmat3 tsn \x3d mat3( S, T, N );\n\t\t\tvec3 mapN \x3d texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\t\t\tmapN.xy *\x3d normalScale;\n\t\t\tmapN.xy *\x3d ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\t\treturn normalize( tsn * mapN );\n\t\t}\n\t#endif\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 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale \x3d 256. / 255.;const float UnpackDownscale \x3d 255. / 256.;\nconst vec3 PackFactors \x3d vec3( 256. * 256. * 256., 256. * 256., 256. );\nconst vec4 UnpackFactors \x3d UnpackDownscale / vec4( PackFactors, 1. );\nconst float ShiftRight8 \x3d 1. / 256.;\nvec4 packDepthToRGBA( const in float v ) {\n\tvec4 r \x3d vec4( fract( v * PackFactors ), v );\n\tr.yzw -\x3d 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 *\x3d gl_FragColor.a;\n#endif\n",project_vertex:"vec4 mvPosition \x3d modelViewMatrix * vec4( transformed, 1.0 );\ngl_Position \x3d projectionMatrix * mvPosition;\n",dithering_fragment:"#if defined( DITHERING )\n gl_FragColor.rgb \x3d dithering( gl_FragColor.rgb );\n#endif\n",dithering_pars_fragment:"#if defined( DITHERING )\n\tvec3 dithering( vec3 color ) {\n\t\tfloat grid_position \x3d rand( gl_FragCoord.xy );\n\t\tvec3 dither_shift_RGB \x3d vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n\t\tdither_shift_RGB \x3d 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 \x3d roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness \x3d texture2D( roughnessMap, vUv );\n\troughnessFactor *\x3d 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 \x3e 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 \x3e 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 \x3e 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 \x3d vec2( 0.0, 1.0 );\n\t\tvec2 texelSize \x3d vec2( 1.0 ) / size;\n\t\tvec2 centroidUV \x3d floor( uv * size + 0.5 ) / size;\n\t\tfloat lb \x3d texture2DCompare( depths, centroidUV + texelSize * offset.xx, compare );\n\t\tfloat lt \x3d texture2DCompare( depths, centroidUV + texelSize * offset.xy, compare );\n\t\tfloat rb \x3d texture2DCompare( depths, centroidUV + texelSize * offset.yx, compare );\n\t\tfloat rt \x3d texture2DCompare( depths, centroidUV + texelSize * offset.yy, compare );\n\t\tvec2 f \x3d fract( uv * size + 0.5 );\n\t\tfloat a \x3d mix( lb, lt, f.y );\n\t\tfloat b \x3d mix( rb, rt, f.y );\n\t\tfloat c \x3d 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 \x3d 1.0;\n\t\tshadowCoord.xyz /\x3d shadowCoord.w;\n\t\tshadowCoord.z +\x3d shadowBias;\n\t\tbvec4 inFrustumVec \x3d bvec4 ( shadowCoord.x \x3e\x3d 0.0, shadowCoord.x \x3c\x3d 1.0, shadowCoord.y \x3e\x3d 0.0, shadowCoord.y \x3c\x3d 1.0 );\n\t\tbool inFrustum \x3d all( inFrustumVec );\n\t\tbvec2 frustumTestVec \x3d bvec2( inFrustum, shadowCoord.z \x3c\x3d 1.0 );\n\t\tbool frustumTest \x3d all( frustumTestVec );\n\t\tif ( frustumTest ) {\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tvec2 texelSize \x3d vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 \x3d - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 \x3d - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 \x3d + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 \x3d + texelSize.y * shadowRadius;\n\t\t\tshadow \x3d (\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 \x3d vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 \x3d - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 \x3d - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 \x3d + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 \x3d + texelSize.y * shadowRadius;\n\t\t\tshadow \x3d (\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 \x3d 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 \x3d abs( v );\n\t\tfloat scaleToCube \x3d 1.0 / max( absV.x, max( absV.y, absV.z ) );\n\t\tabsV *\x3d scaleToCube;\n\t\tv *\x3d scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n\t\tvec2 planar \x3d v.xy;\n\t\tfloat almostATexel \x3d 1.5 * texelSizeY;\n\t\tfloat almostOne \x3d 1.0 - almostATexel;\n\t\tif ( absV.z \x3e\x3d almostOne ) {\n\t\t\tif ( v.z \x3e 0.0 )\n\t\t\t\tplanar.x \x3d 4.0 - v.x;\n\t\t} else if ( absV.x \x3e\x3d almostOne ) {\n\t\t\tfloat signX \x3d sign( v.x );\n\t\t\tplanar.x \x3d v.z * signX + 2.0 * signX;\n\t\t} else if ( absV.y \x3e\x3d almostOne ) {\n\t\t\tfloat signY \x3d sign( v.y );\n\t\t\tplanar.x \x3d v.x + 2.0 * signY + 2.0;\n\t\t\tplanar.y \x3d 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 \x3d vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n\t\tvec3 lightToPosition \x3d shadowCoord.xyz;\n\t\tfloat dp \x3d ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\t\tdp +\x3d shadowBias;\n\t\tvec3 bd3D \x3d normalize( lightToPosition );\n\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 offset \x3d 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 \x3e 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 \x3e 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 \x3e 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 \x3e 0\n\t#pragma unroll_loop\n\tfor ( int i \x3d 0; i \x3c NUM_DIR_LIGHTS; i ++ ) {\n\t\tvDirectionalShadowCoord[ i ] \x3d directionalShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n\t#if NUM_SPOT_LIGHTS \x3e 0\n\t#pragma unroll_loop\n\tfor ( int i \x3d 0; i \x3c NUM_SPOT_LIGHTS; i ++ ) {\n\t\tvSpotShadowCoord[ i ] \x3d spotShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n\t#if NUM_POINT_LIGHTS \x3e 0\n\t#pragma unroll_loop\n\tfor ( int i \x3d 0; i \x3c NUM_POINT_LIGHTS; i ++ ) {\n\t\tvPointShadowCoord[ i ] \x3d pointShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n#endif\n",shadowmask_pars_fragment:"float getShadowMask() {\n\tfloat shadow \x3d 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS \x3e 0\n\tDt directionalLight;\n\t#pragma unroll_loop\n\tfor ( int i \x3d 0; i \x3c NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight \x3d directionalLights[ i ];\n\t\tshadow *\x3d 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 \x3e 0\n\tSpotLight spotLight;\n\t#pragma unroll_loop\n\tfor ( int i \x3d 0; i \x3c NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight \x3d spotLights[ i ];\n\t\tshadow *\x3d 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 \x3e 0\n\tPointLight pointLight;\n\t#pragma unroll_loop\n\tfor ( int i \x3d 0; i \x3c NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight \x3d pointLights[ i ];\n\t\tshadow *\x3d 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 \x3d getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY \x3d getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ \x3d getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW \x3d 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 \x3d i * 4.0;\n\t\t\tfloat x \x3d mod( j, float( boneTextureSize ) );\n\t\t\tfloat y \x3d floor( j / float( boneTextureSize ) );\n\t\t\tfloat dx \x3d 1.0 / float( boneTextureSize );\n\t\t\tfloat dy \x3d 1.0 / float( boneTextureSize );\n\t\t\ty \x3d dy * ( y + 0.5 );\n\t\t\tvec4 v1 \x3d texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\n\t\t\tvec4 v2 \x3d texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\n\t\t\tvec4 v3 \x3d texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\n\t\t\tvec4 v4 \x3d texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\n\t\t\tmat4 bone \x3d 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 \x3d 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 \x3d bindMatrix * vec4( transformed, 1.0 );\n\tvec4 skinned \x3d vec4( 0.0 );\n\tskinned +\x3d boneMatX * skinVertex * skinWeight.x;\n\tskinned +\x3d boneMatY * skinVertex * skinWeight.y;\n\tskinned +\x3d boneMatZ * skinVertex * skinWeight.z;\n\tskinned +\x3d boneMatW * skinVertex * skinWeight.w;\n\ttransformed \x3d ( bindMatrixInverse * skinned ).xyz;\n#endif\n",skinnormal_vertex:"#ifdef USE_SKINNING\n\tmat4 skinMatrix \x3d mat4( 0.0 );\n\tskinMatrix +\x3d skinWeight.x * boneMatX;\n\tskinMatrix +\x3d skinWeight.y * boneMatY;\n\tskinMatrix +\x3d skinWeight.z * boneMatZ;\n\tskinMatrix +\x3d skinWeight.w * boneMatW;\n\tskinMatrix \x3d bindMatrixInverse * skinMatrix * bindMatrix;\n\tobjectNormal \x3d vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n#endif\n",specularmap_fragment:"float specularStrength;\n#ifdef USE_SPECULARMAP\n\tvec4 texelSpecular \x3d texture2D( specularMap, vUv );\n\tspecularStrength \x3d texelSpecular.r;\n#else\n\tspecularStrength \x3d 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 \x3d toneMapping( gl_FragColor.rgb );\n#endif\n",tonemapping_pars_fragment:"#ifndef saturate\n\t#define saturate(a) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;\nuniform float toneMappingWhitePoint;\nvec3 LinearToneMapping( vec3 color ) {\n\treturn toneMappingExposure * color;\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n\tcolor *\x3d 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 *\x3d toneMappingExposure;\n\treturn saturate( Uncharted2Helper( color ) / Uncharted2Helper( vec3( toneMappingWhitePoint ) ) );\n}\nvec3 OptimizedCineonToneMapping( vec3 color ) {\n\tcolor *\x3d toneMappingExposure;\n\tcolor \x3d 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 mat3 uvTransform;\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 \x3d ( uvTransform * vec3( uv, 1 ) ).xy;\n#endif",uv2_pars_fragment:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvarying vec2 vUv2;\n#endif",uv2_pars_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tattribute vec2 uv2;\n\tvarying vec2 vUv2;\n#endif",uv2_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvUv2 \x3d uv2;\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP )\n\tvec4 worldPosition \x3d modelMatrix * vec4( transformed, 1.0 );\n#endif\n",background_frag:"uniform sampler2D t2D;\nvarying vec2 vUv;\nvoid main() {\n\tgl_FragColor \x3d texture2D( t2D, vUv );\n}\n",background_vert:"varying vec2 vUv;\nvoid main() {\n\tvUv \x3d uv;\n\tgl_Position \x3d vec4( position, 1.0 );\n\tgl_Position.z \x3d 1.0;\n}\n",cube_frag:"uniform samplerCube tCube;\nuniform float tFlip;\nuniform float opacity;\nvarying vec3 vWorldPosition;\nvoid main() {\n\tgl_FragColor \x3d textureCube( tCube, vec3( tFlip * vWorldPosition.x, vWorldPosition.yz ) );\n\tgl_FragColor.a *\x3d opacity;\n}\n",cube_vert:"varying vec3 vWorldPosition;\n#include \x3ccommon\x3e\nvoid main() {\n\tvWorldPosition \x3d transformDirection( position, modelMatrix );\n\t#include \x3cbegin_vertex\x3e\n\t#include \x3cproject_vertex\x3e\n\tgl_Position.z \x3d gl_Position.w;\n}\n",depth_frag:"#if DEPTH_PACKING \x3d\x3d 3200\n\tuniform float opacity;\n#endif\n#include \x3ccommon\x3e\n#include \x3cpacking\x3e\n#include \x3cuv_pars_fragment\x3e\n#include \x3cmap_pars_fragment\x3e\n#include \x3calphamap_pars_fragment\x3e\n#include \x3clogdepthbuf_pars_fragment\x3e\n#include \x3cclipping_planes_pars_fragment\x3e\nvoid main() {\n\t#include \x3cclipping_planes_fragment\x3e\n\tvec4 diffuseColor \x3d vec4( 1.0 );\n\t#if DEPTH_PACKING \x3d\x3d 3200\n\t\tdiffuseColor.a \x3d opacity;\n\t#endif\n\t#include \x3cmap_fragment\x3e\n\t#include \x3calphamap_fragment\x3e\n\t#include \x3calphatest_fragment\x3e\n\t#include \x3clogdepthbuf_fragment\x3e\n\t#if DEPTH_PACKING \x3d\x3d 3200\n\t\tgl_FragColor \x3d vec4( vec3( 1.0 - gl_FragCoord.z ), opacity );\n\t#elif DEPTH_PACKING \x3d\x3d 3201\n\t\tgl_FragColor \x3d packDepthToRGBA( gl_FragCoord.z );\n\t#endif\n}\n",depth_vert:"#include \x3ccommon\x3e\n#include \x3cuv_pars_vertex\x3e\n#include \x3cdisplacementmap_pars_vertex\x3e\n#include \x3cmorphtarget_pars_vertex\x3e\n#include \x3cskinning_pars_vertex\x3e\n#include \x3clogdepthbuf_pars_vertex\x3e\n#include \x3cclipping_planes_pars_vertex\x3e\nvoid main() {\n\t#include \x3cuv_vertex\x3e\n\t#include \x3cskinbase_vertex\x3e\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include \x3cbeginnormal_vertex\x3e\n\t\t#include \x3cmorphnormal_vertex\x3e\n\t\t#include \x3cskinnormal_vertex\x3e\n\t#endif\n\t#include \x3cbegin_vertex\x3e\n\t#include \x3cmorphtarget_vertex\x3e\n\t#include \x3cskinning_vertex\x3e\n\t#include \x3cdisplacementmap_vertex\x3e\n\t#include \x3cproject_vertex\x3e\n\t#include \x3clogdepthbuf_vertex\x3e\n\t#include \x3cclipping_planes_vertex\x3e\n}\n",distanceRGBA_frag:"#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include \x3ccommon\x3e\n#include \x3cpacking\x3e\n#include \x3cuv_pars_fragment\x3e\n#include \x3cmap_pars_fragment\x3e\n#include \x3calphamap_pars_fragment\x3e\n#include \x3cclipping_planes_pars_fragment\x3e\nvoid main () {\n\t#include \x3cclipping_planes_fragment\x3e\n\tvec4 diffuseColor \x3d vec4( 1.0 );\n\t#include \x3cmap_fragment\x3e\n\t#include \x3calphamap_fragment\x3e\n\t#include \x3calphatest_fragment\x3e\n\tfloat dist \x3d length( vWorldPosition - referencePosition );\n\tdist \x3d ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist \x3d saturate( dist );\n\tgl_FragColor \x3d packDepthToRGBA( dist );\n}\n",distanceRGBA_vert:"#define DISTANCE\nvarying vec3 vWorldPosition;\n#include \x3ccommon\x3e\n#include \x3cuv_pars_vertex\x3e\n#include \x3cdisplacementmap_pars_vertex\x3e\n#include \x3cmorphtarget_pars_vertex\x3e\n#include \x3cskinning_pars_vertex\x3e\n#include \x3cclipping_planes_pars_vertex\x3e\nvoid main() {\n\t#include \x3cuv_vertex\x3e\n\t#include \x3cskinbase_vertex\x3e\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include \x3cbeginnormal_vertex\x3e\n\t\t#include \x3cmorphnormal_vertex\x3e\n\t\t#include \x3cskinnormal_vertex\x3e\n\t#endif\n\t#include \x3cbegin_vertex\x3e\n\t#include \x3cmorphtarget_vertex\x3e\n\t#include \x3cskinning_vertex\x3e\n\t#include \x3cdisplacementmap_vertex\x3e\n\t#include \x3cproject_vertex\x3e\n\t#include \x3cworldpos_vertex\x3e\n\t#include \x3cclipping_planes_vertex\x3e\n\tvWorldPosition \x3d worldPosition.xyz;\n}\n",equirect_frag:"uniform sampler2D tEquirect;\nvarying vec3 vWorldPosition;\n#include \x3ccommon\x3e\nvoid main() {\n\tvec3 direction \x3d normalize( vWorldPosition );\n\tvec2 sampleUV;\n\tsampleUV.y \x3d asin( clamp( direction.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\tsampleUV.x \x3d atan( direction.z, direction.x ) * RECIPROCAL_PI2 + 0.5;\n\tgl_FragColor \x3d texture2D( tEquirect, sampleUV );\n}\n",equirect_vert:"varying vec3 vWorldPosition;\n#include \x3ccommon\x3e\nvoid main() {\n\tvWorldPosition \x3d transformDirection( position, modelMatrix );\n\t#include \x3cbegin_vertex\x3e\n\t#include \x3cproject_vertex\x3e\n}\n",linedashed_frag:"uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include \x3ccommon\x3e\n#include \x3ccolor_pars_fragment\x3e\n#include \x3cfog_pars_fragment\x3e\n#include \x3clogdepthbuf_pars_fragment\x3e\n#include \x3cclipping_planes_pars_fragment\x3e\nvoid main() {\n\t#include \x3cclipping_planes_fragment\x3e\n\tif ( mod( vLineDistance, totalSize ) \x3e dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight \x3d vec3( 0.0 );\n\tvec4 diffuseColor \x3d vec4( diffuse, opacity );\n\t#include \x3clogdepthbuf_fragment\x3e\n\t#include \x3ccolor_fragment\x3e\n\toutgoingLight \x3d diffuseColor.rgb;\n\tgl_FragColor \x3d vec4( outgoingLight, diffuseColor.a );\n\t#include \x3cpremultiplied_alpha_fragment\x3e\n\t#include \x3ctonemapping_fragment\x3e\n\t#include \x3cencodings_fragment\x3e\n\t#include \x3cfog_fragment\x3e\n}\n",linedashed_vert:"uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include \x3ccommon\x3e\n#include \x3ccolor_pars_vertex\x3e\n#include \x3cfog_pars_vertex\x3e\n#include \x3clogdepthbuf_pars_vertex\x3e\n#include \x3cclipping_planes_pars_vertex\x3e\nvoid main() {\n\t#include \x3ccolor_vertex\x3e\n\tvLineDistance \x3d scale * lineDistance;\n\tvec4 mvPosition \x3d modelViewMatrix * vec4( position, 1.0 );\n\tgl_Position \x3d projectionMatrix * mvPosition;\n\t#include \x3clogdepthbuf_vertex\x3e\n\t#include \x3cclipping_planes_vertex\x3e\n\t#include \x3cfog_vertex\x3e\n}\n",meshbasic_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \x3ccommon\x3e\n#include \x3ccolor_pars_fragment\x3e\n#include \x3cuv_pars_fragment\x3e\n#include \x3cuv2_pars_fragment\x3e\n#include \x3cmap_pars_fragment\x3e\n#include \x3calphamap_pars_fragment\x3e\n#include \x3caomap_pars_fragment\x3e\n#include \x3clightmap_pars_fragment\x3e\n#include \x3cenvmap_pars_fragment\x3e\n#include \x3cfog_pars_fragment\x3e\n#include \x3cspecularmap_pars_fragment\x3e\n#include \x3clogdepthbuf_pars_fragment\x3e\n#include \x3cclipping_planes_pars_fragment\x3e\nvoid main() {\n\t#include \x3cclipping_planes_fragment\x3e\n\tvec4 diffuseColor \x3d vec4( diffuse, opacity );\n\t#include \x3clogdepthbuf_fragment\x3e\n\t#include \x3cmap_fragment\x3e\n\t#include \x3ccolor_fragment\x3e\n\t#include \x3calphamap_fragment\x3e\n\t#include \x3calphatest_fragment\x3e\n\t#include \x3cspecularmap_fragment\x3e\n\tReflectedLight reflectedLight \x3d ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\treflectedLight.indirectDiffuse +\x3d texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\n\t#else\n\t\treflectedLight.indirectDiffuse +\x3d vec3( 1.0 );\n\t#endif\n\t#include \x3caomap_fragment\x3e\n\treflectedLight.indirectDiffuse *\x3d diffuseColor.rgb;\n\tvec3 outgoingLight \x3d reflectedLight.indirectDiffuse;\n\t#include \x3cenvmap_fragment\x3e\n\tgl_FragColor \x3d vec4( outgoingLight, diffuseColor.a );\n\t#include \x3cpremultiplied_alpha_fragment\x3e\n\t#include \x3ctonemapping_fragment\x3e\n\t#include \x3cencodings_fragment\x3e\n\t#include \x3cfog_fragment\x3e\n}\n",meshbasic_vert:"#include \x3ccommon\x3e\n#include \x3cuv_pars_vertex\x3e\n#include \x3cuv2_pars_vertex\x3e\n#include \x3cenvmap_pars_vertex\x3e\n#include \x3ccolor_pars_vertex\x3e\n#include \x3cfog_pars_vertex\x3e\n#include \x3cmorphtarget_pars_vertex\x3e\n#include \x3cskinning_pars_vertex\x3e\n#include \x3clogdepthbuf_pars_vertex\x3e\n#include \x3cclipping_planes_pars_vertex\x3e\nvoid main() {\n\t#include \x3cuv_vertex\x3e\n\t#include \x3cuv2_vertex\x3e\n\t#include \x3ccolor_vertex\x3e\n\t#include \x3cskinbase_vertex\x3e\n\t#ifdef USE_ENVMAP\n\t#include \x3cbeginnormal_vertex\x3e\n\t#include \x3cmorphnormal_vertex\x3e\n\t#include \x3cskinnormal_vertex\x3e\n\t#include \x3cdefaultnormal_vertex\x3e\n\t#endif\n\t#include \x3cbegin_vertex\x3e\n\t#include \x3cmorphtarget_vertex\x3e\n\t#include \x3cskinning_vertex\x3e\n\t#include \x3cproject_vertex\x3e\n\t#include \x3clogdepthbuf_vertex\x3e\n\t#include \x3cworldpos_vertex\x3e\n\t#include \x3cclipping_planes_vertex\x3e\n\t#include \x3cenvmap_vertex\x3e\n\t#include \x3cfog_vertex\x3e\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 \x3ccommon\x3e\n#include \x3cpacking\x3e\n#include \x3cdithering_pars_fragment\x3e\n#include \x3ccolor_pars_fragment\x3e\n#include \x3cuv_pars_fragment\x3e\n#include \x3cuv2_pars_fragment\x3e\n#include \x3cmap_pars_fragment\x3e\n#include \x3calphamap_pars_fragment\x3e\n#include \x3caomap_pars_fragment\x3e\n#include \x3clightmap_pars_fragment\x3e\n#include \x3cemissivemap_pars_fragment\x3e\n#include \x3cenvmap_pars_fragment\x3e\n#include \x3cbsdfs\x3e\n#include \x3clights_pars_begin\x3e\n#include \x3cfog_pars_fragment\x3e\n#include \x3cshadowmap_pars_fragment\x3e\n#include \x3cshadowmask_pars_fragment\x3e\n#include \x3cspecularmap_pars_fragment\x3e\n#include \x3clogdepthbuf_pars_fragment\x3e\n#include \x3cclipping_planes_pars_fragment\x3e\nvoid main() {\n\t#include \x3cclipping_planes_fragment\x3e\n\tvec4 diffuseColor \x3d vec4( diffuse, opacity );\n\tReflectedLight reflectedLight \x3d ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance \x3d emissive;\n\t#include \x3clogdepthbuf_fragment\x3e\n\t#include \x3cmap_fragment\x3e\n\t#include \x3ccolor_fragment\x3e\n\t#include \x3calphamap_fragment\x3e\n\t#include \x3calphatest_fragment\x3e\n\t#include \x3cspecularmap_fragment\x3e\n\t#include \x3cemissivemap_fragment\x3e\n\treflectedLight.indirectDiffuse \x3d getAmbientLightIrradiance( ambientLightColor );\n\t#include \x3clightmap_fragment\x3e\n\treflectedLight.indirectDiffuse *\x3d BRDF_Diffuse_Lambert( diffuseColor.rgb );\n\t#ifdef DOUBLE_SIDED\n\t\treflectedLight.directDiffuse \x3d ( gl_FrontFacing ) ? vLightFront : vLightBack;\n\t#else\n\t\treflectedLight.directDiffuse \x3d vLightFront;\n\t#endif\n\treflectedLight.directDiffuse *\x3d BRDF_Diffuse_Lambert( diffuseColor.rgb ) * getShadowMask();\n\t#include \x3caomap_fragment\x3e\n\tvec3 outgoingLight \x3d reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include \x3cenvmap_fragment\x3e\n\tgl_FragColor \x3d vec4( outgoingLight, diffuseColor.a );\n\t#include \x3ctonemapping_fragment\x3e\n\t#include \x3cencodings_fragment\x3e\n\t#include \x3cfog_fragment\x3e\n\t#include \x3cpremultiplied_alpha_fragment\x3e\n\t#include \x3cdithering_fragment\x3e\n}\n",meshlambert_vert:"#define LAMBERT\nvarying vec3 vLightFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n#endif\n#include \x3ccommon\x3e\n#include \x3cuv_pars_vertex\x3e\n#include \x3cuv2_pars_vertex\x3e\n#include \x3cenvmap_pars_vertex\x3e\n#include \x3cbsdfs\x3e\n#include \x3clights_pars_begin\x3e\n#include \x3ccolor_pars_vertex\x3e\n#include \x3cfog_pars_vertex\x3e\n#include \x3cmorphtarget_pars_vertex\x3e\n#include \x3cskinning_pars_vertex\x3e\n#include \x3cshadowmap_pars_vertex\x3e\n#include \x3clogdepthbuf_pars_vertex\x3e\n#include \x3cclipping_planes_pars_vertex\x3e\nvoid main() {\n\t#include \x3cuv_vertex\x3e\n\t#include \x3cuv2_vertex\x3e\n\t#include \x3ccolor_vertex\x3e\n\t#include \x3cbeginnormal_vertex\x3e\n\t#include \x3cmorphnormal_vertex\x3e\n\t#include \x3cskinbase_vertex\x3e\n\t#include \x3cskinnormal_vertex\x3e\n\t#include \x3cdefaultnormal_vertex\x3e\n\t#include \x3cbegin_vertex\x3e\n\t#include \x3cmorphtarget_vertex\x3e\n\t#include \x3cskinning_vertex\x3e\n\t#include \x3cproject_vertex\x3e\n\t#include \x3clogdepthbuf_vertex\x3e\n\t#include \x3cclipping_planes_vertex\x3e\n\t#include \x3cworldpos_vertex\x3e\n\t#include \x3cenvmap_vertex\x3e\n\t#include \x3clights_lambert_vertex\x3e\n\t#include \x3cshadowmap_vertex\x3e\n\t#include \x3cfog_vertex\x3e\n}\n",meshmatcap_frag:"#define MATCAP\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2D matcap;\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \x3ccommon\x3e\n#include \x3cuv_pars_fragment\x3e\n#include \x3cmap_pars_fragment\x3e\n#include \x3calphamap_pars_fragment\x3e\n#include \x3cfog_pars_fragment\x3e\n#include \x3cbumpmap_pars_fragment\x3e\n#include \x3cnormalmap_pars_fragment\x3e\n#include \x3clogdepthbuf_pars_fragment\x3e\n#include \x3cclipping_planes_pars_fragment\x3e\nvoid main() {\n\t#include \x3cclipping_planes_fragment\x3e\n\tvec4 diffuseColor \x3d vec4( diffuse, opacity );\n\t#include \x3clogdepthbuf_fragment\x3e\n\t#include \x3cmap_fragment\x3e\n\t#include \x3calphamap_fragment\x3e\n\t#include \x3calphatest_fragment\x3e\n\t#include \x3cnormal_fragment_begin\x3e\n\t#include \x3cnormal_fragment_maps\x3e\n\tvec3 viewDir \x3d normalize( vViewPosition );\n\tvec3 x \x3d normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\n\tvec3 y \x3d cross( viewDir, x );\n\tvec2 uv \x3d vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\n\tvec4 matcapColor \x3d texture2D( matcap, uv );\n\tmatcapColor \x3d matcapTexelToLinear( matcapColor );\n\tvec3 outgoingLight \x3d diffuseColor.rgb * matcapColor.rgb;\n\tgl_FragColor \x3d vec4( outgoingLight, diffuseColor.a );\n\t#include \x3cpremultiplied_alpha_fragment\x3e\n\t#include \x3ctonemapping_fragment\x3e\n\t#include \x3cencodings_fragment\x3e\n\t#include \x3cfog_fragment\x3e\n}\n",meshmatcap_vert:"#define MATCAP\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \x3ccommon\x3e\n#include \x3cuv_pars_vertex\x3e\n#include \x3cdisplacementmap_pars_vertex\x3e\n#include \x3cfog_pars_vertex\x3e\n#include \x3cmorphtarget_pars_vertex\x3e\n#include \x3cskinning_pars_vertex\x3e\n#include \x3clogdepthbuf_pars_vertex\x3e\n#include \x3cclipping_planes_pars_vertex\x3e\nvoid main() {\n\t#include \x3cuv_vertex\x3e\n\t#include \x3cbeginnormal_vertex\x3e\n\t#include \x3cmorphnormal_vertex\x3e\n\t#include \x3cskinbase_vertex\x3e\n\t#include \x3cskinnormal_vertex\x3e\n\t#include \x3cdefaultnormal_vertex\x3e\n\t#ifndef FLAT_SHADED\n\t\tvNormal \x3d normalize( transformedNormal );\n\t#endif\n\t#include \x3cbegin_vertex\x3e\n\t#include \x3cmorphtarget_vertex\x3e\n\t#include \x3cskinning_vertex\x3e\n\t#include \x3cdisplacementmap_vertex\x3e\n\t#include \x3cproject_vertex\x3e\n\t#include \x3clogdepthbuf_vertex\x3e\n\t#include \x3cclipping_planes_vertex\x3e\n\t#include \x3cfog_vertex\x3e\n\tvViewPosition \x3d - mvPosition.xyz;\n}\n",meshphong_frag:"#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include \x3ccommon\x3e\n#include \x3cpacking\x3e\n#include \x3cdithering_pars_fragment\x3e\n#include \x3ccolor_pars_fragment\x3e\n#include \x3cuv_pars_fragment\x3e\n#include \x3cuv2_pars_fragment\x3e\n#include \x3cmap_pars_fragment\x3e\n#include \x3calphamap_pars_fragment\x3e\n#include \x3caomap_pars_fragment\x3e\n#include \x3clightmap_pars_fragment\x3e\n#include \x3cemissivemap_pars_fragment\x3e\n#include \x3cenvmap_pars_fragment\x3e\n#include \x3cgradientmap_pars_fragment\x3e\n#include \x3cfog_pars_fragment\x3e\n#include \x3cbsdfs\x3e\n#include \x3clights_pars_begin\x3e\n#include \x3clights_phong_pars_fragment\x3e\n#include \x3cshadowmap_pars_fragment\x3e\n#include \x3cbumpmap_pars_fragment\x3e\n#include \x3cnormalmap_pars_fragment\x3e\n#include \x3cspecularmap_pars_fragment\x3e\n#include \x3clogdepthbuf_pars_fragment\x3e\n#include \x3cclipping_planes_pars_fragment\x3e\nvoid main() {\n\t#include \x3cclipping_planes_fragment\x3e\n\tvec4 diffuseColor \x3d vec4( diffuse, opacity );\n\tReflectedLight reflectedLight \x3d ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance \x3d emissive;\n\t#include \x3clogdepthbuf_fragment\x3e\n\t#include \x3cmap_fragment\x3e\n\t#include \x3ccolor_fragment\x3e\n\t#include \x3calphamap_fragment\x3e\n\t#include \x3calphatest_fragment\x3e\n\t#include \x3cspecularmap_fragment\x3e\n\t#include \x3cnormal_fragment_begin\x3e\n\t#include \x3cnormal_fragment_maps\x3e\n\t#include \x3cemissivemap_fragment\x3e\n\t#include \x3clights_phong_fragment\x3e\n\t#include \x3clights_fragment_begin\x3e\n\t#include \x3clights_fragment_maps\x3e\n\t#include \x3clights_fragment_end\x3e\n\t#include \x3caomap_fragment\x3e\n\tvec3 outgoingLight \x3d reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include \x3cenvmap_fragment\x3e\n\tgl_FragColor \x3d vec4( outgoingLight, diffuseColor.a );\n\t#include \x3ctonemapping_fragment\x3e\n\t#include \x3cencodings_fragment\x3e\n\t#include \x3cfog_fragment\x3e\n\t#include \x3cpremultiplied_alpha_fragment\x3e\n\t#include \x3cdithering_fragment\x3e\n}\n",meshphong_vert:"#define PHONG\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \x3ccommon\x3e\n#include \x3cuv_pars_vertex\x3e\n#include \x3cuv2_pars_vertex\x3e\n#include \x3cdisplacementmap_pars_vertex\x3e\n#include \x3cenvmap_pars_vertex\x3e\n#include \x3ccolor_pars_vertex\x3e\n#include \x3cfog_pars_vertex\x3e\n#include \x3cmorphtarget_pars_vertex\x3e\n#include \x3cskinning_pars_vertex\x3e\n#include \x3cshadowmap_pars_vertex\x3e\n#include \x3clogdepthbuf_pars_vertex\x3e\n#include \x3cclipping_planes_pars_vertex\x3e\nvoid main() {\n\t#include \x3cuv_vertex\x3e\n\t#include \x3cuv2_vertex\x3e\n\t#include \x3ccolor_vertex\x3e\n\t#include \x3cbeginnormal_vertex\x3e\n\t#include \x3cmorphnormal_vertex\x3e\n\t#include \x3cskinbase_vertex\x3e\n\t#include \x3cskinnormal_vertex\x3e\n\t#include \x3cdefaultnormal_vertex\x3e\n#ifndef FLAT_SHADED\n\tvNormal \x3d normalize( transformedNormal );\n#endif\n\t#include \x3cbegin_vertex\x3e\n\t#include \x3cmorphtarget_vertex\x3e\n\t#include \x3cskinning_vertex\x3e\n\t#include \x3cdisplacementmap_vertex\x3e\n\t#include \x3cproject_vertex\x3e\n\t#include \x3clogdepthbuf_vertex\x3e\n\t#include \x3cclipping_planes_vertex\x3e\n\tvViewPosition \x3d - mvPosition.xyz;\n\t#include \x3cworldpos_vertex\x3e\n\t#include \x3cenvmap_vertex\x3e\n\t#include \x3cshadowmap_vertex\x3e\n\t#include \x3cfog_vertex\x3e\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 \x3ccommon\x3e\n#include \x3cpacking\x3e\n#include \x3cdithering_pars_fragment\x3e\n#include \x3ccolor_pars_fragment\x3e\n#include \x3cuv_pars_fragment\x3e\n#include \x3cuv2_pars_fragment\x3e\n#include \x3cmap_pars_fragment\x3e\n#include \x3calphamap_pars_fragment\x3e\n#include \x3caomap_pars_fragment\x3e\n#include \x3clightmap_pars_fragment\x3e\n#include \x3cemissivemap_pars_fragment\x3e\n#include \x3cbsdfs\x3e\n#include \x3ccube_uv_reflection_fragment\x3e\n#include \x3cenvmap_pars_fragment\x3e\n#include \x3cenvmap_physical_pars_fragment\x3e\n#include \x3cfog_pars_fragment\x3e\n#include \x3clights_pars_begin\x3e\n#include \x3clights_physical_pars_fragment\x3e\n#include \x3cshadowmap_pars_fragment\x3e\n#include \x3cbumpmap_pars_fragment\x3e\n#include \x3cnormalmap_pars_fragment\x3e\n#include \x3croughnessmap_pars_fragment\x3e\n#include \x3cmetalnessmap_pars_fragment\x3e\n#include \x3clogdepthbuf_pars_fragment\x3e\n#include \x3cclipping_planes_pars_fragment\x3e\nvoid main() {\n\t#include \x3cclipping_planes_fragment\x3e\n\tvec4 diffuseColor \x3d vec4( diffuse, opacity );\n\tReflectedLight reflectedLight \x3d ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance \x3d emissive;\n\t#include \x3clogdepthbuf_fragment\x3e\n\t#include \x3cmap_fragment\x3e\n\t#include \x3ccolor_fragment\x3e\n\t#include \x3calphamap_fragment\x3e\n\t#include \x3calphatest_fragment\x3e\n\t#include \x3croughnessmap_fragment\x3e\n\t#include \x3cmetalnessmap_fragment\x3e\n\t#include \x3cnormal_fragment_begin\x3e\n\t#include \x3cnormal_fragment_maps\x3e\n\t#include \x3cemissivemap_fragment\x3e\n\t#include \x3clights_physical_fragment\x3e\n\t#include \x3clights_fragment_begin\x3e\n\t#include \x3clights_fragment_maps\x3e\n\t#include \x3clights_fragment_end\x3e\n\t#include \x3caomap_fragment\x3e\n\tvec3 outgoingLight \x3d reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\tgl_FragColor \x3d vec4( outgoingLight, diffuseColor.a );\n\t#include \x3ctonemapping_fragment\x3e\n\t#include \x3cencodings_fragment\x3e\n\t#include \x3cfog_fragment\x3e\n\t#include \x3cpremultiplied_alpha_fragment\x3e\n\t#include \x3cdithering_fragment\x3e\n}\n",meshphysical_vert:"#define PHYSICAL\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \x3ccommon\x3e\n#include \x3cuv_pars_vertex\x3e\n#include \x3cuv2_pars_vertex\x3e\n#include \x3cdisplacementmap_pars_vertex\x3e\n#include \x3ccolor_pars_vertex\x3e\n#include \x3cfog_pars_vertex\x3e\n#include \x3cmorphtarget_pars_vertex\x3e\n#include \x3cskinning_pars_vertex\x3e\n#include \x3cshadowmap_pars_vertex\x3e\n#include \x3clogdepthbuf_pars_vertex\x3e\n#include \x3cclipping_planes_pars_vertex\x3e\nvoid main() {\n\t#include \x3cuv_vertex\x3e\n\t#include \x3cuv2_vertex\x3e\n\t#include \x3ccolor_vertex\x3e\n\t#include \x3cbeginnormal_vertex\x3e\n\t#include \x3cmorphnormal_vertex\x3e\n\t#include \x3cskinbase_vertex\x3e\n\t#include \x3cskinnormal_vertex\x3e\n\t#include \x3cdefaultnormal_vertex\x3e\n#ifndef FLAT_SHADED\n\tvNormal \x3d normalize( transformedNormal );\n#endif\n\t#include \x3cbegin_vertex\x3e\n\t#include \x3cmorphtarget_vertex\x3e\n\t#include \x3cskinning_vertex\x3e\n\t#include \x3cdisplacementmap_vertex\x3e\n\t#include \x3cproject_vertex\x3e\n\t#include \x3clogdepthbuf_vertex\x3e\n\t#include \x3cclipping_planes_vertex\x3e\n\tvViewPosition \x3d - mvPosition.xyz;\n\t#include \x3cworldpos_vertex\x3e\n\t#include \x3cshadowmap_vertex\x3e\n\t#include \x3cfog_vertex\x3e\n}\n",normal_frag:"#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || ( defined( USE_NORMALMAP ) \x26\x26 ! defined( OBJECTSPACE_NORMALMAP ) )\n\tvarying vec3 vViewPosition;\n#endif\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \x3cpacking\x3e\n#include \x3cuv_pars_fragment\x3e\n#include \x3cbumpmap_pars_fragment\x3e\n#include \x3cnormalmap_pars_fragment\x3e\n#include \x3clogdepthbuf_pars_fragment\x3e\nvoid main() {\n\t#include \x3clogdepthbuf_fragment\x3e\n\t#include \x3cnormal_fragment_begin\x3e\n\t#include \x3cnormal_fragment_maps\x3e\n\tgl_FragColor \x3d vec4( packNormalToRGB( normal ), opacity );\n}\n",normal_vert:"#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || ( defined( USE_NORMALMAP ) \x26\x26 ! defined( OBJECTSPACE_NORMALMAP ) )\n\tvarying vec3 vViewPosition;\n#endif\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \x3cuv_pars_vertex\x3e\n#include \x3cdisplacementmap_pars_vertex\x3e\n#include \x3cmorphtarget_pars_vertex\x3e\n#include \x3cskinning_pars_vertex\x3e\n#include \x3clogdepthbuf_pars_vertex\x3e\nvoid main() {\n\t#include \x3cuv_vertex\x3e\n\t#include \x3cbeginnormal_vertex\x3e\n\t#include \x3cmorphnormal_vertex\x3e\n\t#include \x3cskinbase_vertex\x3e\n\t#include \x3cskinnormal_vertex\x3e\n\t#include \x3cdefaultnormal_vertex\x3e\n#ifndef FLAT_SHADED\n\tvNormal \x3d normalize( transformedNormal );\n#endif\n\t#include \x3cbegin_vertex\x3e\n\t#include \x3cmorphtarget_vertex\x3e\n\t#include \x3cskinning_vertex\x3e\n\t#include \x3cdisplacementmap_vertex\x3e\n\t#include \x3cproject_vertex\x3e\n\t#include \x3clogdepthbuf_vertex\x3e\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || ( defined( USE_NORMALMAP ) \x26\x26 ! defined( OBJECTSPACE_NORMALMAP ) )\n\tvViewPosition \x3d - mvPosition.xyz;\n#endif\n}\n",points_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include \x3ccommon\x3e\n#include \x3ccolor_pars_fragment\x3e\n#include \x3cmap_particle_pars_fragment\x3e\n#include \x3cfog_pars_fragment\x3e\n#include \x3clogdepthbuf_pars_fragment\x3e\n#include \x3cclipping_planes_pars_fragment\x3e\nvoid main() {\n\t#include \x3cclipping_planes_fragment\x3e\n\tvec3 outgoingLight \x3d vec3( 0.0 );\n\tvec4 diffuseColor \x3d vec4( diffuse, opacity );\n\t#include \x3clogdepthbuf_fragment\x3e\n\t#include \x3cmap_particle_fragment\x3e\n\t#include \x3ccolor_fragment\x3e\n\t#include \x3calphatest_fragment\x3e\n\toutgoingLight \x3d diffuseColor.rgb;\n\tgl_FragColor \x3d vec4( outgoingLight, diffuseColor.a );\n\t#include \x3cpremultiplied_alpha_fragment\x3e\n\t#include \x3ctonemapping_fragment\x3e\n\t#include \x3cencodings_fragment\x3e\n\t#include \x3cfog_fragment\x3e\n}\n",points_vert:"uniform float size;\nuniform float scale;\n#include \x3ccommon\x3e\n#include \x3ccolor_pars_vertex\x3e\n#include \x3cfog_pars_vertex\x3e\n#include \x3cmorphtarget_pars_vertex\x3e\n#include \x3clogdepthbuf_pars_vertex\x3e\n#include \x3cclipping_planes_pars_vertex\x3e\nvoid main() {\n\t#include \x3ccolor_vertex\x3e\n\t#include \x3cbegin_vertex\x3e\n\t#include \x3cmorphtarget_vertex\x3e\n\t#include \x3cproject_vertex\x3e\n\tgl_PointSize \x3d size;\n\t#ifdef USE_SIZEATTENUATION\n\t\tbool isPerspective \x3d ( projectionMatrix[ 2 ][ 3 ] \x3d\x3d - 1.0 );\n\t\tif ( isPerspective ) gl_PointSize *\x3d ( scale / - mvPosition.z );\n\t#endif\n\t#include \x3clogdepthbuf_vertex\x3e\n\t#include \x3cclipping_planes_vertex\x3e\n\t#include \x3cworldpos_vertex\x3e\n\t#include \x3cfog_vertex\x3e\n}\n",shadow_frag:"uniform vec3 color;\nuniform float opacity;\n#include \x3ccommon\x3e\n#include \x3cpacking\x3e\n#include \x3cfog_pars_fragment\x3e\n#include \x3cbsdfs\x3e\n#include \x3clights_pars_begin\x3e\n#include \x3cshadowmap_pars_fragment\x3e\n#include \x3cshadowmask_pars_fragment\x3e\nvoid main() {\n\tgl_FragColor \x3d vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include \x3cfog_fragment\x3e\n}\n",shadow_vert:"#include \x3cfog_pars_vertex\x3e\n#include \x3cshadowmap_pars_vertex\x3e\nvoid main() {\n\t#include \x3cbegin_vertex\x3e\n\t#include \x3cproject_vertex\x3e\n\t#include \x3cworldpos_vertex\x3e\n\t#include \x3cshadowmap_vertex\x3e\n\t#include \x3cfog_vertex\x3e\n}\n",sprite_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include \x3ccommon\x3e\n#include \x3cuv_pars_fragment\x3e\n#include \x3cmap_pars_fragment\x3e\n#include \x3cfog_pars_fragment\x3e\n#include \x3clogdepthbuf_pars_fragment\x3e\n#include \x3cclipping_planes_pars_fragment\x3e\nvoid main() {\n\t#include \x3cclipping_planes_fragment\x3e\n\tvec3 outgoingLight \x3d vec3( 0.0 );\n\tvec4 diffuseColor \x3d vec4( diffuse, opacity );\n\t#include \x3clogdepthbuf_fragment\x3e\n\t#include \x3cmap_fragment\x3e\n\t#include \x3calphatest_fragment\x3e\n\toutgoingLight \x3d diffuseColor.rgb;\n\tgl_FragColor \x3d vec4( outgoingLight, diffuseColor.a );\n\t#include \x3ctonemapping_fragment\x3e\n\t#include \x3cencodings_fragment\x3e\n\t#include \x3cfog_fragment\x3e\n}\n",sprite_vert:"uniform float rotation;\nuniform vec2 center;\n#include \x3ccommon\x3e\n#include \x3cuv_pars_vertex\x3e\n#include \x3cfog_pars_vertex\x3e\n#include \x3clogdepthbuf_pars_vertex\x3e\n#include \x3cclipping_planes_pars_vertex\x3e\nvoid main() {\n\t#include \x3cuv_vertex\x3e\n\tvec4 mvPosition \x3d modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\n\tvec2 scale;\n\tscale.x \x3d length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );\n\tscale.y \x3d length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );\n\t#ifndef USE_SIZEATTENUATION\n\t\tbool isPerspective \x3d ( projectionMatrix[ 2 ][ 3 ] \x3d\x3d - 1.0 );\n\t\tif ( isPerspective ) scale *\x3d - mvPosition.z;\n\t#endif\n\tvec2 alignedPosition \x3d ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n\tvec2 rotatedPosition;\n\trotatedPosition.x \x3d cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n\trotatedPosition.y \x3d sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n\tmvPosition.xy +\x3d rotatedPosition;\n\tgl_Position \x3d projectionMatrix * mvPosition;\n\t#include \x3clogdepthbuf_vertex\x3e\n\t#include \x3cclipping_planes_vertex\x3e\n\t#include \x3cfog_vertex\x3e\n}\n"},qb={merge:function(c){for(var g={},a=0;a>16&255)/255;this.g=(c>>8&255)/255;this.b=(c&255)/255;return this},setRGB:function(c,g,a){this.r=c;this.g=g;this.b=a;return this},setHSL:function(){function c(c,a,b){0>b&&(b+=1);1b?a:b<2/3?c+6*(a-c)*(2/3-b):c}return function(g,a,b){g=Aa.euclideanModulo(g,1);a=Aa.clamp(a,0,1);b=Aa.clamp(b,0,1);0===a?this.r=this.g=this.b=b:(a=.5>=b?b*(1+a):b+a-b*a,b=2*b-a,this.r=c(b,a,g+1/3),this.g=c(b,a,g),this.b=c(b,a,g-1/3));return this}}(),setStyle:function(c){function g(g){void 0!==g&&1>parseFloat(g)&&console.warn("GLE.Color: Alpha component of "+c+" will be ignored.")}var a;if(a=/^((?:rgb|hsl)a?)\(\s*([^\)]*)\)/.exec(c)){var b=a[2];switch(a[1]){case "rgb":case "rgba":if(a=/^(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(b))return this.r=Math.min(255,parseInt(a[1],10))/255,this.g=Math.min(255,parseInt(a[2],10))/255,this.b=Math.min(255,parseInt(a[3],10))/255,g(a[5]),this;if(a=/^(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(b))return this.r=Math.min(100,parseInt(a[1],10))/100,this.g=Math.min(100,parseInt(a[2],10))/100,this.b=Math.min(100,parseInt(a[3],10))/100,g(a[5]),this;break;case "hsl":case "hsla":if(a=/^([0-9]*\.?[0-9]+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(b)){var b=parseFloat(a[1])/360,d=parseInt(a[2],10)/100,e=parseInt(a[3],10)/100;g(a[5]);return this.setHSL(b,d,e)}}}else if(a=/^\#([A-Fa-f0-9]+)$/.exec(c)){a=a[1];b=a.length;if(3===b)return this.r=parseInt(a.charAt(0)+a.charAt(0),16)/255,this.g=parseInt(a.charAt(1)+a.charAt(1),16)/255,this.b=parseInt(a.charAt(2)+a.charAt(2),16)/255,this;if(6===b)return this.r=parseInt(a.charAt(0)+a.charAt(1),16)/255,this.g=parseInt(a.charAt(2)+a.charAt(3),16)/255,this.b=parseInt(a.charAt(4)+a.charAt(5),16)/255,this}c&&0c?.0773993808*c:Math.pow(.9478672986*c+.0521327014,2.4)}return function(g){this.r=c(g.r);this.g=c(g.g);this.b=c(g.b);return this}}(),copyLinearToSRGB:function(){function c(c){return.0031308>c?12.92*c:1.055*Math.pow(c,.41666)-.055}return function(g){this.r=c(g.r);this.g=c(g.g);this.b=c(g.b);return this}}(),convertSRGBToLinear:function(){this.copySRGBToLinear(this);return this},convertLinearToSRGB:function(){this.copyLinearToSRGB(this);return 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(c){void 0===c&&(console.warn("GLE.Color: .getHSL() target is now required"),c={h:0,s:0,l:0});var g=this.r,a=this.g,b=this.b,d=Math.max(g,a,b),e=Math.min(g,a,b),f,h=(e+d)/2;if(e===d)e=f=0;else{var k=d-e,e=.5>=h?k/(d+e):k/(2-d-e);switch(d){case g:f=(a-b)/k+(aMath.abs(e)?(this._x=Math.atan2(-k,n),this._z=Math.atan2(-d,c)):(this._x=Math.atan2(p,h),this._z=0)):"YXZ"===g?(this._x=Math.asin(-b(k,-1,1)),.99999>Math.abs(k)?(this._y=Math.atan2(e,n),this._z=Math.atan2(f,h)):(this._y=Math.atan2(-l,c),this._z=0)):"ZXY"===g?(this._x=Math.asin(b(p,-1,1)),.99999>Math.abs(p)?(this._y=Math.atan2(-l,n),this._z=Math.atan2(-d,h)):(this._y=0,this._z=Math.atan2(f,c))):"ZYX"===g?(this._y=Math.asin(-b(l,-1,1)),.99999>Math.abs(l)?(this._x=Math.atan2(p,n),this._z=Math.atan2(f,c)):(this._x=0,this._z=Math.atan2(-d,h))):"YZX"===g?(this._z=Math.asin(b(f,-1,1)),.99999>Math.abs(f)?(this._x=Math.atan2(-k,h),this._y=Math.atan2(-l,c)):(this._x=0,this._y=Math.atan2(e,n))):"XZY"===g?(this._z=Math.asin(-b(d,-1,1)),.99999>Math.abs(d)?(this._x=Math.atan2(p,h),this._y=Math.atan2(e,c)):(this._x=Math.atan2(-k,n),this._y=0)):console.warn("GLE.Euler: .setFromRotationMatrix() given unsupported order: "+g);this._order=g;if(!1!==a)this.onChangeCallback();return this},setFromQuaternion:function(){var c=new e;return function(g,a,b){c.makeRotationFromQuaternion(g);return this.setFromRotationMatrix(c,a,b)}}(),setFromVector3:function(c,g){return this.set(c.x,c.y,c.z,g||this._order)},reorder:function(){var c=new f;return function(g){c.setFromEuler(this);return this.setFromQuaternion(c,g)}}(),equals:function(c){return c._x===this._x&&c._y===this._y&&c._z===this._z&&c._order===this._order},fromArray:function(c){this._x=c[0];this._y=c[1];this._z=c[2];void 0!==c[3]&&(this._order=c[3]);this.onChangeCallback();return this},toArray:function(c,g){void 0===c&&(c=[]);void 0===g&&(g=0);c[g]=this._x;c[g+1]=this._y;c[g+2]=this._z;c[g+3]=this._order;return c},toVector3:function(c){return c?c.set(this._x,this._y,this._z):new h(this._x,this._y,this._z)},onChange:function(c){this.onChangeCallback=c;return this},onChangeCallback:function(){}});Object.assign(aa.prototype,{set:function(c){this.mask=1<d;d++)if(e[d]===e[(d+1)%3]){c.push(f);break}for(f=c.length-1;0<=f;f--)for(e=c[f],this.faces.splice(e,1),b=0,h=this.faceVertexUvs.length;bthis.opacity&&(d.opacity=this.opacity);!0===this.transparent&&(d.transparent=this.transparent);d.depthFunc=this.depthFunc;d.depthTest=this.depthTest;d.depthWrite=this.depthWrite;0!==this.rotation&&(d.rotation=this.rotation);!0===this.polygonOffset&&(d.polygonOffset=!0);0!==this.polygonOffsetFactor&&(d.polygonOffsetFactor=this.polygonOffsetFactor);0!==this.polygonOffsetUnits&&(d.polygonOffsetUnits=this.polygonOffsetUnits);1!==this.linewidth&&(d.linewidth=this.linewidth);void 0!==this.dashSize&&(d.dashSize=this.dashSize);void 0!==this.gapSize&&(d.gapSize=this.gapSize);void 0!==this.scale&&(d.scale=this.scale);!0===this.dithering&&(d.dithering=!0);0g?a.copy(this.origin):a.copy(this.direction).multiplyScalar(g).add(this.origin)},distanceToPoint:function(c){return Math.sqrt(this.distanceSqToPoint(c))},distanceSqToPoint:function(){var c=new h;return function(a){var g=c.subVectors(a,this.origin).dot(this.direction);if(0>g)return this.origin.distanceToSquared(a);c.copy(this.direction).multiplyScalar(g).add(this.origin);return c.distanceToSquared(a)}}(),distanceSqToSegment:function(){var c=new h,a=new h,b=new h;return function(g,d,n,e){c.copy(g).add(d).multiplyScalar(.5);a.copy(d).sub(g).normalize();b.copy(this.origin).sub(c);var f=.5*g.distanceTo(d),h=-this.direction.dot(a),k=b.dot(this.direction),t=-b.dot(a),l=b.lengthSq(),p=Math.abs(1-h*h),y;0=-y?d<=y?(f=1/p,g*=f,d*=f,h=g*(g+h*d+2*k)+d*(h*g+d+2*t)+l):(d=f,g=Math.max(0,-(h*d+k)),h=-g*g+d*(d+2*t)+l):(d=-f,g=Math.max(0,-(h*d+k)),h=-g*g+d*(d+2*t)+l):d<=-y?(g=Math.max(0,-(-h*f+k)),d=0n)return null;n=Math.sqrt(n-d);d=g-n;g+=n;return 0>d&&0>g?null:0>d?this.at(g,b):this.at(d,b)}}(),intersectsSphere:function(c){return this.distanceSqToPoint(c.center)<=c.radius*c.radius},distanceToPlane:function(c){var a=c.normal.dot(this.direction);if(0===a)return 0===c.distanceToPoint(this.origin)?0:null;c=-(this.origin.dot(c.normal)+c.constant)/a;return 0<=c?c:null},intersectPlane:function(c,a){var g=this.distanceToPlane(c);return null===g?null:this.at(g,a)},intersectsPlane:function(c){var a=c.distanceToPoint(this.origin);return 0===a||0>c.normal.dot(this.direction)*a?!0:!1},intersectBox:function(c,a){var g,b,d,e,f;b=1/this.direction.x;e=1/this.direction.y;f=1/this.direction.z;var h=this.origin;0<=b?(g=(c.min.x-h.x)*b,b*=c.max.x-h.x):(g=(c.max.x-h.x)*b,b*=c.min.x-h.x);0<=e?(d=(c.min.y-h.y)*e,e*=c.max.y-h.y):(d=(c.max.y-h.y)*e,e*=c.min.y-h.y);if(g>e||d>b)return null;if(d>g||g!==g)g=d;if(ef||d>b)return null;if(d>g||g!==g)g=d;if(fb?null:this.at(0<=g?g:b,a)},intersectsBox:function(){var c=new h;return function(a){return null!==this.intersectBox(a,c)}}(),intersectTriangle:function(){var c=new h,a=new h,b=new h,d=new h;return function(g,n,e,f,h){a.subVectors(n,g);b.subVectors(e,g);d.crossVectors(a,b);n=this.direction.dot(d);if(0n)f=-1,n=-n;else return null;c.subVectors(this.origin,g);g=f*this.direction.dot(b.crossVectors(c,b));if(0>g)return null;e=f*this.direction.dot(a.cross(c));if(0>e||g+e>n)return null;g=-f*c.dot(d);return 0>g?null:this.at(g/n,h)}}(),applyMatrix4:function(c){this.origin.applyMatrix4(c);this.direction.transformDirection(c);return this},equals:function(c){return c.origin.equals(this.origin)&&c.direction.equals(this.direction)}});Object.assign(ka,{getNormal:function(){var c=new h;return function(a,b,d,e){void 0===e&&(console.warn("GLE.Triangle: .getNormal() target is now required"),e=new h);e.subVectors(d,b);c.subVectors(a,b);e.cross(c);a=e.lengthSq();return 0=c.x+c.y}}(),getUV:function(){var c=new h;return function(a,b,d,e,f,h,k,l){this.getBarycoord(a,b,d,e,c);l.set(0,0);l.addScaledVector(f,c.x);l.addScaledVector(h,c.y);l.addScaledVector(k,c.z);return l}}()});Object.assign(ka.prototype,{set:function(c,a,b){this.a.copy(c);this.b.copy(a);this.c.copy(b);return this},setFromPointsAndIndices:function(c,a,b,d){this.a.copy(c[a]);this.b.copy(c[b]);this.c.copy(c[d]);return this},clone:function(){return(new this.constructor).copy(this)},copy:function(c){this.a.copy(c.a);this.b.copy(c.b);this.c.copy(c.c);return this},getArea:function(){var c=new h,a=new h;return function(){c.subVectors(this.c,this.b);a.subVectors(this.a,this.b);return.5*c.cross(a).length()}}(),getMidpoint:function(c){void 0===c&&(console.warn("GLE.Triangle: .getMidpoint() target is now required"),c=new h);return c.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)},getNormal:function(c){return ka.getNormal(this.a,this.b,this.c,c)},getPlane:function(c){void 0===c&&(console.warn("GLE.Triangle: .getPlane() target is now required"),c=new h);return c.setFromCoplanarPoints(this.a,this.b,this.c)},getBarycoord:function(c,a){return ka.getBarycoord(c,this.a,this.b,this.c,a)},containsPoint:function(c){return ka.containsPoint(c,this.a,this.b,this.c)},getUV:function(c,a,b,d,e){return ka.getUV(c,this.a,this.b,this.c,a,b,d,e)},intersectsBox:function(c){return c.intersectsTriangle(this)},closestPointToPoint:function(){var c=new h,a=new h,b=new h,d=new h,e=new h,f=new h;return function(g,n){void 0===n&&(console.warn("GLE.Triangle: .closestPointToPoint() target is now required"),n=new h);var k=this.a,t=this.b,l=this.c,p;c.subVectors(t,k);a.subVectors(l,k);d.subVectors(g,k);var y=c.dot(d),m=a.dot(d);if(0>=y&&0>=m)return n.copy(k);e.subVectors(g,t);var z=c.dot(e),u=a.dot(e);if(0<=z&&u<=z)return n.copy(t);p=y*u-z*m;if(0>=p&&0<=y&&0>=z)return t=y/(y-z),n.copy(k).addScaledVector(c,t);f.subVectors(g,l);var v=c.dot(f),q=a.dot(f);if(0<=q&&v<=q)return n.copy(l);y=v*m-y*q;if(0>=y&&0<=m&&0>=q)return p=m/(m-q),n.copy(k).addScaledVector(a,p);m=z*q-v*u;if(0>=m&&0<=u-z&&0<=v-q)return b.subVectors(l,t),p=(u-z)/(u-z+(v-q)),n.copy(t).addScaledVector(b,p);l=1/(m+y+p);t=y*l;p*=l;return n.copy(k).addScaledVector(c,t).addScaledVector(a,p)}}(),equals:function(c){return c.a.equals(this.a)&&c.b.equals(this.b)&&c.c.equals(this.c)}});ha.prototype=Object.create(S.prototype);ha.prototype.constructor=ha;ha.prototype.isMal=!0;ha.prototype.copy=function(c){S.prototype.copy.call(this,c);this.color.copy(c.color);this.map=c.map;this.lightMap=c.lightMap;this.lightMapIntensity=c.lightMapIntensity;this.aoMap=c.aoMap;this.aoMapIntensity=c.aoMapIntensity;this.specularMap=c.specularMap;this.alphaMap=c.alphaMap;this.envMap=c.envMap;this.combine=c.combine;this.reflectivity=c.reflectivity;this.refractionRatio=c.refractionRatio;this.wireframe=c.wireframe;this.wireframeLinewidth=c.wireframeLinewidth;this.wireframeLinecap=c.wireframeLinecap;this.wireframeLinejoin=c.wireframeLinejoin;this.skinning=c.skinning;this.morphTargets=c.morphTargets;return this};na.prototype=Object.assign(Object.create(F.prototype),{constructor:na,isMesh:!0,setDrawMode:function(c){this.drawMode=c},copy:function(c){F.prototype.copy.call(this,c);this.drawMode=c.drawMode;void 0!==c.morphTargetInfluences&&(this.morphTargetInfluences=c.morphTargetInfluences.slice());void 0!==c.morphTargetDictionary&&(this.morphTargetDictionary=Object.assign({},c.morphTargetDictionary));return this},updateMorphTargets:function(){var c=this.geometry,a,b;if(c.isBufferGeometry){if(c=c.morphAttributes,a=Object.keys(c),0g.far?null:{distance:a,point:J.clone(),object:c}}function a(a,g,b,d,n,e,f,h,k){l.fromBufferAttribute(n,f);p.fromBufferAttribute(n,h);m.fromBufferAttribute(n,k);if(a=c(a,g,b,d,l,p,m,B))f=new C(f,h,k),ka.getNormal(l,p,m,f.normal),a.face=f;return a}var b=new e,f=new ja,k=new w,l=new h,p=new h,m=new h,z=new h,u=new h,v=new h,q=new d,r=new d,E=new d,B=new h,J=new h;return function(g,n){var e=this.geometry,h=this.material,t=this.matrixWorld;if(void 0!==h&&(null===e.boundingSphere&&e.computeBoundingSphere(),k.copy(e.boundingSphere),k.applyMatrix4(t),!1!==g.ray.intersectsSphere(k)&&(b.getInverse(t),f.copy(g.ray).applyMatrix4(b),null===e.boundingBox||!1!==f.intersectsBox(e.boundingBox))))if(e.isBufferGeometry){var y,I,C=e.index,w=e.attributes.position,J=e.attributes.uv,O=e.groups,e=e.drawRange,D,x,A,X,sa;if(null!==C)if(Array.isArray(h))for(D=0,A=O.length;Dg.far||n.push({distance:h,point:a.clone(),uv:ka.getUV(a,m,z,u,v,q,r,new d),face:null,object:this})}}(),clone:function(){return(new this.constructor(this.material)).copy(this)},copy:function(c){F.prototype.copy.call(this,c);void 0!==c.center&&this.center.copy(c.center);return this}});ce.prototype=Object.assign(Object.create(F.prototype),{constructor:ce,copy:function(c){F.prototype.copy.call(this,c,!1);c=c.levels;for(var a=0,b=c.length;a=b[d].distance)b[d-1].object.visible=!1,b[d].object.visible=!0;else break;for(;de||(l.applyMatrix4(this.matrixWorld),u=g.ray.origin.distanceTo(l),ug.far||d.push({distance:u,point:f.clone().applyMatrix4(this.matrixWorld),index:n,face:null,faceIndex:null,object:this}))}else for(n=0,z=y.length/3-1;ne||(l.applyMatrix4(this.matrixWorld),u=g.ray.origin.distanceTo(l),ug.far||d.push({distance:u,point:f.clone().applyMatrix4(this.matrixWorld),index:n,face:null,faceIndex:null,object:this}))}else if(n.isGeometry)for(k=n.vertices,t=k.length,n=0;ne||(l.applyMatrix4(this.matrixWorld),u=g.ray.origin.distanceTo(l),ug.far||d.push({distance:u,point:f.clone().applyMatrix4(this.matrixWorld),index:n,face:null,faceIndex:null,object:this}))}}}(),clone:function(){return(new this.constructor(this.geometry,this.material)).copy(this)}});Ha.prototype=Object.assign(Object.create(Pb.prototype),{constructor:Ha,isLineSegments:!0,computeLineDistances:function(){var c=new h,a=new h;return function(){var g=this.geometry;if(g.isBufferGeometry)if(null===g.index){for(var b=g.attributes.position,d=[],e=0,f=b.count;eg.far||d.push({distance:f,distanceToRay:Math.sqrt(e),point:p.clone(),index:b,face:null,object:n})}}var n=this,f=this.geometry,k=this.matrixWorld,t=g.params.Points.threshold;null===f.boundingSphere&&f.computeBoundingSphere();b.copy(f.boundingSphere);b.applyMatrix4(k);b.radius+=t;if(!1!==g.ray.intersectsSphere(b)){c.getInverse(k);a.copy(g.ray).applyMatrix4(c);var t=t/((this.scale.x+this.scale.y+this.scale.z)/3),l=t*t,t=new h,p=new h;if(f.isBufferGeometry){var m=f.index,f=f.attributes.position.array;if(null!==m)for(var y=m.array,m=0,z=y.length;m=c.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}});de.prototype=Object.create(m.prototype);de.prototype.constructor=de;de.prototype.isCompressedTexture=!0;Pe.prototype=Object.create(m.prototype);Pe.prototype.constructor=Pe;Pe.prototype.isCanvasTexture=!0;hd.prototype=Object.create(m.prototype);hd.prototype.constructor=hd;hd.prototype.isDepthTexture=!0;ee.prototype=Object.create(R.prototype);ee.prototype.constructor=ee;Df.prototype=Object.create(L.prototype);Df.prototype.constructor=Df;id.prototype=Object.create(R.prototype);id.prototype.constructor=id;jd.prototype=Object.create(L.prototype);jd.prototype.constructor=jd;bc.prototype=Object.create(R.prototype);bc.prototype.constructor=bc;Ef.prototype=Object.create(L.prototype);Ef.prototype.constructor=Ef;Ad.prototype=Object.create(bc.prototype);Ad.prototype.constructor=Ad;fe.prototype=Object.create(L.prototype);fe.prototype.constructor=fe;kd.prototype=Object.create(bc.prototype);kd.prototype.constructor=kd;ge.prototype=Object.create(L.prototype);ge.prototype.constructor=ge;Bd.prototype=Object.create(bc.prototype);Bd.prototype.constructor=Bd;wc.prototype=Object.create(L.prototype);wc.prototype.constructor=wc;Qe.prototype=Object.create(bc.prototype);Qe.prototype.constructor=Qe;Ff.prototype=Object.create(L.prototype);Ff.prototype.constructor=Ff;Re.prototype=Object.create(R.prototype);Re.prototype.constructor=Re;Gf.prototype=Object.create(L.prototype);Gf.prototype.constructor=Gf;Se.prototype=Object.create(R.prototype);Se.prototype.constructor=Se;Cd.prototype=Object.create(L.prototype);Cd.prototype.constructor=Cd;cc.prototype=Object.create(R.prototype);cc.prototype.constructor=cc;var Pi={triangulate:function(c,a,b){b=b||2;var g=a&&a.length,d=g?a[0]*b:c.length,e=Ai(c,0,d,b,!0),n=[];if(!e)return n;var f,h,k,l;if(g){var p=b,g=[],m,z,u;l=0;for(m=a.length;l80*b){f=k=c[0];h=g=c[1];for(p=b;pk&&(k=l),a>g&&(g=a);k=Math.max(k-f,g-h);k=0!==k?1/k:0}Te(e,n,b,f,h,k);return n}},dc={area:function(c){for(var a=c.length,b=0,d=a-1,e=0;edc.area(c)},triangulateShape:function(c,a){var g=[],b=[],d=[];Jf(c);Ei(g,c);var e=c.length;a.forEach(Jf);for(var f=0;fMath.abs(g-k)?[new d(c,1-b),new d(n,1-e),new d(t,1-f),new d(p,1-a)]:[new d(g,1-b),new d(k,1-e),new d(l,1-f),new d(m,1-a)]}};Ue.prototype=Object.create(L.prototype);Ue.prototype.constructor=Ue;Ve.prototype=Object.create(Wc.prototype);Ve.prototype.constructor=Ve;je.prototype=Object.create(L.prototype);je.prototype.constructor=je;ab.prototype=Object.create(R.prototype);ab.prototype.constructor=ab;xc.prototype=Object.create(L.prototype);xc.prototype.constructor=xc;ke.prototype=Object.create(R.prototype);ke.prototype.constructor=ke;ub.prototype=Object.create(L.prototype);ub.prototype.constructor=ub;We.prototype=Object.create(R.prototype);We.prototype.constructor=We;le.prototype=Object.create(L.prototype);le.prototype.constructor=le;le.prototype.toJSON=function(){var c=L.prototype.toJSON.call(this);return vg(this.parameters.shapes,c)};Xc.prototype=Object.create(R.prototype);Xc.prototype.constructor=Xc;Xc.prototype.toJSON=function(){var c=R.prototype.toJSON.call(this);return vg(this.parameters.shapes,c)};me.prototype=Object.create(R.prototype);me.prototype.constructor=me;ne.prototype=Object.create(L.prototype);ne.prototype.constructor=ne;ld.prototype=Object.create(R.prototype);ld.prototype.constructor=ld;Lf.prototype=Object.create(ne.prototype);Lf.prototype.constructor=Lf;Xe.prototype=Object.create(ld.prototype);Xe.prototype.constructor=Xe;Mf.prototype=Object.create(L.prototype);Mf.prototype.constructor=Mf;Ye.prototype=Object.create(R.prototype);Ye.prototype.constructor=Ye;var Fb=Object.freeze({WireframeGeometry:ee,ParametricGeometry:Df,ParametricBufferGeometry:id,TetrahedronGeometry:Ef,TetrahedronBufferGeometry:Ad,OctahedronGeometry:fe,OctahedronBufferGeometry:kd,IcosahedronGeometry:ge,IcosahedronBufferGeometry:Bd,DodecahedronGeometry:wc,DodecahedronBufferGeometry:Qe,PolyhedronGeometry:jd,PolyhedronBufferGeometry:bc,TubeGeometry:Ff,TubeBufferGeometry:Re,TorusKnotGeometry:Gf,TorusKnotBufferGeometry:Se,TorusGeometry:Cd,TorusBufferGeometry:cc,TextGeometry:Ue,TextBufferGeometry:Ve,SphereGeometry:je,SphereBufferGeometry:ab,RingGeometry:xc,RingBufferGeometry:ke,PlaneGeometry:da,PlaneBufferGeometry:Y,LatheGeometry:ub,LatheBufferGeometry:We,ShapeGeometry:le,ShapeBufferGeometry:Xc,ExtrudeGeometry:ie,ExtrudeBufferGeometry:Wc,EdgesGeometry:me,ConeGeometry:Lf,ConeBufferGeometry:Xe,CylinderGeometry:ne,CylinderBufferGeometry:ld,CircleGeometry:Mf,CircleBufferGeometry:Ye,BoxGeometry:Z,By:ta});Yc.prototype=Object.create(S.prototype);Yc.prototype.constructor=Yc;Yc.prototype.isShadowMaterial=!0;Yc.prototype.copy=function(c){S.prototype.copy.call(this,c);this.color.copy(c.color);return this};Hc.prototype=Object.create(ga.prototype);Hc.prototype.constructor=Hc;Hc.prototype.isRawShaderMaterial=!0;ec.prototype=Object.create(S.prototype);ec.prototype.constructor=ec;ec.prototype.isMeshStandardMaterial=!0;ec.prototype.copy=function(c){S.prototype.copy.call(this,c);this.defines={STANDARD:""};this.color.copy(c.color);this.roughness=c.roughness;this.metalness=c.metalness;this.map=c.map;this.lightMap=c.lightMap;this.lightMapIntensity=c.lightMapIntensity;this.aoMap=c.aoMap;this.aoMapIntensity=c.aoMapIntensity;this.emissive.copy(c.emissive);this.emissiveMap=c.emissiveMap;this.emissiveIntensity=c.emissiveIntensity;this.bumpMap=c.bumpMap;this.bumpScale=c.bumpScale;this.normalMap=c.normalMap;this.normalMapType=c.normalMapType;this.normalScale.copy(c.normalScale);this.displacementMap=c.displacementMap;this.displacementScale=c.displacementScale;this.displacementBias=c.displacementBias;this.roughnessMap=c.roughnessMap;this.metalnessMap=c.metalnessMap;this.alphaMap=c.alphaMap;this.envMap=c.envMap;this.envMapIntensity=c.envMapIntensity;this.refractionRatio=c.refractionRatio;this.wireframe=c.wireframe;this.wireframeLinewidth=c.wireframeLinewidth;this.wireframeLinecap=c.wireframeLinecap;this.wireframeLinejoin=c.wireframeLinejoin;this.skinning=c.skinning;this.morphTargets=c.morphTargets;this.morphNormals=c.morphNormals;return this};md.prototype=Object.create(ec.prototype);md.prototype.constructor=md;md.prototype.isMeshPhysicalMaterial=!0;md.prototype.copy=function(c){ec.prototype.copy.call(this,c);this.defines={PHYSICAL:""};this.reflectivity=c.reflectivity;this.clearCoat=c.clearCoat;this.clearCoatRoughness=c.clearCoatRoughness;return this};yc.prototype=Object.create(S.prototype);yc.prototype.constructor=yc;yc.prototype.isMeshPhongMaterial=!0;yc.prototype.copy=function(c){S.prototype.copy.call(this,c);this.color.copy(c.color);this.specular.copy(c.specular);this.shininess=c.shininess;this.map=c.map;this.lightMap=c.lightMap;this.lightMapIntensity=c.lightMapIntensity;this.aoMap=c.aoMap;this.aoMapIntensity=c.aoMapIntensity;this.emissive.copy(c.emissive);this.emissiveMap=c.emissiveMap;this.emissiveIntensity=c.emissiveIntensity;this.bumpMap=c.bumpMap;this.bumpScale=c.bumpScale;this.normalMap=c.normalMap;this.normalMapType=c.normalMapType;this.normalScale.copy(c.normalScale);this.displacementMap=c.displacementMap;this.displacementScale=c.displacementScale;this.displacementBias=c.displacementBias;this.specularMap=c.specularMap;this.alphaMap=c.alphaMap;this.envMap=c.envMap;this.combine=c.combine;this.reflectivity=c.reflectivity;this.refractionRatio=c.refractionRatio;this.wireframe=c.wireframe;this.wireframeLinewidth=c.wireframeLinewidth;this.wireframeLinecap=c.wireframeLinecap;this.wireframeLinejoin=c.wireframeLinejoin;this.skinning=c.skinning;this.morphTargets=c.morphTargets;this.morphNormals=c.morphNormals;return this};Ed.prototype=Object.create(yc.prototype);Ed.prototype.constructor=Ed;Ed.prototype.isMeshToonMaterial=!0;Ed.prototype.copy=function(c){yc.prototype.copy.call(this,c);this.gradientMap=c.gradientMap;return this};Fd.prototype=Object.create(S.prototype);Fd.prototype.constructor=Fd;Fd.prototype.isMeshNormalMaterial=!0;Fd.prototype.copy=function(c){S.prototype.copy.call(this,c);this.bumpMap=c.bumpMap;this.bumpScale=c.bumpScale;this.normalMap=c.normalMap;this.normalMapType=c.normalMapType;this.normalScale.copy(c.normalScale);this.displacementMap=c.displacementMap;this.displacementScale=c.displacementScale;this.displacementBias=c.displacementBias;this.wireframe=c.wireframe;this.wireframeLinewidth=c.wireframeLinewidth;this.skinning=c.skinning;this.morphTargets=c.morphTargets;this.morphNormals=c.morphNormals;return this};Gd.prototype=Object.create(S.prototype);Gd.prototype.constructor=Gd;Gd.prototype.isMeshLambertMaterial=!0;Gd.prototype.copy=function(c){S.prototype.copy.call(this,c);this.color.copy(c.color);this.map=c.map;this.lightMap=c.lightMap;this.lightMapIntensity=c.lightMapIntensity;this.aoMap=c.aoMap;this.aoMapIntensity=c.aoMapIntensity;this.emissive.copy(c.emissive);this.emissiveMap=c.emissiveMap;this.emissiveIntensity=c.emissiveIntensity;this.specularMap=c.specularMap;this.alphaMap=c.alphaMap;this.envMap=c.envMap;this.combine=c.combine;this.reflectivity=c.reflectivity;this.refractionRatio=c.refractionRatio;this.wireframe=c.wireframe;this.wireframeLinewidth=c.wireframeLinewidth;this.wireframeLinecap=c.wireframeLinecap;this.wireframeLinejoin=c.wireframeLinejoin;this.skinning=c.skinning;this.morphTargets=c.morphTargets;this.morphNormals=c.morphNormals;return this};Hd.prototype=Object.create(S.prototype);Hd.prototype.constructor=Hd;Hd.prototype.isMeshMatcapMaterial=!0;Hd.prototype.copy=function(c){S.prototype.copy.call(this,c);this.defines={MATCAP:""};this.color.copy(c.color);this.map=this.matcap=c.map;this.bumpMap=c.bumpMap;this.bumpScale=c.bumpScale;this.normalMap=c.normalMap;this.normalMapType=c.normalMapType;this.normalScale.copy(c.normalScale);this.displacementMap=c.displacementMap;this.displacementScale=c.displacementScale;this.displacementBias=c.displacementBias;this.alphaMap=c.alphaMap;this.skinning=c.skinning;this.morphTargets=c.morphTargets;this.morphNormals=c.morphNormals;return this};Id.prototype=Object.create(Da.prototype);Id.prototype.constructor=Id;Id.prototype.isLineDashedMaterial=!0;Id.prototype.copy=function(c){Da.prototype.copy.call(this,c);this.scale=c.scale;this.dashSize=c.dashSize;this.gapSize=c.gapSize;return this};var Qi=Object.freeze({ShadowMaterial:Yc,SpriteMaterial:Uc,RawShaderMaterial:Hc,ShaderMaterial:ga,PointsMaterial:vc,MeshPhysicalMaterial:md,MeshStandardMaterial:ec,MeshPhongMaterial:yc,MeshToonMaterial:Ed,MeshNormalMaterial:Fd,MeshLambertMaterial:Gd,MeshDepthMaterial:Bb,MeshDistanceMaterial:Ib,Mal:ha,MeshMatcapMaterial:Hd,LineDashedMaterial:Id,LineBasicMaterial:Da,Material:S}),sd={enabled:!1,files:{},add:function(c,a){!1!==this.enabled&&(this.files[c]=a)},get:function(c){if(!1!==this.enabled)return this.files[c]},remove:function(c){delete this.files[c]},clear:function(){this.files={}}},yb=new wg,Bc={};Object.assign(ob.prototype,{load:function(c,a,b,d){void 0===c&&(c="");void 0!==this.path&&(c=this.path+c);c=this.manager.resolveURL(c);var g=this,e=sd.get(c);if(void 0!==e)return g.manager.itemStart(c),setTimeout(function(){a&&a(e);g.manager.itemEnd(c)},0),e;if(void 0!==Bc[c])Bc[c].push({onLoad:a,onProgress:b,onError:d});else{var n=c.match(/^data:(.*?)(;base64)?,(.*)$/);if(n){b=n[1];var f=!!n[2],n=n[3],n=window.decodeURIComponent(n);f&&(n=window.atob(n));try{var h,k=(this.responseType||"").toLowerCase();switch(k){case "arraybuffer":case "blob":for(var t=new Uint8Array(n.length),f=0;fk)f=b+1;else if(0a&&(a=0);1Number.EPSILON&&(k.normalize(),g=Math.acos(Aa.clamp(b[p-1].dot(b[p]),-1,1)),d[p].applyMatrix4(l.makeRotationAxis(k,g))),f[p].crossVectors(b[p],d[p]);if(!0===a)for(g=Math.acos(Aa.clamp(d[0].dot(d[c]),-1,1)),g/=c,0e;)e+=b;for(;e>b;)e-=b;ef&&(f=1);1E-4>d&&(d=f);1E-4>m&&(m=f);Og.initNonuniformCatmullRom(k.x,l.x,p.x,b.x,d,f,m);Pg.initNonuniformCatmullRom(k.y,l.y,p.y,b.y,d,f,m);kf.initNonuniformCatmullRom(k.z,l.z,p.z,b.z,d,f,m)}else"catmullrom"===this.curveType&&(Og.initCatmullRom(k.x,l.x,p.x,b.x,this.tension),Pg.initCatmullRom(k.y,l.y,p.y,b.y,this.tension),kf.initCatmullRom(k.z,l.z,p.z,b.z,this.tension));g.set(Og.calc(e),Pg.calc(e),kf.calc(e));return g};Jb.prototype.copy=function(c){ra.prototype.copy.call(this,c);this.points=[];for(var a=0,b=c.points.length;ab.length-2?b.length-1:f+1],b=b[f>b.length-3?b.length-1:f+2];g.set(Gi(e,h.x,k.x,l.x,b.x),Gi(e,h.y,k.y,l.y,b.y));return g};gc.prototype.copy=function(c){ra.prototype.copy.call(this,c);this.points=[];for(var a=0,b=c.points.length;a=a)return a=b[c]-a,c=this.curves[c],b=c.getLength(),c.getPointAt(0===b?0:1-a/b);c++}return null},getLength:function(){var c=this.getCurveLengths();return c[c.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 c=[],a=0,b=0,d=this.curves.length;b=e)break a;else{f=a[1];c=e)break b}d=b;b=0}}for(;b>>1,ca;)--e;++e;if(0!==d||e!==b)d>=e&&(e=Math.max(e,1),d=e-1),b=this.getValueSize(),this.times=wb.arraySlice(g,d,e),this.values=wb.arraySlice(this.values,d*b,e*b);return this},validate:function(){var c=!0,a=this.getValueSize();0!==a-Math.floor(a)&&(console.error("GLE.KeyframeTrack: Invalid value size in track.",this),c=!1);var b=this.times,a=this.values,d=b.length;0===d&&(console.error("GLE.KeyframeTrack: Track is empty.",this),c=!1);for(var e=null,f=0;f!==d;f++){var h=b[f];if("number"===typeof h&&isNaN(h)){console.error("GLE.KeyframeTrack: Time is not a valid number.",this,f,h);c=!1;break}if(null!==e&&e>h){console.error("GLE.KeyframeTrack: Out of order keys.",this,f,h,e);c=!1;break}e=h}if(void 0!==a&&wb.isTypedArray(a))for(f=0,b=a.length;f!==b;++f)if(d=a[f],isNaN(d)){console.error("GLE.KeyframeTrack: Value is not a valid number.",this,f,d);c=!1;break}return c},optimize:function(){for(var c=this.times,a=this.values,b=this.getValueSize(),d=2302===this.getInterpolation(),e=1,f=c.length-1,h=1;hk.opacity&&(k.transparent=!0);d.setTextures(h);return d.parse(k)}}()});var Sd={decodeText:function(c){if("undefined"!==typeof TextDecoder)return(new TextDecoder).decode(c);for(var a="",b=0,d=c.length;bf;f++)v=x[l++],D=J[2*v],v=J[2*v+1],D=new d(D,v),2!==f&&g.faceVertexUvs[e][k].push(D),0!==f&&g.faceVertexUvs[e][k+1].push(D);z&&(z=3*x[l++],E.normal.set(A[z++],A[z++],A[z]),B.normal.copy(E.normal));if(w)for(e=0;4>e;e++)z=3*x[l++],w=new h(A[z++],A[z++],A[z]),2!==e&&E.vertexNormals.push(w),0!==e&&B.vertexNormals.push(w);m&&(m=x[l++],m=X[m],E.color.setHex(m),B.color.setHex(m));if(q)for(e=0;4>e;e++)m=x[l++],m=X[m],2!==e&&E.vertexColors.push(new u(m)),0!==e&&B.vertexColors.push(new u(m));g.faces.push(E);g.faces.push(B)}else{E=new C;E.a=x[l++];E.b=x[l++];E.c=x[l++];k&&(k=x[l++],E.materialIndex=k);k=g.faces.length;if(e)for(e=0;ef;f++)v=x[l++],D=J[2*v],v=J[2*v+1],D=new d(D,v),g.faceVertexUvs[e][k].push(D);z&&(z=3*x[l++],E.normal.set(A[z++],A[z++],A[z]));if(w)for(e=0;3>e;e++)z=3*x[l++],w=new h(A[z++],A[z++],A[z]),E.vertexNormals.push(w);m&&(m=x[l++],E.color.setHex(X[m]));if(q)for(e=0;3>e;e++)m=x[l++],E.vertexColors.push(new u(X[m]));g.faces.push(E)}b=c;l=void 0!==b.influencesPerVertex?b.influencesPerVertex:2;if(b.skinWeights)for(p=0,x=b.skinWeights.length;pNumber.EPSILON){if(0>h&&(f=a[e],k=-k,n=a[d],h=-h),!(c.yn.y))if(c.y===f.y){if(c.x===f.x)return!0}else{d=h*(c.x-f.x)-k*(c.y-f.y);if(0===d)return!0;0>d||(g=!g)}}else if(c.y===f.y&&(n.x<=c.x&&c.x<=f.x||f.x<=c.x&&c.x<=n.x))return!0}return g}var d=dc.isClockWise,e=this.subPaths;if(0===e.length)return[];if(!0===a)return b(e);var f,k,h,l=[];if(1===e.length)return k=e[0],h=new nd,h.curves=k.curves,l.push(h),l;var p=!d(e[0].getPoints()),p=c?!p:p;h=[];var m=[],z=[],u=0,q;m[u]=void 0;z[u]=[];for(var v=0,r=e.length;vd&&this._mixBufferRegion(b,c,3*a,1-d,a);for(var d=a,f=a+a;d!==f;++d)if(b[d]!==b[d+a]){e.setValue(b,c);break}},saveOriginalState:function(){var c=this.buffer,a=this.valueSize,b=3*a;this.binding.getValue(c,b);for(var d=a;d!==b;++d)c[d]=c[b+d%a];this.cumulativeWeight=0},restoreOriginalState:function(){this.binding.setValue(this.buffer,3*this.valueSize)},_select:function(c,a,b,d,e){if(.5<=d)for(d=0;d!==e;++d)c[a+d]=c[b+d]},_slerp:function(c,a,b,d){f.slerpFlat(c,a,c,a,c,b,d)},_lerp:function(c,a,b,d,e){for(var g=1-d,f=0;f!==e;++f){var n=a+f;c[n]=c[n]*g+c[b+f]*d}}});Object.assign(Vf.prototype,{getValue:function(c,a){this.bind();var b=this._bindings[this._targetGroup.nCachedObjects_];void 0!==b&&b.getValue(c,a)},setValue:function(c,a){for(var b=this._bindings,g=this._targetGroup.nCachedObjects_,d=b.length;g!==d;++g)b[g].setValue(c,a)},bind:function(){for(var c=this._bindings,a=this._targetGroup.nCachedObjects_,b=c.length;a!==b;++a)c[a].bind()},unbind:function(){for(var c=this._bindings,a=this._targetGroup.nCachedObjects_,b=c.length;a!==b;++a)c[a].unbind()}});Object.assign(Eb,{Composite:Vf,create:function(c,a,b){return c&&c.isAnimationObjectGroup?new Eb.Composite(c,a,b):new Eb(c,a,b)},sanitizeNodeName:function(){var c=RegExp("[\\[\\]\\.:\\/]","g");return function(a){return a.replace(/\s/g,"_").replace(c,"")}}(),parseTrackName:function(){var c="[^"+"\\[\\]\\.:\\/".replace("\\.","")+"]",a=/((?:WC+[\/:])*)/.source.replace("WC","[^\\[\\]\\.:\\/]"),c=/(WCOD+)?/.source.replace("WCOD",c),b=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC","[^\\[\\]\\.:\\/]"),d=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC","[^\\[\\]\\.:\\/]"),e=new RegExp("^"+a+c+b+d+"$"),f=["material","materials","bones"];return function(c){var a=e.exec(c);if(!a)throw Error("PropertyBinding: Cannot parse trackName: "+c);var a={nodeName:a[2],objectName:a[3],objectIndex:a[4],propertyName:a[5],propertyIndex:a[6]},b=a.nodeName&&a.nodeName.lastIndexOf(".");if(void 0!==b&&-1!==b){var g=a.nodeName.substring(b+1);-1!==f.indexOf(g)&&(a.nodeName=a.nodeName.substring(0,b),a.objectName=g)}if(null===a.propertyName||0===a.propertyName.length)throw Error("PropertyBinding: can not parse propertyName from trackName: "+c);return a}}(),findNode:function(c,a){if(!a||""===a||"root"===a||"."===a||-1===a||a===c.name||a===c.uuid)return c;if(c.skeleton){var b=c.skeleton.getBoneByName(a);if(void 0!==b)return b}if(c.children){var g=function(c){for(var b=0;b=a){var m=a++,z=c[m];b[z.uuid]=p;c[p]=z;b[l]=m;c[m]=h;h=0;for(l=e;h!==l;++h){var z=d[h],u=z[p];z[p]=z[m];z[m]=u}}}this.nCachedObjects_=a},uncache:function(){for(var c=this._objects,a=c.length,b=this.nCachedObjects_,d=this._indicesByUUID,e=this._bindings,f=e.length,k=0,h=arguments.length;k!==h;++k){var l=arguments[k].uuid,p=d[l];if(void 0!==p)if(delete d[l],pa||0===b)return;this._startTime=null;a*=b}a*=this._updateTimeScale(c);b=this._updateTime(a);c=this._updateWeight(c);if(0b.parameterPositions[1]&&(this.stopFading(),0===d&&(this.enabled=!1))}}return this._effectiveWeight=a},_updateTimeScale:function(c){var a=0;if(!this.paused){var a=this.timeScale,b=this._timeScaleInterpolant;if(null!==b){var d=b.evaluate(c)[0],a=a*d;c>b.parameterPositions[1]&&(this.stopWarping(),0===a?this.paused=!0:this.timeScale=a)}}return this._effectiveTimeScale=a},_updateTime:function(c){var a=this.time+c,b=this._clip.duration,d=this.loop,e=this._loopCount,f=2202===d;if(0===c)return-1===e?a:f&&1===(e&1)?b-a:a;if(2200===d)a:{if(-1===e&&(this._loopCount=0,this._setEndings(!0,!0,!1)),a>=b)a=b;else if(0>a)a=0;else break a;this.clampWhenFinished?this.paused=!0:this.enabled=!1;this._mixer.dispatchEvent({type:"finished",action:this,direction:0>c?-1:1})}else{-1===e&&(0<=c?(e=0,this._setEndings(!0,0===this.repetitions,f)):this._setEndings(0===this.repetitions,!0,f));if(a>=b||0>a){var d=Math.floor(a/b),a=a-b*d,e=e+Math.abs(d),k=this.repetitions-e;0>=k?(this.clampWhenFinished?this.paused=!0:this.enabled=!1,a=0c,this._setEndings(c,!c,f)):this._setEndings(!1,!1,f),this._loopCount=e,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:d}))}if(f&&1===(e&1))return this.time=a,b-a}return this.time=a},_setEndings:function(c,a,b){var g=this._interpolantSettings;b?(g.endingStart=2401,g.endingEnd=2401):(g.endingStart=c?this.zeroSlopeAtStart?2401:2400:2402,g.endingEnd=a?this.zeroSlopeAtEnd?2401:2400:2402)},_scheduleFading:function(c,a,b){var g=this._mixer,d=g.time,e=this._weightInterpolant;null===e&&(this._weightInterpolant=e=g._lendControlInterpolant());g=e.parameterPositions;e=e.sampleValues;g[0]=d;e[0]=a;g[1]=d+c;e[1]=b;return this}});Jg.prototype=Object.assign(Object.create(b.prototype),{constructor:Jg,_bindAction:function(c,a){var b=c._localRoot||this._root,g=c._clip.tracks,d=g.length,e=c._propertyBindings,f=c._interpolants,k=b.uuid,h=this._bindingsByRootAndName,l=h[k];void 0===l&&(l={},h[k]=l);for(h=0;h!==d;++h){var p=g[h],m=p.name,z=l[m];if(void 0===z){z=e[h];if(void 0!==z){null===z._cacheIndex&&(++z.referenceCount,this._addInactiveBinding(z,k,m));continue}z=new Md(Eb.create(b,m,a&&a._propertyBindings[h].binding.parsedPath),p.ValueTypeName,p.getValueSize());++z.referenceCount;this._addInactiveBinding(z,k,m)}e[h]=z;f[h].resultBuffer=z.buffer}},_activateAction:function(c){if(!this._isActiveAction(c)){if(null===c._cacheIndex){var a=(c._localRoot||this._root).uuid,b=c._clip.uuid,d=this._actionsByClip[b];this._bindAction(c,d&&d.knownActions[0]);this._addInactiveAction(c,b,a)}a=c._propertyBindings;b=0;for(d=a.length;b!==d;++b){var e=a[b];0===e.useCount++&&(this._lendBinding(e),e.saveOriginalState())}this._lendAction(c)}},_deactivateAction:function(c){if(this._isActiveAction(c)){for(var a=c._propertyBindings,b=0,d=a.length;b!==d;++b){var e=a[b];0===--e.useCount&&(e.restoreOriginalState(),this._takeBackBinding(e))}this._takeBackAction(c)}},_initMemoryManager:function(){this._actions=[];this._nActiveActions=0;this._actionsByClip={};this._bindings=[];this._nActiveBindings=0;this._bindingsByRootAndName={};this._controlInterpolants=[];this._nActiveControlInterpolants=0;var c=this;this.stats={actions:{get total(){return c._actions.length},get inUse(){return c._nActiveActions}},bindings:{get total(){return c._bindings.length},get inUse(){return c._nActiveBindings}},controlInterpolants:{get total(){return c._controlInterpolants.length},get inUse(){return c._nActiveControlInterpolants}}}},_isActiveAction:function(c){c=c._cacheIndex;return null!==c&&cthis.max.x||c.ythis.max.y?!1:!0},containsBox:function(c){return this.min.x<=c.min.x&&c.max.x<=this.max.x&&this.min.y<=c.min.y&&c.max.y<=this.max.y},getParameter:function(c,a){void 0===a&&(console.warn("GLE.Box2: .getParameter() target is now required"),a=new d);return a.set((c.x-this.min.x)/(this.max.x-this.min.x),(c.y-this.min.y)/(this.max.y-this.min.y))},intersectsBox:function(c){return c.max.xthis.max.x||c.max.ythis.max.y?!1:!0},clampPoint:function(c,a){void 0===a&&(console.warn("GLE.Box2: .clampPoint() target is now required"),a=new d);return a.copy(c).clamp(this.min,this.max)},distanceToPoint:function(){var c=new d;return function(a){return c.copy(a).clamp(this.min,this.max).sub(a).length()}}(),intersect:function(c){this.min.max(c.min);this.max.min(c.max);return this},union:function(c){this.min.min(c.min);this.max.max(c.max);return this},translate:function(c){this.min.add(c);this.max.add(c);return this},equals:function(c){return c.min.equals(this.min)&&c.max.equals(this.max)}});Object.assign(Eh.prototype,{set:function(c,a){this.start.copy(c);this.end.copy(a);return this},clone:function(){return(new this.constructor).copy(this)},copy:function(c){this.start.copy(c.start);this.end.copy(c.end);return this},getCenter:function(c){void 0===c&&(console.warn("GLE.Line3: .getCenter() target is now required"),c=new h);return c.addVectors(this.start,this.end).multiplyScalar(.5)},delta:function(c){void 0===c&&(console.warn("GLE.Line3: .delta() target is now required"),c=new h);return c.subVectors(this.end,this.start)},distanceSq:function(){return this.start.distanceToSquared(this.end)},distance:function(){return this.start.distanceTo(this.end)},at:function(c,a){void 0===a&&(console.warn("GLE.Line3: .at() target is now required"),a=new h);return this.delta(a).multiplyScalar(c).add(this.start)},closestPointToPointParameter:function(){var c=new h,a=new h;return function(b,g){c.subVectors(b,this.start);a.subVectors(this.end,this.start);var d=a.dot(a),d=a.dot(c)/d;g&&(d=Aa.clamp(d,0,1));return d}}(),closestPointToPoint:function(c,a,b){c=this.closestPointToPointParameter(c,a);void 0===b&&(console.warn("GLE.Line3: .closestPointToPoint() target is now required"),b=new h);return this.delta(b).multiplyScalar(c).add(this.start)},applyMatrix4:function(c){this.start.applyMatrix4(c);this.end.applyMatrix4(c);return this},equals:function(c){return c.start.equals(this.start)&&c.end.equals(this.end)}});ef.prototype=Object.create(F.prototype);ef.prototype.constructor=ef;ef.prototype.isImmediateRenderObject=!0;Xf.prototype=Object.create(Ha.prototype);Xf.prototype.constructor=Xf;Xf.prototype.update=function(){var c=new h,a=new h,b=new l;return function(){var g=["a","b","c"];this.object.uld(!0);b.getNormalMatrix(this.object.matrixWorld);var d=this.object.matrixWorld,e=this.geometry.attributes.position,f=this.object.geometry;if(f&&f.isGeometry)for(var k=f.vertices,h=f.faces,n=f=0,l=h.length;nMath.abs(a)&&(a=1E-8);this.scale.set(.5*this.size,.5*this.size,a);this.children[0].material.side=0>a?1:0;this.lookAt(this.plane.normal);F.prototype.uld.call(this,c)};var Qd,Fh;Pd.prototype=Object.create(F.prototype);Pd.prototype.constructor=Pd;Pd.prototype.setDirection=function(){var c=new h,a;return function(b){.99999b.y?this.quaternion.set(1,0,0,0):(c.set(b.z,0,-b.x).normalize(),a=Math.acos(b.y),this.quaternion.setFromAxisAngle(c,a))}}();Pd.prototype.setLength=function(c,a,b){void 0===a&&(a=.2*c);void 0===b&&(b=.2*a);this.line.scale.set(1,Math.max(0,c-a),1);this.line.updateMatrix();this.cone.scale.set(b,a,b);this.cone.position.y=c;this.cone.updateMatrix()};Pd.prototype.setColor=function(c){this.line.material.color.copy(c);this.cone.material.color.copy(c)};jf.prototype=Object.create(Ha.prototype);jf.prototype.constructor=jf;ra.create=function(c,a){console.log("GLE.Curve.create() has been deprecated");c.prototype=Object.create(ra.prototype);c.prototype.constructor=c;c.prototype.getPoint=a;return c};Object.assign(Ic.prototype,{createPointsGeometry:function(c){console.warn("GLE.CurvePath: .createPointsGeometry() has been removed. Use new GLE.Geometry().setFromPoints( points ) instead.");c=this.getPoints(c);return this.createGeometry(c)},createSpacedPointsGeometry:function(c){console.warn("GLE.CurvePath: .createSpacedPointsGeometry() has been removed. Use new GLE.Geometry().setFromPoints( points ) instead.");c=this.getSpacedPoints(c);return this.createGeometry(c)},createGeometry:function(c){console.warn("GLE.CurvePath: .createGeometry() has been removed. Use new GLE.Geometry().setFromPoints( points ) instead.");for(var a=new L,b=0,d=c.length;b=v-1E-7&&0<=a?(this._totalTime=v,this._cycle=this._repeat,this._yoyo&&0!==(1&this._cycle)?(this._time=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0):(this._time=x,this.ratio=this._ease._calcEnd?this._ease.getRatio(1):1),this._reversed||(e=!0,f="onComplete",d=d||this._timeline.autoRemoveChildren),0===x&&(this._initted||!this.vars.lazy||d)&&(this._startTime===this._timeline._duration&&(a=0),(0>G||0>=a&&-1E-7<=a||1E-10===G&&"isPause"!==this.data)&&G!==a&&(d=!0,1E-10a?(this._totalTime=this._time=this._cycle=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0,(0!==w||0===x&&0a&&(this._active=!1,0===x&&(this._initted||!this.vars.lazy||d)&&(0<=G&&(d=!0),this._rawPrevTime=q=!b||a||G===a?a:1E-10)),this._initted||(d=!0)):(this._totalTime=this._time=a,0!==this._repeat&&(k=x+this._repeatDelay,this._cycle=this._totalTime/k>>0,0!==this._cycle&&this._cycle===this._totalTime/k&&a>=w&&this._cycle--,this._time=this._totalTime-this._cycle*k,this._yoyo&&0!==(1&this._cycle)&&(this._time=x-this._time),this._time>x?this._time=x:0>this._time&&(this._time=0)),this._easeType?(h=this._time/x,m=this._easeType,u=this._easePower,(1===m||3===m&&.5<=h)&&(h=1-h),3===m&&(h*=2),1===u?h*=h:2===u?h*=h*h:3===u?h*=h*h*h:4===u&&(h*=h*h*h*h),1===m?this.ratio=1-h:2===m?this.ratio=h:.5>this._time/x?this.ratio=h/2:this.ratio=1-h/2):this.ratio=this._ease.getRatio(this._time/x)),r===this._time&&!d&&B===this._cycle)return void(w!==this._totalTime&&this._onUpdate&&(b||this._callback("onUpdate")));if(!this._initted){if(this._init(),!this._initted||this._gc)return;if(!d&&this._firstPT&&(!1!==this.vars.lazy&&this._duration||this.vars.lazy&&!this._duration))return this._time=r,this._totalTime=w,this._rawPrevTime=G,this._cycle=B,l.lazyTns.push(this),void(this._lazy=[a,b]);this._time&&!e?this.ratio=this._ease.getRatio(this._time/x):e&&this._ease._calcEnd&&(this.ratio=this._ease.getRatio(0===this._time?0:1))}!1!==this._lazy&&(this._lazy=!1);this._active||!this._paused&&this._time!==r&&0<=a&&(this._active=!0);0!==w||(2===this._initted&&0a&&this._startAt&&this._startTime&&this._startAt.render(a,b,d),b||(this._totalTime!==w||f)&&this._callback("onUpdate"));this._cycle!==B&&(b||this._gc||this.vars.onRepeat&&this._callback("onRepeat"));f&&(!this._gc||d)&&(0>a&&this._startAt&&!this._onUpdate&&this._startTime&&this._startAt.render(a,b,d),e&&(this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!b&&this.vars[f]&&this._callback(f),0===x&&1E-10===this._rawPrevTime&&1E-10!==q&&(this._rawPrevTime=0))};h.to=function(a,b,d){return new h(a,b,d)};h.from=function(a,b,d){return d.runBackwards=!0,d.immediateRender=0!=d.immediateRender,new h(a,b,d)};h.fromTo=function(a,b,d,e){return e.startAt=d,e.immediateRender=0!=e.immediateRender&&0!=d.immediateRender,new h(a,b,e)};h.staggerTo=h.allTo=function(a,b,l,p,q,C,w){p=p||0;var k,u,v,E,B=0,D=[],G=function(){l.onComplete&&l.onComplete.apply(l.onCompleteScope||this,arguments);q.apply(w||l.callbackScope||this,C||x)},W=l.cycle,V=l.startAt&&l.startAt.cycle;r(a)||("string"==typeof a&&(a=d.selector(a)||a),m(a)&&(a=e(a)));a=a||[];0>p&&(a=e(a),a.reverse(),p*=-1);k=a.length-1;for(v=0;k>=v;v++){u={};for(E in l)u[E]=l[E];if(W&&(f(u,a,v),null!=u.duration&&(b=u.duration,delete u.duration)),V){V=u.startAt={};for(E in l.startAt)V[E]=l.startAt[E];f(u.startAt,a,v)}u.delay=B+(u.delay||0);v===k&&q&&(u.onComplete=G);D[v]=new h(a[v],b,u);B+=p}return D};h.staggerFrom=h.allFrom=function(a,b,d,e,f,l,m){return d.runBackwards=!0,d.immediateRender=0!=d.immediateRender,h.staggerTo(a,b,d,e,f,l,m)};h.staggerFromTo=h.allFromTo=function(a,b,d,e,f,l,m,q){return e.startAt=d,e.immediateRender=0!=e.immediateRender&&0!=d.immediateRender,h.staggerTo(a,b,e,f,l,m,q)};h.delayedCall=function(a,b,d,e,f){return new h(b,0,{delay:a,onComplete:b,onCompleteParams:d,callbackScope:e,onReverseComplete:b,onReverseCompleteParams:d,immediateRender:!1,useFrames:f,overwrite:0})};h.set=function(a,b){return new h(a,0,b)};h.isTning=function(a){return 0h;h++)f=l[h],(m||f instanceof b||(k=f.target===f.vars.onComplete)&&e||d&&!k)&&(a?f.totalTime(f._reversed?0:f.totalDuration()):f._enabled(!1,!1))};h.killChildTnsOf=function(a,b){if(null!=a){var f,k,q,v=l.tnLookup;if("string"==typeof a&&(a=d.selector(a)||a),m(a)&&(a=e(a)),r(a))for(k=a.length;-1<--k;)h.killChildTnsOf(a[k],b);else{f=[];for(q in v)for(k=v[q].target.parentNode;k;)k===a&&(f=f.concat(v[q].tns)),k=k.parentNode;q=f.length;for(k=0;q>k;k++)b&&f[k].totalTime(f[k].totalDuration()),f[k]._enabled(!1,!1)}}};var w=function(a,d,e,f){d=!1!==d;e=!1!==e;f=!1!==f;for(var k,h=B(f),l=d&&e&&f,p=h.length;-1<--p;)f=h[p],(l||f instanceof b||(k=f.target===f.vars.onComplete)&&e||d&&!k)&&f.paused(a)};return h.pauseAll=function(a,b,d){w(!0,a,b,d)},h.resumeAll=function(a,b,d){w(!1,a,b,d)},h.globalTimeScale=function(b){var e=a._rootTimeline,f=d.ticker.time;return arguments.length?(b=b||1E-10,e._startTime=f-(f-e._startTime)*e._timeScale/b,e=a._rootFramesTimeline,f=d.ticker.frame,e._startTime=f-(f-e._startTime)*e._timeScale/b,e._timeScale=a._rootTimeline._timeScale=b,b):e._timeScale},q.progress=function(a,b){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&0!==(1&this._cycle)?1-a:a)+this._cycle*(this._duration+this._repeatDelay),b):this._time/this.duration()},q.totalProgress=function(a,b){return arguments.length?this.totalTime(this.totalDuration()*a,b):this._totalTime/this.totalDuration()},q.time=function(a,b){return arguments.length?(this._dirty&&this.totalDuration(),a>this._duration&&(a=this._duration),this._yoyo&&0!==(1&this._cycle)?a=this._duration-a+this._cycle*(this._duration+this._repeatDelay):0!==this._repeat&&(a+=this._cycle*(this._duration+this._repeatDelay)),this.totalTime(a,b)):this._time},q.duration=function(b){return arguments.length?a.prototype.duration.call(this,b):this._duration},q.totalDuration=function(a){return arguments.length?-1===this._repeat?this:this.duration((a-this._repeat*this._repeatDelay)/(this._repeat+1)):(this._dirty&&(this._totalDuration=-1===this._repeat?999999999999:this._duration*(this._repeat+1)+this._repeatDelay*this._repeat,this._dirty=!1),this._totalDuration)},q.repeat=function(a){return arguments.length?(this._repeat=a,this._uncache(!0)):this._repeat},q.repeatDelay=function(a){return arguments.length?(this._repeatDelay=a,this._uncache(!0)):this._repeatDelay},q.yoyo=function(a){return arguments.length?(this._yoyo=a,this):this._yoyo},h},!0);_gsScope._gsDefine("TimelineLite",["core.Animation","core.SimpleTimeline","TnLite"],function(a,b,d){var e=function(a){b.call(this,a);this._labels={};this.autoRemoveChildren=!0===this.vars.autoRemoveChildren;this.smoothChildTiming=!0===this.vars.smoothChildTiming;this._sortChildren=!0;this._onUpdate=this.vars.onUpdate;var d,e=this.vars;for(d in e)a=e[d],m(a)&&-1!==a.join("").indexOf("{self}")&&(e[d]=this._swapSelfInParams(a));m(e.tns)&&this.add(e.tns,0,e.align,e.stagger)},f=d._internals,h=e._internals={},l=f.isSelector,m=f.isArray,r=f.lazyTns,q=f.lazyRender,x=_gsScope._gsDefine.globals,G=function(a){var b,d={};for(b in a)d[b]=a[b];return d},B=function(a,b,d){var e,f,k=a.cycle;for(e in k)f=k[e],a[e]="function"==typeof f?f(d,b[d]):f[d%f.length];delete a.cycle},w=h.pauseCallback=function(){},v=function(a){var b,d=[],e=a.length;for(b=0;b!==e;d.push(a[b++]));return d},f=e.prototype=new b;return e.version="1.19.1",f.constructor=e,f.kill()._gc=f._forcingPlayhead=f._hasPause=!1,f.to=function(a,b,e,f){var k=e.repeat&&x.TnMax||d;return b?this.add(new k(a,b,e),f):this.set(a,e,f)},f.from=function(a,b,e,f){return this.add((e.repeat&&x.TnMax||d).from(a,b,e),f)},f.fromTo=function(a,b,e,f,h){var k=f.repeat&&x.TnMax||d;return b?this.add(k.fromTo(a,b,e,f),h):this.set(a,f,h)},f.staggerTo=function(a,b,f,h,m,q,r,w){w=new e({onComplete:q,onCompleteParams:r,callbackScope:w,smoothChildTiming:this.smoothChildTiming});var k=f.cycle;"string"==typeof a&&(a=d.selector(a)||a);a=a||[];l(a)&&(a=v(a));h=h||0;0>h&&(a=v(a),a.reverse(),h*=-1);for(r=0;rp;p++)m(u=f[p])&&(u=new e({tns:u})),this.add(u,h),"string"!=typeof u&&"function"!=typeof u&&("sequence"===l?h=u._startTime+u.totalDuration()/u._timeScale:"start"===l&&(u._startTime-=u.delay())),h+=q;return this._uncache(!0)}if("string"==typeof f)return this.addLabel(f,h);if("function"!=typeof f)throw"Cannot add "+f+" into the timeline; it is not a tn, timeline, function, or string.";f=d.delayedCall(0,f)}if(b.prototype.add.call(this,f,h),(this._gc||this._time===this._duration)&&!this._paused&&this._durationf._startTime;l._timeline;)f&&l._timeline.smoothChildTiming?l.totalTime(l._totalTime,!0):l._gc&&l._enabled(!0,!1),l=l._timeline;return this},f.remove=function(b){if(b instanceof a){this._remove(b,!1);var d=b._timeline=b.vars.useFrames?a._rootFramesTimeline:a._rootTimeline;return b._startTime=(b._paused?b._pauseTime:d._time)-(b._reversed?b.totalDuration()-b._totalTime:b._totalTime)/b._timeScale,this}if(b instanceof Array||b&&b.push&&m(b)){for(d=b.length;-1<--d;)this.remove(b[d]);return this}return"string"==typeof b?this.removeLabel(b):this.kill(null,b)},f._remove=function(a,d){b.prototype._remove.call(this,a,d);return this._last?this._time>this.duration()&&(this._time=this._duration,this._totalTime=this._totalDuration):this._time=this._totalTime=this._duration=this._totalDuration=0,this},f.append=function(a,b){return this.add(a,this._parseTimeOrLabel(null,b,!0,a))},f.insert=f.insertMultiple=function(a,b,d,e){return this.add(a,b||0,d,e)},f.appendMultiple=function(a,b,d,e){return this.add(a,this._parseTimeOrLabel(null,b,!0,a),d,e)},f.addLabel=function(a,b){return this._labels[a]=this._parseTimeOrLabel(b),this},f.addPause=function(a,b,e,f){e=d.delayedCall(0,w,e,f||this);return e.vars.onComplete=e.vars.onReverseComplete=b,e.data="isPause",this._hasPause=!0,this.add(e,a)},f.removeLabel=function(a){return delete this._labels[a],this},f.getLabelTime=function(a){return null!=this._labels[a]?this._labels[a]:-1},f._parseTimeOrLabel=function(b,d,e,f){var h;if(f instanceof a&&f.timeline===this)this.remove(f);else if(f&&(f instanceof Array||f.push&&m(f)))for(h=f.length;-1<--h;)f[h]instanceof a&&f[h].timeline===this&&this.remove(f[h]);if("string"==typeof d)return this._parseTimeOrLabel(d,e&&"number"==typeof b&&null==this._labels[d]?b-this.duration():0,e);if(d=d||0,"string"!=typeof b||!isNaN(b)&&null==this._labels[b])null==b&&(b=this.duration());else{if(h=b.indexOf("\x3d"),-1===h)return null==this._labels[b]?e?this._labels[b]=this.duration()+d:d:this._labels[b]+d;d=parseInt(b.charAt(h-1)+"1",10)*Number(b.substr(h+1));b=1=u-1E-7&&0<=a)this._totalTime=this._time=u,this._reversed||this._hasPausedChild()||(f=!0,k="onComplete",l=!!this._timeline.autoRemoveChildren,0===this._duration&&(0>=a&&-1E-7<=a||0>this._rawPrevTime||1E-10===this._rawPrevTime)&&this._rawPrevTime!==a&&this._first&&(l=!0,1E-10a)if(this._totalTime=this._time=0,(0!==v||0===this._duration&&1E-10!==this._rawPrevTime&&(0a&&0<=this._rawPrevTime))&&(k="onReverseComplete",f=this._reversed),0>a)this._active=!1,this._timeline.autoRemoveChildren&&this._reversed?(l=f=!0,k="onReverseComplete"):0<=this._rawPrevTime&&this._first&&(l=!0),this._rawPrevTime=a;else{if(this._rawPrevTime=this._duration||!b||a||this._rawPrevTime===a?a:1E-10,0===a&&f)for(e=this._first;e&&0===e._startTime;)e._duration||(f=!1),e=e._next;a=0;this._initted||(l=!0)}else{if(this._hasPause&&!this._forcingPlayhead&&!b){if(a>=v)for(e=this._first;e&&e._startTime<=a&&!m;)e._duration||"isPause"!==e.data||e.ratio||0===e._startTime&&0===this._rawPrevTime||(m=e),e=e._next;else for(e=this._last;e&&e._startTime>=a&&!m;)e._duration||"isPause"===e.data&&0=v)for(e=this._first;e&&(h=e._next,p===this._time&&(!this._paused||x));)(e._active||e._startTime<=p&&!e._paused&&!e._gc)&&(m===e&&this.pause(),e._reversed?e.render((e._dirty?e.totalDuration():e._totalDuration)-(a-e._startTime)*e._timeScale,b,d):e.render((a-e._startTime)*e._timeScale,b,d)),e=h;else for(e=this._last;e&&(h=e._prev,p===this._time&&(!this._paused||x));){if(e._active||e._startTime<=v&&!e._paused&&!e._gc){if(m===e){for(m=e._prev;m&&m.endTime()>this._time;)m.render(m._reversed?m.totalDuration()-(a-m._startTime)*m._timeScale:(a-m._startTime)*m._timeScale,b,d),m=m._prev;m=null;this.pause()}e._reversed?e.render((e._dirty?e.totalDuration():e._totalDuration)-(a-e._startTime)*e._timeScale,b,d):e.render((a-e._startTime)*e._timeScale,b,d)}e=h}this._onUpdate&&(b||(r.length&&q(),this._callback("onUpdate")));k&&(this._gc||(w===this._startTime||B!==this._timeScale)&&(0===this._time||u>=this.totalDuration())&&(f&&(r.length&&q(),this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!b&&this.vars[k]&&this._callback(k)))}},f._hasPausedChild=function(){for(var a=this._first;a;){if(a._paused||a instanceof e&&a._hasPausedChild())return!0;a=a._next}return!1},f.getChildren=function(a,b,e,f){f=f||-9999999999;for(var h=[],k=this._first,l=0;k;)k._startTime=d&&(f._startTime+=a),f=f._next;if(b)for(e in h)h[e]>=d&&(h[e]+=a);return this._uncache(!0)},f._kill=function(a,b){if(!a&&!b)return this._enabled(!1,!1);for(var d=b?this.getTnsOf(b):this.getChildren(!0,!0,!1),e=d.length,f=!1;-1<--e;)d[e]._kill(a,b)&&(f=!0);return f},f.clear=function(a){var b=this.getChildren(!1,!0,!0),d=b.length;for(this._time=this._totalTime=0;-1<--d;)b[d]._enabled(!1,!1);return!1!==a&&(this._labels={}),this._uncache(!0)},f.invalidate=function(){for(var b=this._first;b;)b.invalidate(),b=b._next;return a.prototype.invalidate.call(this)},f._enabled=function(a,d){if(a===this._gc)for(var e=this._first;e;)e._enabled(a,!0),e=e._next;return b.prototype._enabled.call(this,a,d)},f.totalTime=function(b,d,e){this._forcingPlayhead=!0;var f=a.prototype.totalTime.apply(this,arguments);return this._forcingPlayhead=!1,f},f.duration=function(a){return arguments.length?(0!==this.duration()&&0!==a&&this.timeScale(this._duration/a),this):(this._dirty&&this.totalDuration(),this._duration)},f.totalDuration=function(a){if(!arguments.length){if(this._dirty){var b,d,e=0;d=this._last;for(var f=999999999999;d;)b=d._prev,d._dirty&&d.totalDuration(),d._startTime>f&&this._sortChildren&&!d._paused?this.add(d,d._startTime-d._delay):f=d._startTime,0>d._startTime&&!d._paused&&(e-=d._startTime,this._timeline.smoothChildTiming&&(this._startTime+=d._startTime/this._timeScale),this.shiftChildren(-d._startTime,!1,-9999999999),f=0),d=d._startTime+d._totalDuration/d._timeScale,d>e&&(e=d),d=b;this._duration=this._totalDuration=e;this._dirty=!1}return this._totalDuration}return a&&this.totalDuration()?this.timeScale(this._totalDuration/a):this},f.paused=function(b){if(!b)for(var d=this._first,e=this._time;d;)d._startTime===e&&"isPause"===d.data&&(d._rawPrevTime=0),d=d._next;return a.prototype.paused.apply(this,arguments)},f.usesFrames=function(){for(var b=this._timeline;b._timeline;)b=b._timeline;return b===a._rootFramesTimeline},f.rawTime=function(a){return a&&(this._paused||this._repeat&&0this.totalProgress())?this._totalTime%(this._duration+this._repeatDelay):this._paused?this._totalTime:(this._timeline.rawTime(a)-this._startTime)*this._timeScale},e},!0);_gsScope._gsDefine("TimelineMax",["TimelineLite","TnLite","easing.Ease"],function(a,b,d){var e=function(b){a.call(this,b);this._repeat=this.vars.repeat||0;this._repeatDelay=this.vars.repeatDelay||0;this._cycle=0;this._yoyo=!0===this.vars.yoyo;this._dirty=!0},f=b._internals,h=f.lazyTns,l=f.lazyRender,m=_gsScope._gsDefine.globals,r=new d(null,null,1,0);d=e.prototype=new a;return d.constructor=e,d.kill()._gc=!1,e.version="1.19.1",d.invalidate=function(){return this._yoyo=!0===this.vars.yoyo,this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._uncache(!0),a.prototype.invalidate.call(this)},d.addCallback=function(a,d,e,f){return this.add(b.delayedCall(0,a,e,f),d)},d.removeCallback=function(a,b){if(a)if(null==b)this._kill(null,a);else for(var d=this.getTnsOf(a,!1),e=d.length,f=this._parseTimeOrLabel(b);-1<--e;)d[e]._startTime===f&&d[e]._enabled(!1,!1);return this},d.removePause=function(b){return this.removeCallback(a._internals.pauseCallback,b)},d.tnTo=function(a,d){d=d||{};var e,f,h,l={ease:r,useFrames:this.usesFrames(),immediateRender:!1},k=d.repeat&&m.TnMax||b;for(f in d)l[f]=d[f];return l.time=this._parseTimeOrLabel(a),e=Math.abs(Number(l.time)-this._time)/this._timeScale||.001,h=new k(this,e,l),l.onStart=function(){h.target.paused(!0);h.vars.time!==h.target.time()&&e===h.duration()&&h.duration(Math.abs(h.vars.time-h.target.time())/h.target._timeScale);d.onStart&&d.onStart.apply(d.onStartScope||d.callbackScope||h,d.onStartParams||[])},h},d.tnFromTo=function(a,b,d){d=d||{};a=this._parseTimeOrLabel(a);d.startAt={onComplete:this.seek,onCompleteParams:[a],callbackScope:this};d.immediateRender=!1!==d.immediateRender;b=this.tnTo(b,d);return b.duration(Math.abs(b.vars.time-a)/this._timeScale||.001)},d.render=function(a,b,d){this._gc&&this._enabled(!0,!1);var e,f,m,k,u,p,q,r=this._dirty?this.totalDuration():this._totalDuration,x=this._duration,G=this._time,F=this._totalTime,L=this._startTime,A=this._timeScale,H=this._rawPrevTime,D=this._paused,M=this._cycle;if(a>=r-1E-7&&0<=a)this._locked||(this._totalTime=r,this._cycle=this._repeat),this._reversed||this._hasPausedChild()||(f=!0,k="onComplete",u=!!this._timeline.autoRemoveChildren,0===this._duration&&(0>=a&&-1E-7<=a||0>H||1E-10===H)&&H!==a&&this._first&&(u=!0,1E-10a)if(this._locked||(this._totalTime=this._cycle=0),this._time=0,(0!==G||0===x&&1E-10!==H&&(0a&&0<=H)&&!this._locked)&&(k="onReverseComplete",f=this._reversed),0>a)this._active=!1,this._timeline.autoRemoveChildren&&this._reversed?(u=f=!0,k="onReverseComplete"):0<=H&&this._first&&(u=!0),this._rawPrevTime=a;else{if(this._rawPrevTime=x||!b||a||this._rawPrevTime===a?a:1E-10,0===a&&f)for(e=this._first;e&&0===e._startTime;)e._duration||(f=!1),e=e._next;a=0;this._initted||(u=!0)}else if(0===x&&0>H&&(u=!0),this._time=this._rawPrevTime=a,this._locked||(this._totalTime=a,0!==this._repeat&&(e=x+this._repeatDelay,this._cycle=this._totalTime/e>>0,0!==this._cycle&&this._cycle===this._totalTime/e&&a>=F&&this._cycle--,this._time=this._totalTime-this._cycle*e,this._yoyo&&0!==(1&this._cycle)&&(this._time=x-this._time),this._time>x?(this._time=x,a=x+1E-4):0>this._time?this._time=a=0:a=this._time)),this._hasPause&&!this._forcingPlayhead&&!b&&x>a){if(a=this._time,a>=G||this._repeat&&M!==this._cycle)for(e=this._first;e&&e._startTime<=a&&!p;)e._duration||"isPause"!==e.data||e.ratio||0===e._startTime&&0===this._rawPrevTime||(p=e),e=e._next;else for(e=this._last;e&&e._startTime>=a&&!p;)e._duration||"isPause"===e.data&&0=G)for(e=this._first;e&&(m=e._next,q===this._time&&(!this._paused||D));)(e._active||e._startTime<=this._time&&!e._paused&&!e._gc)&&(p===e&&this.pause(),e._reversed?e.render((e._dirty?e.totalDuration():e._totalDuration)-(a-e._startTime)*e._timeScale,b,d):e.render((a-e._startTime)*e._timeScale,b,d)),e=m;else for(e=this._last;e&&(m=e._prev,q===this._time&&(!this._paused||D));){if(e._active||e._startTime<=G&&!e._paused&&!e._gc){if(p===e){for(p=e._prev;p&&p.endTime()>this._time;)p.render(p._reversed?p.totalDuration()-(a-p._startTime)*p._timeScale:(a-p._startTime)*p._timeScale,b,d),p=p._prev;p=null;this.pause()}e._reversed?e.render((e._dirty?e.totalDuration():e._totalDuration)-(a-e._startTime)*e._timeScale,b,d):e.render((a-e._startTime)*e._timeScale,b,d)}e=m}this._onUpdate&&(b||(h.length&&l(),this._callback("onUpdate")));k&&(this._locked||this._gc||(L===this._startTime||A!==this._timeScale)&&(0===this._time||r>=this.totalDuration())&&(f&&(h.length&&l(),this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!b&&this.vars[k]&&this._callback(k)))},d.getActive=function(a,b,d){null==a&&(a=!0);null==b&&(b=!0);null==d&&(d=!1);var e=[];d=this.getChildren(a,b,d);var f=0,h=d.length;for(a=0;h>a;a++)b=d[a],b.isActive()&&(e[f++]=b);return e},d.getLabelAfter=function(a){a||0!==a&&(a=this._time);var b,d=this.getLabelsArray(),e=d.length;for(b=0;e>b;b++)if(d[b].time>a)return d[b].name;return null},d.getLabelBefore=function(a){null==a&&(a=this._time);for(var b=this.getLabelsArray(),d=b.length;-1<--d;)if(b[d].timethis._duration&&(a=this._duration),this._yoyo&&0!==(1&this._cycle)?a=this._duration-a+this._cycle*(this._duration+this._repeatDelay):0!==this._repeat&&(a+=this._cycle*(this._duration+this._repeatDelay)),this.totalTime(a,b)):this._time},d.repeat=function(a){return arguments.length?(this._repeat=a,this._uncache(!0)):this._repeat},d.repeatDelay=function(a){return arguments.length?(this._repeatDelay=a,this._uncache(!0)):this._repeatDelay},d.yoyo=function(a){return arguments.length?(this._yoyo=a,this):this._yoyo},d.currentLabel=function(a){return arguments.length?this.seek(a,!0):this.getLabelBefore(this._time+1E-8)},e},!0);(function(){var a=180/Math.PI,b=[],d=[],e=[],f={},h=_gsScope._gsDefine.globals,l=function(a,b,d,e){d===e&&(d=e-(e-b)/1E6);a===b&&(b=a+(d-a)/1E6);this.a=a;this.b=b;this.c=d;this.d=e;this.da=e-a;this.ca=d-a;this.ba=b-a},m=function(a,b,d,e){var f={a:a},h={},l={},m={c:e},q=(a+b)/2,r=(b+d)/2;d=(d+e)/2;b=(q+r)/2;var r=(r+d)/2,v=(r-b)/8;return f.b=q+(a-q)/4,h.b=b+v,f.c=h.a=(f.b+h.b)/2,h.c=l.a=(b+r)/2,l.b=r-v,m.b=d+(e-d)/4,l.c=m.a=(l.b+m.b)/2,[f,h,l,m]},r=function(a,h,q,r,k,u){var p,v,w,x,B={},G=[],L=u||a[0];k="string"==typeof k?","+k+",":",x,y,z,left,top,right,bottom,marginTop,marginLeft,marginRight,marginBottom,paddingLeft,paddingTop,paddingRight,paddingBottom,backgroundPosition,backgroundPosition_y,";null==h&&(h=1);for(v in a[0])G.push(v);if(1M)L=(J[0]=new l(L[0][A],0,0,L[-1>M?0:1][A]),J);else{for(N=0;M>N;N++)D=L[N][A],V=L[N+1][A],J[N]=new l(D,0,0,V),H&&(Q=L[N+2][A],b[N]=(b[N]||0)+(V-D)*(V-D),d[N]=(d[N]||0)+(Q-V)*(Q-V));L=(J[N]=new l(L[N][A],0,0,L[N+1][A]),J)}B[w]=L}for(p=b.length;-1<--p;)b[p]=Math.sqrt(b[p]),d[p]=Math.sqrt(d[p]);if(!r){for(p=G.length;-1<--p;)if(f[v])for(a=B[G[p]],w=a.length-1,k=0;w>k;k++)u=a[k+1].da/d[k]+a[k].da/b[k]||0,e[k]=(e[k]||0)+u*u;for(p=e.length;-1<--p;)e[p]=Math.sqrt(e[p])}p=G.length;for(k=q?4:1;-1<--p;){v=G[p];u=a=B[v];w=h;L=q;A=r;v=f[v];for(var K,ba=V=D=J=void 0,ca=void 0,Na=void 0,R=void 0,Z=u.length-1,ta=0,da=u[0].a,H=0;Z>H;H++)Q=u[ta],M=Q.a,N=Q.d,K=u[ta+1].d,v?(ca=b[H],Na=d[H],R=(Na+ca)*w*.25/(A?.5:e[H]||.5),J=N-(N-M)*(A?.5*w:0!==ca?R/ca:0),D=N+(K-N)*(A?.5*w:0!==Na?R/Na:0),V=N-(J+((D-J)*(3*ca/(ca+Na)+.5)/4||0))):(J=N-(N-M)*w*.5,D=N+(K-N)*w*.5,V=N-(J+D)/2),J+=V,D+=V,Q.c=K=J,0!==H?Q.b=da:Q.b=da=Q.a+.6*(Q.c-Q.a),Q.da=N-M,Q.ca=K-M,Q.ba=da-M,L?(ba=m(M,da,K,N),u.splice(ta,1,ba[0],ba[1],ba[2],ba[3]),ta+=4):ta++,da=D;Q=u[ta];Q.b=da;Q.c=da+.4*(Q.d-da);Q.da=Q.d-Q.a;Q.ca=Q.c-Q.a;Q.ba=da-Q.a;L&&(ba=m(Q.a,da,Q.c,Q.d),u.splice(ta,1,ba[0],ba[1],ba[2],ba[3]));x&&(a.splice(0,k),a.splice(a.length-k,k))}return B},q=_gsScope._gsDefine.plugin({propName:"bezier",priority:-1,version:"1.3.7",API:2,global:!0,init:function(a,b,d){this._target=a;b instanceof Array&&(b={values:b});this._func={};this._mod={};this._props=[];this._timeRes=null==b.timeResolution?6:parseInt(b.timeResolution,10);var e,f,h,m,q,w=b.values||[],x={};h=w[0];this._autoRotate=(f=b.autoRotate||d.vars.orientToBezier)?f instanceof Array?f:[["x","y","rotation",!0===f?0:Number(f)||0]]:null;for(e in h)this._props.push(e);for(h=this._props.length;-1<--h;)e=this._props[h],this._overwriteProps.push(e),f=this._func[e]="function"==typeof a[e],x[e]=f?a[e.indexOf("set")||"function"!=typeof a["get"+e.substr(3)]?e:"get"+e.substr(3)]():parseFloat(a[e]),q||x[e]!==w[0][e]&&(q=x);if("cubic"!==b.type&&"quadratic"!==b.type&&"soft"!==b.type)x=r(w,isNaN(b.curviness)?1:b.curviness,!1,"thruBasic"===b.type,b.correlate,q);else{h=w;var w=(w=b.type)||"soft",B,G,L,A,H,D,M;b={};q="cubic"===w?3:2;var N="soft"===w,V=[];if(N&&x&&(h=[x].concat(h)),null==h||h.lengthH;H++)w=null==x?h[H][B]:"string"==typeof(G=h[H][B])&&"\x3d"===G.charAt(1)?x[B]+Number(G.charAt(0)+G.substr(2)):Number(G),N&&1H&&(f[M++]=(w+f[M-2])/2),f[M++]=w;D=M-q+1;for(H=M=0;D>H;H+=q)w=f[H],B=f[H+1],G=f[H+2],L=2===q?0:f[H+3],f[M++]=G=3===q?new l(w,B,G,L):new l(w,(2*B+w)/3,(2*B+G)/3,G);f.length=M}x=b}if(this._beziers=x,this._segCount=this._beziers[e].length,this._timeRes){f=this._beziers;e=this._timeRes;e=e>>0||6;x=[];B=[];h=G=0;b=e-1;q=[];w=[];for(m in f){A=f[m];H=x;D=e;var Q,J,K,ba,ca,V=1/D;for(L=A.length;-1<--L;)for(K=A[L],J=K.a,M=K.d-J,N=K.c-J,K=K.b-J,J=0,ba=1;D>=ba;ba++)Q=V*ba,ca=1-Q,Q=J-(J=(Q*Q*M+3*ca*(Q*N+ca*K))*Q),ca=L*D+ba-1,H[ca]=(H[ca]||0)+Q*Q}f=x.length;for(m=0;f>m;m++)G+=Math.sqrt(x[m]),A=m%e,w[A]=G,A===b&&(h+=G,A=m/e>>0,q[A]=w,B[A]=h,G=0,w=[]);this._length=h;this._lengths=B;this._segments=q;this._l1=this._li=this._s1=this._si=0;this._l2=this._lengths[0];this._curSeg=this._segments[0];this._s2=this._curSeg[0];this._prec=1/this._curSeg.length}if(f=this._autoRotate)for(this._initialRotations=[],f[0]instanceof Array||(this._autoRotate=f=[f]),h=f.length;-1<--h;){for(m=0;3>m;m++)e=f[h][m],this._func[e]="function"==typeof a[e]?a[e.indexOf("set")||"function"!=typeof a["get"+e.substr(3)]?e:"get"+e.substr(3)]:!1;e=f[h][2];this._initialRotations[h]=(this._func[e]?this._func[e].call(this._target):this._target[e])||0;this._overwriteProps.push(e)}return this._startRatio=d.vars.runBackwards?1:0,!0},set:function(b){var d,e,f,h,l,m;l=this._segCount;var q=this._func,r=this._target,x=b!==this._startRatio;if(this._timeRes){if(d=this._lengths,h=this._curSeg,b*=this._length,f=this._li,b>this._l2&&l-1>f){for(--l;l>f&&(this._l2=d[++f])<=b;);this._l1=d[f-1];this._li=f;this._curSeg=h=this._segments[f];this._s2=h[this._s1=this._si=0]}else if(b=b;);0===f&&bthis._s2&&ff&&(this._s2=h[++f])<=b;);this._s1=h[f-1];this._si=f}else if(b=b;);0===f&&bb?0:1<=b?l-1:l*b>>0,l*=b-1/l*d;e=1-l;for(f=this._props.length;-1<--f;)b=this._props[f],h=this._beziers[b][d],m=(l*l*h.da+3*e*(l*h.ca+e*h.ba))*l+h.a,this._mod[b]&&(m=this._mod[b](m,r)),q[b]?r[b](m):r[b]=m;if(this._autoRotate){var G,F,L,A,H,D,M=this._autoRotate;for(f=M.length;-1<--f;)b=M[f][2],H=M[f][3]||0,D=!0===M[f][4]?1:a,h=this._beziers[M[f][0]],e=this._beziers[M[f][1]],h&&e&&(h=h[d],e=e[d],G=h.a+(h.b-h.a)*l,L=h.b+(h.c-h.b)*l,G+=(L-G)*l,L+=(h.c+(h.d-h.c)*l-L)*l,F=e.a+(e.b-e.a)*l,A=e.b+(e.c-e.b)*l,F+=(A-F)*l,A+=(e.c+(e.d-e.c)*l-A)*l,m=x?Math.atan2(A-F,L-G)*D+H:this._initialRotations[f],this._mod[b]&&(m=this._mod[b](m,r)),q[b]?r[b](m):r[b]=m)}}}),x=q.prototype;q.bezierThrough=r;q.cubicToQuadratic=m;q._autoCSS=!0;q.quadraticToCubic=function(a,b,d){return new l(a,(2*b+a)/3,(2*b+d)/3,d)};q._cssRegister=function(){var a=h.CSSPlugin;if(a){var a=a._internals,b=a._parseToProxy,d=a._setPluginRatio,e=a.CSSPropTn;a._registerComplexSpecialProp("bezier",{parser:function(a,f,h,l,m,r){f instanceof Array&&(f={values:f});r=new q;var k,p,u=f.values,v=u.length-1,w=[],x={};if(0>v)return m;for(h=0;v>=h;h++)p=b(a,u[h],l,m,r,v!==h),w[h]=p.end;for(k in f)x[k]=f[k];return x.values=w,m=new e(a,"bezier",0,0,p.pt,2),m.data=p,m.plugin=r,m.setRatio=d,0===x.autoRotate&&(x.autoRotate=!0),!x.autoRotate||x.autoRotate instanceof Array||(h=!0===x.autoRotate?0:Number(x.autoRotate),x.autoRotate=null!=p.end.left?[["left","top","rotation",h,!1]]:null!=p.end.x?[["x","y","rotation",h,!1]]:!1),x.autoRotate&&(l._transform||l._enableTransforms(!1),p.autoRotate=l._target._gsTransform,p.proxy.rotation=p.autoRotate.rotation||0,l._overwriteProps.push("rotation")),r._onInitTn(p.proxy,x,l._tn),m}})}};x._mod=function(a){for(var b,d=this._overwriteProps,e=d.length;-1<--e;)(b=a[d[e]])&&"function"==typeof b&&(this._mod[d[e]]=b)};x._kill=function(a){var b,d,e=this._props;for(b in this._beziers)if(b in a)for(delete this._beziers[b],delete this._func[b],d=e.length;-1<--d;)e[d]===b&&e.splice(d,1);if(e=this._autoRotate)for(d=e.length;-1<--d;)a[e[d][2]]&&e.splice(d,1);return this._super._kill.call(this,a)}})();_gsScope._gsDefine("plugins.CSSPlugin",["plugins.TnPlugin","TnLite"],function(a,b){var d,e,f,h,l=function(){a.call(this,"css");this._overwriteProps.length=0;this.setRatio=l.prototype.setRatio},m=_gsScope._gsDefine.globals,r={},q=l.prototype=new a("css");q.constructor=l;l.version="1.19.1";l.API=2;l.defaultTransformPerspective=0;l.defaultSkewType="compensated";l.defaultSmoothOrigin=!0;q="px";l.suffixMap={top:q,right:q,bottom:q,left:q,width:q,height:q,fontSize:q,padding:q,margin:q,perspective:q,lineHeight:""};var x,G,B,w,v,k,u,p,E=/(?:\-|\.|\b)(\d|\.|e\-)+/g,C=/(?:\d|\-\d|\.\d|\-\.\d|\+=\d|\-=\d|\+=.\d|\-=\.\d)+/g,W=/(?:\+=|\-=|\-|\b)[\d\-\.]+[a-zA-Z0-9]*(?:%|\b)/gi,aa=/(?![+-]?\d*\.?\d+|[+-]|e[+-]\d+)[^0-9]/g,F=/(?:\d|\-|\+|=|#|\.)*/g,L=/opacity *= *([^)]*)/i,A=/opacity:([^;]*)/i,H=/alpha\(opacity *=.+?\)/i,D=/^(rgb|hsl)/,M=/([A-Z])/g,N=/-([a-z])/gi,V=/(^(?:url\(\"|url\())|(?:(\"\))$|\)$)/gi,Q=function(a,b){return b.toUpperCase()},J=/(?:Left|Right|Width)/i,K=/(M11|M12|M21|M22)=[\d\-\.e]+/gi,ba=/progid\:DXImageTransform\.Microsoft\.Matrix\(.+?\)/i,ca=/,(?=[^\)]*(?:\(|$))/gi,Na=/[\s,\(]/i,R=Math.PI/180,Z=180/Math.PI,ta={},da={style:{}},Y=_gsScope.document||{createElement:function(){return da}},S=function(a,b){return Y.createElementNS?Y.createElementNS(b||"http://www.w3.org/1999/xhtml",a):Y.createElement(a)},ga=S("div"),ja=S("img"),ka=l._internals={_specialProps:r},ha=(_gsScope.navigator||{}).userAgent||"",na=function(){var a=ha.indexOf("Android"),b=S("a");return B=-1!==ha.indexOf("Safari")&&-1===ha.indexOf("Chrome")&&(-1===a||3parseFloat(ha.substr(ha.indexOf("Version/")+8,2)),w=-1!==ha.indexOf("Firefox"),(/MSIE ([0-9]{1,}[\.0-9]{0,})/.exec(ha)||/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/.exec(ha))&&(k=parseFloat(RegExp.$1)),b?(b.style.cssText="top:1px;opacity:.55;",/^0.55/.test(b.style.opacity)):!1}(),Oa=function(a){return L.test("string"==typeof a?a:(a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100:1},Ea="",X="",Hb=function(a,b){b=b||ga;var d,e,f=b.style;if(void 0!==f[a])return a;a=a.charAt(0).toUpperCase()+a.substr(1);d=["O","Moz","ms","Ms","Webkit"];for(e=5;-1<--e&&void 0===f[d[e]+a];);return 0<=e?(X=3===e?"ms":d[e],Ea="-"+X.toLowerCase()+"-",X+a):null},ua=Y.defaultView?Y.defaultView.getComputedStyle:function(){},z=l.getStyle=function(a,b,d,e,f){var h;return na||"opacity"!==b?(!e&&a.style[b]?h=a.style[b]:(d=d||ua(a))?h=d[b]||d.getPropertyValue(b)||d.getPropertyValue(b.replace(M,"-$1").toLowerCase()):a.currentStyle&&(h=a.currentStyle[b]),null==f||h&&"none"!==h&&"auto"!==h&&"auto auto"!==h?h:f):Oa(a)},la=ka.convertToPixels=function(a,d,e,f,h){if("px"===f||!f)return e;if("auto"===f||!e)return 0;var k,m,p,q=J.test(d),u=a;k=ga.style;var r=0>e,v=1===e;if(r&&(e=-e),v&&(e*=100),"%"===f&&-1!==d.indexOf("border"))k=e/100*(q?a.clientWidth:a.clientHeight);else{if(k.cssText="border:0 solid red;position:"+z(a,"position")+";line-height:0;","%"!==f&&u.appendChild&&"v"!==f.charAt(0)&&"rem"!==f)k[q?"borderLeftWidth":"borderTopWidth"]=e+f;else{if(u=a.parentNode||Y.body,m=u._gsCache,p=b.ticker.frame,m&&q&&m.time===p)return m.width*e/100;k[q?"width":"height"]=e+f}u.appendChild(ga);k=parseFloat(ga[q?"offsetWidth":"offsetHeight"]);u.removeChild(ga);q&&"%"===f&&!1!==l.cacheWidths&&(m=u._gsCache=u._gsCache||{},m.time=p,m.width=k/e*100);0!==k||h||(k=la(a,d,e,f,!0))}return v&&(k/=100),r?-k:k},fa=ka.calculateOffset=function(a,b,d){if("absolute"!==z(a,"position",d))return 0;var e="left"===b?"Left":"Top";d=z(a,"margin"+e,d);return a["offset"+e]-(la(a,b,parseFloat(d),d.replace(F,""))||0)},T=function(a,b){var d,e,f,h={};if(b=b||ua(a,null))if(d=b.length)for(;-1<--d;)f=b[d],-1!==f.indexOf("-transform")&&uc!==f||(h[f.replace(N,Q)]=b.getPropertyValue(f));else for(d in b)-1!==d.indexOf("Transform")&&eb!==d||(h[d]=b[d]);else if(b=a.currentStyle||a.style)for(d in b)"string"==typeof d&&void 0===h[d]&&(h[d.replace(N,Q)]=b[d]);return na||(h.opacity=Oa(a)),e=Rc(a,b,!1),h.rotation=e.rotation,h.skewX=e.skewX,h.scaleX=e.scaleX,h.scaleY=e.scaleY,h.x=e.x,h.y=e.y,Wb&&(h.z=e.z,h.rotationX=e.rotationX,h.rotationY=e.rotationY,h.scaleZ=e.scaleZ),h.filters&&delete h.filters,h},Ie=function(a,b,d,e,f){var h,l,k,m={},p=a.style;for(l in d)"cssText"!==l&&"length"!==l&&isNaN(l)&&(b[l]!==(h=d[l])||f&&f[l])&&-1===l.indexOf("Origin")&&("number"==typeof h||"string"==typeof h)&&(m[l]="auto"!==h||"left"!==l&&"top"!==l?""!==h&&"auto"!==h&&"none"!==h||"string"!=typeof b[l]||""===b[l].replace(aa,"")?h:0:fa(a,l),void 0!==p[l]&&(k=new Oc(p,l,p[l],k)));if(e)for(l in e)"className"!==l&&(m[l]=e[l]);return{difs:m,firstMPT:k}},nh={width:["Left","Right"],height:["Top","Bottom"]},Ua=["marginLeft","marginRight","marginTop","marginBottom"],kb=function(a,b){if("contain"===a||"auto"===a||"auto auto"===a)return a+" ";null!=a&&""!==a||(a="0 0");var d,e=a.split(" ");d=-1!==a.indexOf("left")?"0%":-1!==a.indexOf("right")?"100%":e[0];var f=-1!==a.indexOf("top")?"0%":-1!==a.indexOf("bottom")?"100%":e[1];if(3h?h+360:h-360)),-1!==a.indexOf("_cw")&&0>h?h=(h+3599999999640)%360-360*(h/360|0):-1!==a.indexOf("ccw")&&0l&&-1E-6a?a+1:16*a?b+(d-b)*a*6:.5>a?d:2>3*a?b+(d-b)*(2/3-a)*6:b)+.5|0},ud=l.parseColor=function(a,b){var d,e,f,h,l,k,m,p,z,q,u;if(a)if("number"==typeof a)d=[a>>16,a>>8&255,255&a];else{if(","===a.charAt(a.length-1)&&(a=a.substr(0,a.length-1)),Va[a])d=Va[a];else if("#"===a.charAt(0))4===a.length&&(e=a.charAt(1),f=a.charAt(2),h=a.charAt(3),a="#"+e+e+f+f+h+h),a=parseInt(a.substr(1),16),d=[a>>16,a>>8&255,255&a];else if("hsl"===a.substr(0,3))if(d=u=a.match(E),b){if(-1!==a.indexOf("\x3d"))return a.match(C)}else l=Number(d[0])%360/360,k=Number(d[1])/100,m=Number(d[2])/100,f=.5>=m?m*(k+1):m+k-m*k,e=2*m-f,3f?6:0):p===f?(h-e)/q+2:(e-f)/q+4,l*=60),d[0]=l+.5|0,d[1]=100*k+.5|0,d[2]=100*m+.5|0),d},Nc=function(a,b){var d,e,f,h=a.match(hb)||[],l=0,k=h.length?"":a;for(d=0;dr--)for(;++rh--)for(;++hd;d++)k[a[d]]=e[d]=e[d]||e[(d-1)/2>>0];return f.parse(b,k,h,l)}},Oc=(ka._setPluginRatio=function(a){this.plugin.setRatio(a);var b,d,e;e=this.data;for(var f=e.proxy,h=e.firstMPT;h;)b=f[h.v],h.r?b=Math.round(b):1E-6>b&&-1E-6=e.type&&(l=e.p,q[l]=e.s+e.c,z[l]=e.s,h||(m=new Oc(e,"s",l,m,e.r),e.c=0),1===e.type))for(d=e.l;0<--d;)k="xn"+d,l=e.p+"_"+k,q[l]=e.data[k],z[l]=e[k],h||(m=new Oc(e,k,l,m,e.rxp[k]));e=e._next}return{proxy:z,end:q,firstMPT:m,pt:a}},ka.CSSPropTn=function(a,b,e,f,l,k,m,p,z,q,u){this.t=a;this.p=b;this.s=e;this.c=f;this.n=m||b;a instanceof db||h.push(this.n);this.r=p;this.type=k||0;z&&(this.pr=z,d=!0);this.b=void 0===q?e:q;this.e=void 0===u?e+f:u;l&&(this._next=l,l._prev=this)}),bd=function(a,b,d,e,f,h){a=new db(a,b,d,e-d,f,-1,h);return a.b=d,a.e=a.xs0=e,a},Pc=l.parseComplex=function(a,b,d,e,f,h,k,m,z,q){d=d||h||"";"function"==typeof e&&(e=e(p,u));k=new db(a,b,0,0,k,q?2:1,null,!1,m,d,e);e+="";f&&hb.test(e+d)&&(e=[d,e],l.colorStringFilter(e),d=e[0],e=e[1]);var r,v,w,J,D;a=d.split(", ").join(",").split(" ");b=e.split(", ").join(",").split(" ");m=a.length;var A=!1!==x;(-1!==e.indexOf(",")||-1!==d.indexOf(","))&&(a=a.join(" ").replace(ca,", ").split(" "),b=b.join(" ").replace(ca,", ").split(" "),m=a.length);m!==b.length&&(a=(h||"").split(" "),m=a.length);k.plugin=z;k.setRatio=q;for(d=hb.lastIndex=0;m>d;d++)if(r=a[d],z=b[d],w=parseFloat(r),w||0===w)k.appendXtra("",w,za(z,w),z.replace(C,""),A&&-1!==z.indexOf("px"),!0);else if(f&&hb.test(r))q=z.indexOf(")")+1,q=")"+(q?z.substr(q):""),J=-1!==z.indexOf("hsl")&&na,r=ud(r,J),z=ud(z,J),(h=6r.length?1:r[3],k.appendXtra("",r,(4>z.length?1:z[3])-r,q,!1))),hb.lastIndex=0;else if(h=r.match(E)){if(v=z.match(C),!v||v.length!==h.length)return k;for(z=q=0;zl.length?m.length:l.length;for(k=0;p>k;k++)b=l[k]=l[k]||this.dflt,d=m[k]=m[k]||this.dflt,u&&(z=b.indexOf(u),q=d.indexOf(u),z!==q&&(-1===q?l[k]=l[k].split(u).join(""):-1===z&&(l[k]+=" "+u)));b=l.join(", ");d=m.join(", ")}return Pc(a,this.p,b,d,this.clrs,this.dflt,e,this.pr,f,h)};q.parse=function(a,b,d,e,h,k,l){return this.parseComplex(a.style,this.format(z(a,this.p,f,!1,this.dflt)),this.format(b),h,k)};l.registerSpecialProp=function(a,b,d){Sa(a,{parser:function(a,e,f,h,k,l,m){k=new db(a,f,0,0,k,2,f,!1,d);return k.plugin=l,k.setRatio=b(a,e,h._tn,f),k},priority:d})};l.useSVGTransformAttr=!0;var Qc,cd="scaleX scaleY scaleZ x y z skewX skewY rotation rotationX rotationY perspective xPercent yPercent".split(" "),eb=Hb("transform"),uc=Ea+"transform",Vb=Hb("transformOrigin"),Wb=null!==Hb("perspective"),Xd=ka.Transform=function(){this.perspective=parseFloat(l.defaultTransformPerspective)||0;this.force3D=!1!==l.defaultForce3D&&Wb?l.defaultForce3D||"auto":!1},xf=_gsScope.SVGElement,dd=function(a,b,d){var e;a=Y.createElementNS("http://www.w3.org/2000/svg",a);var f=/([a-z])([A-Z])/g;for(e in d)a.setAttributeNS(null,e.replace(f,"$1-$2").toLowerCase(),d[e]);return b.appendChild(a),a},fb=Y.documentElement||{},yf=function(){var a,b,d,e=k||/Android/i.test(ha)&&!_gsScope.chrome;return Y.createElementNS&&!e&&(a=dd("svg",fb),b=dd("rect",a,{width:100,height:50,x:100}),d=b.getBoundingClientRect().width,b.style[Vb]="50% 50%",b.style[eb]="scaleX(0.5)",e=d===b.getBoundingClientRect().width&&!(w&&Wb),fb.removeChild(a)),e}(),Ke=function(a,b,d,e,f,h){var k,m,p,z,q,u,r,v,w,J,x,E,D,C=a._gsTransform,A=Xb(a,!0);C&&(E=C.xOrigin,D=C.yOrigin);(!e||2>(k=e.split(" ")).length)&&(u=a.getBBox(),0===u.x&&0===u.y&&0===u.width+u.height&&(u={x:parseFloat(a.hasAttribute("x")?a.getAttribute("x"):a.hasAttribute("cx")?a.getAttribute("cx"):0)||0,y:parseFloat(a.hasAttribute("y")?a.getAttribute("y"):a.hasAttribute("cy")?a.getAttribute("cy"):0)||0,width:0,height:0}),b=kb(b).split(" "),k=[(-1!==b[0].indexOf("%")?parseFloat(b[0])/100*u.width:parseFloat(b[0]))+u.x,(-1!==b[1].indexOf("%")?parseFloat(b[1])/100*u.height:parseFloat(b[1]))+u.y]);d.xOrigin=b=parseFloat(k[0]);d.yOrigin=z=parseFloat(k[1]);e&&A!==wd&&(q=A[0],u=A[1],r=A[2],v=A[3],w=A[4],J=A[5],x=q*v-u*r,x&&(m=v/x*b+-r/x*z+(r*J-v*w)/x,p=-u/x*b+q/x*z-(q*J-u*w)/x,b=d.xOrigin=k[0]=m,z=d.yOrigin=k[1]=p));C&&(h&&(d.xOffset=C.xOffset,d.yOffset=C.yOffset,C=d),f||!1!==f&&!1!==l.defaultSmoothOrigin?(m=b-E,p=z-D,C.xOffset+=m*A[0]+p*A[2]-m,C.yOffset+=m*A[1]+p*A[3]-p):C.xOffset=C.yOffset=0);h||a.setAttribute("data-svg-origin",k.join(" "))},Yd=function(a){var b,d=S("svg",this.ownerSVGElement.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),e=this.parentNode,f=this.nextSibling,h=this.style.cssText;if(fb.appendChild(d),d.appendChild(this),this.style.display="block",a)try{b=this.getBBox(),this._originalGetBBox=this.getBBox,this.getBBox=Yd}catch(Sc){}else this._originalGetBBox&&(b=this._originalGetBBox());return f?e.insertBefore(this,f):e.appendChild(this),fb.removeChild(d),this.style.cssText=h,b},Ob=function(a){var b;if(b=xf&&a.getCTM)try{b=a.getBBox()}catch(tb){b=Yd.call(a,!0)}return!(!b||a.parentNode&&!a.ownerSVGElement)},wd=[1,0,0,1,0,0],Xb=function(a,b){var d,e,f,h,k,l,m=a._gsTransform||new Xd,p=a.style;if(eb?e=z(a,uc,null,!0):a.currentStyle&&(e=a.currentStyle.filter.match(K),e=e&&4===e.length?[e[0].substr(4),Number(e[2].substr(4)),Number(e[1].substr(4)),e[3].substr(4),m.x||0,m.y||0].join():""),d=!e||"none"===e||"matrix(1, 0, 0, 1, 0, 0)"===e,d&&eb&&((l="none"===ua(a).display)||!a.parentNode)&&(l&&(h=p.display,p.display="block"),a.parentNode||(k=1,fb.appendChild(a)),e=z(a,uc,null,!0),d=!e||"none"===e||"matrix(1, 0, 0, 1, 0, 0)"===e,h?p.display=h:l&&ed(p,"display"),k&&fb.removeChild(a)),(m.svg||a.getCTM&&Ob(a))&&(d&&-1!==(p[eb]+"").indexOf("matrix")&&(e=p[eb],d=0),f=a.getAttribute("transform"),d&&f&&(-1!==f.indexOf("matrix")?(e=f,d=0):-1!==f.indexOf("translate")&&(e="matrix(1,0,0,1,"+f.match(/(?:\-|\b)[\d\-\.e]+\b/gi).join(",")+")",d=0))),d)return wd;f=(e||"").match(E)||[];for(lb=f.length;-1<--lb;)h=Number(f[lb]),f[lb]=(k=h-(h|=0))?(1E5*k+(0>k?-.5:.5)|0)/1E5+h:h;return b&&6p.scaleX,u=Wb?parseFloat(z(a,Vb,d,!1,"0 0 0").split(" ")[2])||p.zOrigin||0:0,r=parseFloat(l.defaultTransformPerspective)||0;if(p.svg=!(!a.getCTM||!Ob(a)),p.svg&&(Ke(a,z(a,Vb,d,!1,"50% 50%")+"",p,a.getAttribute("data-svg-origin")),Qc=l.useSVGTransformAttr||yf),h=Xb(a),h!==wd){if(16===h.length){var v,w,J,x,r=h[0];d=h[1];f=h[2];var E=h[3],C=h[4],D=h[5],A=h[6],X=h[7],B=h[8],la=h[9],K=h[10],fa=h[12],T=h[13],G=h[14],ua=h[11],ba=Math.atan2(A,K);p.zOrigin&&(G=-p.zOrigin,fa=B*G-h[12],T=la*G-h[13],G=K*G+p.zOrigin-h[14]);p.rotationX=ba*Z;ba&&(x=Math.cos(-ba),m=Math.sin(-ba),v=C*x+B*m,w=D*x+la*m,J=A*x+K*m,B=C*-m+B*x,la=D*-m+la*x,K=A*-m+K*x,ua=X*-m+ua*x,C=v,D=w,A=J);ba=Math.atan2(-f,K);p.rotationY=ba*Z;ba&&(x=Math.cos(-ba),m=Math.sin(-ba),v=r*x-B*m,w=d*x-la*m,J=f*x-K*m,la=d*m+la*x,K=f*m+K*x,ua=E*m+ua*x,r=v,d=w,f=J);ba=Math.atan2(d,r);p.rotation=ba*Z;ba&&(x=Math.cos(-ba),m=Math.sin(-ba),r=r*x+C*m,w=d*x+D*m,D=d*-m+D*x,A=f*-m+A*x,d=w);p.rotationX&&359.9Math.abs(p.skewX)&&(q?(p.scaleX*=-1,p.skewX+=0>=p.rotation?180:-180,p.rotation+=0>=p.rotation?180:-180):(p.scaleY*=-1,p.skewX+=0>=p.skewX?180:-180)));p.perspective=ua?1/(0>ua?-ua:ua):0;p.x=fa;p.y=T;p.z=G;p.svg&&(p.x-=p.xOrigin-(p.xOrigin*r-p.yOrigin*C),p.y-=p.yOrigin-(p.yOrigin*d-p.xOrigin*D))}else Wb&&!f&&h.length&&p.x===h[4]&&p.y===h[5]&&(p.rotationX||p.rotationY)||(v=(x=6<=h.length)?h[0]:1,w=h[1]||0,J=h[2]||0,x=x?h[3]:1,p.x=h[4]||0,p.y=h[5]||0,h=Math.sqrt(v*v+w*w),m=Math.sqrt(x*x+J*J),d=v||w?Math.atan2(w,v)*Z:p.rotation||0,f=J||x?Math.atan2(J,x)*Z+d:p.skewX||0,90Math.abs(f)&&(q?(h*=-1,f+=0>=d?180:-180,d+=0>=d?180:-180):(m*=-1,f+=0>=f?180:-180)),p.scaleX=h,p.scaleY=m,p.rotation=d,p.skewX=f,Wb&&(p.rotationX=p.rotationY=p.z=0,p.perspective=r,p.scaleZ=1),p.svg&&(p.x-=p.xOrigin-(p.xOrigin*v+p.yOrigin*J),p.y-=p.yOrigin-(p.xOrigin*w+p.yOrigin*x)));p.zOrigin=u;for(k in p)2E-5>p[k]&&-2E-5k?1:-1,q=e.ieOffsetX||0,u=e.ieOffsetY||0,e.ieOffsetX=Math.round((d-((0>l?-l:l)*d+(0>m?-m:m)*r))/2+x),e.ieOffsetY=Math.round((r-((0>z?-z:z)*r+(0>p?-p:p)*d))/2+J),lb=0;4>lb;lb++)l=Ua[lb],m=f[l],d=-1!==m.indexOf("px")?parseFloat(m):la(this.t,l,parseFloat(m),m.replace(F,""))||0,m=d!==e[l]?2>lb?-e.ieOffsetX:-e.ieOffsetY:2>lb?q-e.ieOffsetX:u-e.ieOffsetY,h[l]=(e[l]=Math.round(d-m*(0===lb||2===lb?1:a)))+"px"}},Le=ka.set3DTransformRatio=ka.setTransformRatio=function(a){var b,d,e,f,h,k,l,m,p,z,q,u,r,v,x,J,C,D=this.data,E=this.t.style,A=D.rotation,X=D.rotationX,B=D.rotationY,la=D.scaleX,K=D.scaleY,fa=D.scaleZ,G=D.x,T=D.y,ua=D.z,ba=D.svg,ca=D.perspective;l=D.force3D;m=D.skewY;p=D.skewX;if(m&&(p+=m,A+=m),!((1!==a&&0!==a||"auto"!==l||this.tn._totalTime!==this.tn._totalDuration&&this.tn._totalTime)&&l||ua||ca||B||X)&&1===fa||Qc&&ba||!Wb)return void(A||p||ba?(A*=R,k=p*R,d=Math.cos(A)*la,f=Math.sin(A)*la,e=Math.sin(A-k)*-K,h=Math.cos(A-k)*K,k&&"simple"===D.skewType&&(b=Math.tan(k-m*R),b=Math.sqrt(1+b*b),e*=b,h*=b,m&&(b=Math.tan(m*R),b=Math.sqrt(1+b*b),d*=b,f*=b)),ba&&(G+=D.xOrigin-(D.xOrigin*d+D.yOrigin*e)+D.xOffset,T+=D.yOrigin-(D.xOrigin*f+D.yOrigin*h)+D.yOffset,Qc&&(D.xPercent||D.yPercent)&&(v=this.t.getBBox(),G+=.01*D.xPercent*v.width,T+=.01*D.yPercent*v.height),v=1E-6,v>G&&G>-v&&(G=0),v>T&&T>-v&&(T=0)),r=(1E5*d|0)/1E5+","+(1E5*f|0)/1E5+","+(1E5*e|0)/1E5+","+(1E5*h|0)/1E5+","+G+","+T+")",ba&&Qc?this.t.setAttribute("transform","matrix("+r):E[eb]=(D.xPercent||D.yPercent?"translate("+D.xPercent+"%,"+D.yPercent+"%) matrix(":"matrix(")+r):E[eb]=(D.xPercent||D.yPercent?"translate("+D.xPercent+"%,"+D.yPercent+"%) matrix(":"matrix(")+la+",0,0,"+K+","+G+","+T+")");if(w&&(v=1E-4,v>la&&la>-v&&(la=fa=2E-5),v>K&&K>-v&&(K=fa=2E-5),!ca||D.z||D.rotationX||D.rotationY||(ca=0)),A||p)A*=R,x=d=Math.cos(A),J=f=Math.sin(A),p&&(A-=p*R,x=Math.cos(A),J=Math.sin(A),"simple"===D.skewType&&(b=Math.tan((p-m)*R),b=Math.sqrt(1+b*b),x*=b,J*=b,D.skewY&&(b=Math.tan(m*R),b=Math.sqrt(1+b*b),d*=b,f*=b))),e=-J,h=x;else{if(!(B||X||1!==fa||ca||ba))return void(E[eb]=(D.xPercent||D.yPercent?"translate("+D.xPercent+"%,"+D.yPercent+"%) translate3d(":"translate3d(")+G+"px,"+T+"px,"+ua+"px)"+(1!==la||1!==K?" scale("+la+","+K+")":""));d=h=1;e=f=0}p=1;a=k=l=m=z=q=0;u=ca?-1/ca:0;r=D.zOrigin;v=1E-6;(A=B*R)&&(x=Math.cos(A),J=Math.sin(A),l=-J,z=u*-J,a=d*J,k=f*J,p=x,u*=x,d*=x,f*=x);(A=X*R)&&(x=Math.cos(A),J=Math.sin(A),b=e*x+a*J,C=h*x+k*J,m=p*J,q=u*J,a=e*-J+a*x,k=h*-J+k*x,p*=x,u*=x,e=b,h=C);1!==fa&&(a*=fa,k*=fa,p*=fa,u*=fa);1!==K&&(e*=K,h*=K,m*=K,q*=K);1!==la&&(d*=la,f*=la,l*=la,z*=la);(r||ba)&&(r&&(G+=a*-r,T+=k*-r,ua+=p*-r+r),ba&&(G+=D.xOrigin-(D.xOrigin*d+D.yOrigin*e)+D.xOffset,T+=D.yOrigin-(D.xOrigin*f+D.yOrigin*h)+D.yOffset),v>G&&G>-v&&(G="0"),v>T&&T>-v&&(T="0"),v>ua&&ua>-v&&(ua=0));r=D.xPercent||D.yPercent?"translate("+D.xPercent+"%,"+D.yPercent+"%) matrix3d(":"matrix3d(";r=r+((v>d&&d>-v?"0":d)+","+(v>f&&f>-v?"0":f)+","+(v>l&&l>-v?"0":l))+(","+(v>z&&z>-v?"0":z)+","+(v>e&&e>-v?"0":e)+","+(v>h&&h>-v?"0":h));X||B||1!==fa?(r+=","+(v>m&&m>-v?"0":m)+","+(v>q&&q>-v?"0":q)+","+(v>a&&a>-v?"0":a),r+=","+(v>k&&k>-v?"0":k)+","+(v>p&&p>-v?"0":p)+","+(v>u&&u>-v?"0":u)+","):r+=",0,0,0,0,1,0,";r+=G+","+T+","+ua+","+(ca?1+-ua/ca:1)+")";E[eb]=r},q=Xd.prototype;q.x=q.y=q.z=q.skewX=q.skewY=q.rotation=q.rotationX=q.rotationY=q.zOrigin=q.xPercent=q.yPercent=q.xOffset=q.yOffset=0;q.scaleX=q.scaleY=q.scaleZ=1;Sa("transform,scale,scaleX,scaleY,scaleZ,x,y,z,rotation,rotationX,rotationY,rotationZ,skewX,skewY,shortRotation,shortRotationX,shortRotationY,shortRotationZ,transformOrigin,svgOrigin,transformPerspective,directionalRotation,parseTransform,force3D,skewType,xPercent,yPercent,smoothOrigin",{parser:function(a,b,d,e,h,k,m){if(e._lastParsedTransform===m)return h;e._lastParsedTransform=m;var q,r=m.scale&&"function"==typeof m.scale?m.scale:0;"function"==typeof m[d]&&(q=m[d],m[d]=b);r&&(m.scale=r(p,a));var v,w,x,J,D,C,E,A;b=a._gsTransform;var X=a.style,B=cd.length,la={},K=Rc(a,f,!0,m.parseTransform),fa=m.transform&&("function"==typeof m.transform?m.transform(p,u):m.transform);if(e._transform=K,fa&&"string"==typeof fa&&eb)w=ga.style,w[eb]=fa,w.display="block",w.position="absolute",Y.body.appendChild(ga),v=Rc(ga,null,!1),K.svg&&(D=K.xOrigin,C=K.yOrigin,v.x-=K.xOffset,v.y-=K.yOffset,(m.transformOrigin||m.svgOrigin)&&(fa={},Ke(a,kb(m.transformOrigin),fa,m.svgOrigin,m.smoothOrigin,!0),D=fa.xOrigin,C=fa.yOrigin,v.x-=fa.xOffset-K.xOffset,v.y-=fa.yOffset-K.yOffset),(D||C)&&(E=Xb(ga,!0),v.x-=D-(D*E[0]+C*E[2]),v.y-=C-(D*E[1]+C*E[3]))),Y.body.removeChild(ga),v.perspective||(v.perspective=K.perspective),null!=m.xPercent&&(v.xPercent=wa(m.xPercent,K.xPercent)),null!=m.yPercent&&(v.yPercent=wa(m.yPercent,K.yPercent));else if("object"==typeof m){if(v={scaleX:wa(null!=m.scaleX?m.scaleX:m.scale,K.scaleX),scaleY:wa(null!=m.scaleY?m.scaleY:m.scale,K.scaleY),scaleZ:wa(m.scaleZ,K.scaleZ),x:wa(m.x,K.x),y:wa(m.y,K.y),z:wa(m.z,K.z),xPercent:wa(m.xPercent,K.xPercent),yPercent:wa(m.yPercent,K.yPercent),perspective:wa(m.transformPerspective,K.perspective)},x=m.directionalRotation,null!=x)if("object"==typeof x)for(w in x)m[w]=x[w];else m.rotation=x;"string"==typeof m.x&&-1!==m.x.indexOf("%")&&(v.x=0,v.xPercent=wa(m.x,K.xPercent));"string"==typeof m.y&&-1!==m.y.indexOf("%")&&(v.y=0,v.yPercent=wa(m.y,K.yPercent));v.rotation=Ma("rotation"in m?m.rotation:"shortRotation"in m?m.shortRotation+"_short":"rotationZ"in m?m.rotationZ:K.rotation,K.rotation,"rotation",la);Wb&&(v.rotationX=Ma("rotationX"in m?m.rotationX:"shortRotationX"in m?m.shortRotationX+"_short":K.rotationX||0,K.rotationX,"rotationX",la),v.rotationY=Ma("rotationY"in m?m.rotationY:"shortRotationY"in m?m.shortRotationY+"_short":K.rotationY||0,K.rotationY,"rotationY",la));v.skewX=Ma(m.skewX,K.skewX);v.skewY=Ma(m.skewY,K.skewY)}Wb&&null!=m.force3D&&(K.force3D=m.force3D,J=!0);K.skewType=m.skewType||K.skewType||l.defaultSkewType;for((x=K.force3D||K.z||K.rotationX||K.rotationY||v.z||v.rotationX||v.rotationY||v.perspective)||null==m.scale||(v.scaleZ=1);-1<--B;)A=cd[B],fa=v[A]-K[A],(1E-6fa||null!=m[A]||null!=ta[A])&&(J=!0,h=new db(K,A,K[A],fa,h),A in la&&(h.e=la[A]),h.xs0=0,h.plugin=k,e._overwriteProps.push(h.n));return fa=m.transformOrigin,K.svg&&(fa||m.svgOrigin)&&(D=K.xOffset,C=K.yOffset,Ke(a,kb(fa),v,m.svgOrigin,m.smoothOrigin),h=bd(K,"xOrigin",(b?K:v).xOrigin,v.xOrigin,h,"transformOrigin"),h=bd(K,"yOrigin",(b?K:v).yOrigin,v.yOrigin,h,"transformOrigin"),(D!==K.xOffset||C!==K.yOffset)&&(h=bd(K,"xOffset",b?D:K.xOffset,K.xOffset,h,"transformOrigin"),h=bd(K,"yOffset",b?C:K.yOffset,K.yOffset,h,"transformOrigin")),fa="0px 0px"),(fa||Wb&&x&&K.zOrigin)&&(eb?(J=!0,A=Vb,fa=(fa||z(a,A,f,!1,"50% 50%"))+"",h=new db(X,A,0,0,h,-1,"transformOrigin"),h.b=X[A],h.plugin=k,Wb?(w=K.zOrigin,fa=fa.split(" "),K.zOrigin=(2w?1:0))||""):(w=parseFloat(r),x=r.substr((w+"").length)),""===x&&(x=e[d]||J),x!==J&&(C=la(a,"borderLeft",v,J),E=la(a,"borderTop",v,J),"%"===x?(u=C/h*100+"%",q=E/l*100+"%"):"em"===x?(A=la(a,"borderLeft",1,"em"),u=C/A+"em",q=E/A+"em"):(u=C+"px",q=E+"px"),D&&(r=parseFloat(u)+w+x,p=parseFloat(q)+w+x)),k=Pc(B,X[m],u+" "+q,r+" "+p,!1,"0px",k);return k},prefix:!0,formatter:tc("0px 0px 0px 0px",!1,!0)});Sa("borderBottomLeftRadius,borderBottomRightRadius,borderTopLeftRadius,borderTopRightRadius",{defaultValue:"0px",parser:function(a,b,d,e,h,k){return Pc(a.style,d,this.format(z(a,d,f,!1,"0px 0px")),this.format(b),!1,"0px",h)},prefix:!0,formatter:tc("0px 0px",!1,!0)});Sa("backgroundPosition",{defaultValue:"0 0",parser:function(a,b,d,e,h,l){var m,p,q;d=f||ua(a,null);d=this.format((d?k?d.getPropertyValue("background-position-x")+" "+d.getPropertyValue("background-position-y"):d.getPropertyValue("background-position"):a.currentStyle.backgroundPositionX+" "+a.currentStyle.backgroundPositionY)||"0 0");var u=this.format(b);if(-1!==d.indexOf("%")!=(-1!==u.indexOf("%"))&&2>u.split(",").length&&(m=z(a,"backgroundImage").replace(V,""),m&&"none"!==m)){b=d.split(" ");e=u.split(" ");ja.setAttribute("src",m);for(m=2;-1<--m;)d=b[m],p=-1!==d.indexOf("%"),p!==(-1!==e[m].indexOf("%"))&&(q=0===m?a.offsetWidth-ja.width:a.offsetHeight-ja.height,b[m]=p?parseFloat(d)/100*q+"px":parseFloat(d)/q*100+"%");d=b.join(" ")}return this.parseComplex(a.style,d,u,h,l)},formatter:kb});Sa("backgroundSize",{defaultValue:"0 0",formatter:function(a){return a+="",kb(-1===a.indexOf(" ")?a+" "+a:a)}});Sa("perspective",{defaultValue:"0px",prefix:!0});Sa("perspectiveOrigin",{defaultValue:"50% 50%",prefix:!0});Sa("transformStyle",{prefix:!0});Sa("backfaceVisibility",{prefix:!0});Sa("userSelect",{prefix:!0});Sa("margin",{parser:vd("marginTop,marginRight,marginBottom,marginLeft")});Sa("padding",{parser:vd("paddingTop,paddingRight,paddingBottom,paddingLeft")});Sa("clip",{defaultValue:"rect(0px,0px,0px,0px)",parser:function(a,b,d,e,h,l){var m,p,q;return 9>k?(p=a.currentStyle,q=8>k?" ":",",m="rect("+p.clipTop+q+p.clipRight+q+p.clipBottom+q+p.clipLeft+")",b=this.format(b).split(",").join(q)):(m=this.format(z(a,this.p,f,!1,this.dflt)),b=this.format(b)),this.parseComplex(a.style,m,b,h,l)}});Sa("textShadow",{defaultValue:"0px 0px 0px #999",color:!0,multi:!0});Sa("autoRound,strictUnits",{parser:function(a,b,d,e,f){return f}});Sa("border",{defaultValue:"0px solid #000",parser:function(a,b,d,e,h,k){d=z(a,"borderTopWidth",f,!1,"0px");b=this.format(b).split(" ");e=b[0].replace(F,"");return"px"!==e&&(d=parseFloat(d)/la(a,"borderTopWidth",1,e)+e),this.parseComplex(a.style,this.format(d+" "+z(a,"borderTopStyle",f,!1,"solid")+" "+z(a,"borderTopColor",f,!1,"#000")),b.join(" "),h,k)},color:!0,formatter:function(a){var b=a.split(" ");return b[0]+" "+(b[1]||"solid")+" "+(a.match(hb)||["#000"])[0]}});Sa("borderWidth",{parser:vd("borderTopWidth,borderRightWidth,borderBottomWidth,borderLeftWidth")});Sa("float,cssFloat,styleFloat",{parser:function(a,b,d,e,f,h){a=a.style;e="cssFloat"in a?"cssFloat":"styleFloat";return new db(a,e,0,0,f,-1,d,!1,0,a[e],b)}});var xd=function(a){var b,d=this.t,e=d.filter||z(this.data,"filter")||"";a=this.s+this.c*a|0;100===a&&(-1===e.indexOf("atrix(")&&-1===e.indexOf("radient(")&&-1===e.indexOf("oader(")?(d.removeAttribute("filter"),b=!z(this.data,"filter")):(d.filter=e.replace(H,""),b=!0));b||(this.xn1&&(d.filter=e=e||"alpha(opacity\x3d"+a+")"),-1===e.indexOf("pacity")?0===a&&this.xn1||(d.filter=e+" alpha(opacity\x3d"+a+")"):d.filter=e.replace(L,"opacity\x3d"+a))};Sa("opacity,alpha,autoAlpha",{defaultValue:"1",parser:function(a,b,d,e,h,k){var l=parseFloat(z(a,"opacity",f,!1,"1")),m=a.style,p="autoAlpha"===d;return"string"==typeof b&&"\x3d"===b.charAt(1)&&(b=("-"===b.charAt(0)?-1:1)*parseFloat(b.substr(2))+l),p&&1===l&&"hidden"===z(a,"visibility",f)&&0!==b&&(l=0),na?h=new db(m,"opacity",l,b-l,h):(h=new db(m,"opacity",100*l,100*(b-l),h),h.xn1=p?1:0,m.zoom=1,h.type=2,h.b="alpha(opacity\x3d"+h.s+")",h.e="alpha(opacity\x3d"+(h.s+h.c)+")",h.data=a,h.plugin=k,h.setRatio=xd),p&&(h=new db(m,"visibility",0,0,h,-1,null,!1,0,0!==l?"inherit":"hidden",0===b?"hidden":"inherit"),h.xs0="inherit",e._overwriteProps.push(h.n),e._overwriteProps.push(d)),h}});var ed=function(a,b){b&&(a.removeProperty?(("ms"===b.substr(0,2)||"webkit"===b.substr(0,6))&&(b="-"+b),a.removeProperty(b.replace(M,"-$1").toLowerCase())):a.removeAttribute(b))},zf=function(a){if(this.t._gsClassPT=this,1===a||0===a){this.t.setAttribute("class",0===a?this.b:this.e);for(var b=this.data,d=this.t.style;b;)b.v?d[b.p]=b.v:ed(d,b.p),b=b._next;1===a&&this.t._gsClassPT===this&&(this.t._gsClassPT=null)}else this.t.getAttribute("class")!==this.e&&this.t.setAttribute("class",this.e)};Sa("className",{parser:function(a,b,e,h,k,l,m){var p,z,q,u,r=a.getAttribute("class")||"",v=a.style.cssText;if(k=h._classNamePT=new db(a,e,0,0,k,2),k.setRatio=zf,k.pr=-11,d=!0,k.b=r,e=T(a,f),z=a._gsClassPT){q={};for(u=z.data;u;)q[u.p]=1,u=u._next;z.setRatio(1)}return a._gsClassPT=k,k.e="\x3d"!==b.charAt(1)?b:r.replace(new RegExp("(?:\\s|^)"+b.substr(2)+"(?![\\w-])"),"")+("+"===b.charAt(0)?" "+b.substr(2):""),a.setAttribute("class",k.e),p=Ie(a,e,T(a),m,q),a.setAttribute("class",r),k.data=p.firstMPT,a.style.cssText=v,k.xfirst=h.parse(a,p.difs,k,l)}});var og=function(a){if((1===a||0===a)&&this.data._totalTime===this.data._totalDuration&&"isFromStart"!==this.data.data){var b,d,e,f,h=this.t.style,k=r.transform.parse;if("all"===this.e)h.cssText="",e=!0;else for(a=this.e.split(" ").join("").split(","),d=a.length;-1<--d;)b=a[d],r[b]&&(r[b].parse===k?e=!0:b="transformOrigin"===b?Vb:r[b].p),ed(h,b);e&&(ed(h,eb),f=this.t._gsTransform,f&&(f.svg&&(this.t.removeAttribute("data-svg-origin"),this.t.removeAttribute("transform")),delete this.t._gsTransform))}};Sa("clearProps",{parser:function(a,b,e,f,h){return h=new db(a,e,0,0,h,2),h.setRatio=og,h.e=b,h.pr=-10,h.data=f._tn,d=!0,h}});q=["bezier","throwProps","physicsProps","physics2D"];for(lb=q.length;lb--;)ng(q[lb]);q=l.prototype;q._firstPT=q._lastParsedTransform=q._transform=null;q._onInitTn=function(a,b,k,m){if(!a.nodeType)return!1;this._target=u=a;this._tn=k;this._vars=b;p=m;x=b.autoRound;d=!1;e=b.suffixMap||l.suffixMap;f=ua(a,"");h=this._overwriteProps;var q,w,J,D,C;m=a.style;if(G&&""===m.zIndex&&(q=z(a,"zIndex",f),("auto"===q||""===q)&&this._addLazySet(m,"zIndex",0)),"string"==typeof b&&(D=m.cssText,q=T(a,f),m.cssText=D+";"+b,q=Ie(a,q,T(a)).difs,!na&&A.test(b)&&(q.opacity=parseFloat(RegExp.$1)),b=q,m.cssText=D),b.className?this._firstPT=w=r.className.parse(a,b.className,"className",this,null,null,b):this._firstPT=w=this.parse(a,b,null),this._transformType){b=3===this._transformType;eb?B&&(G=!0,""===m.zIndex&&(J=z(a,"zIndex",f),("auto"===J||""===J)&&this._addLazySet(m,"zIndex",0)),v&&this._addLazySet(m,"WebkitBackfaceVisibility",this._vars.WebkitBackfaceVisibility||(b?"visible":"hidden"))):m.zoom=1;for(J=w;J&&J._next;)J=J._next;b=new db(a,"transform",0,0,null,2);this._linkCSSP(b,null,J);b.setRatio=eb?Le:Yb;b.data=this._transform||Rc(a,f,!0);b.tn=k;b.pr=-1;h.pop()}if(d){for(;w;){a=w._next;for(J=D;J&&J.pr>w.pr;)J=J._next;(w._prev=J?J._prev:C)?w._prev._next=w:D=w;(w._next=J)?J._prev=w:C=w;w=a}this._firstPT=D}return!0};q.parse=function(a,b,d,h){var k,l,m,q,v,w,J,C,E,A=a.style;for(k in b){v=b[k];"function"==typeof v&&(v=v(p,u));if(l=r[k])d=l.parse(a,v,k,this,d,h,b);else if(l=z(a,k,f)+"",C="string"==typeof v,"color"===k||"fill"===k||"stroke"===k||-1!==k.indexOf("Color")||C&&D.test(v))C||(v=ud(v),v=(3b&&-1E-6r?r+d:r-d)),-1!==h.indexOf("_cw")&&0>r?r=(r+9999999999*d)%d-(r/d|0)*d:-1!==h.indexOf("ccw")&&0r)&&(this._addTn(a,f,l,l+r,f),this._overwriteProps.push(f)));return!0},set:function(a){if(1!==a)this._super.setRatio.call(this,a);else for(a=this._firstPT;a;)a.f?a.t[a.p](this.finals[a.p]):a.t[a.p]=this.finals[a.p],a=a._next}})._autoCSS=!0;_gsScope._gsDefine("easing.Back",["easing.Ease"],function(a){var b,d,e,f=_gsScope.GreenSockGlobals||_gsScope,h=2*Math.PI,l=Math.PI/2,m=f.com.greensock._class,r=function(b,d){var e=m("easing."+b,function(){},!0),f=e.prototype=new a;return f.constructor=e,f.getRatio=d,e},q=a.register||function(){},x=function(a,b,d,e,f){b=m("easing."+a,{easeOut:new b,easeIn:new d,easeInOut:new e},!0);return q(b,a),b},G=function(a,b,d){this.t=a;this.v=b;d&&(this.next=d,d.prev=this,this.c=d.v-b,this.gap=d.t-a)},B=function(b,d){var e=m("easing."+b,function(a){this._p1=a||0===a?a:1.70158;this._p2=1.525*this._p1},!0),f=e.prototype=new a;return f.constructor=e,f.getRatio=d,f.config=function(a){return new e(a)},e},B=x("Back",B("BackOut",function(a){return--a*a*((this._p1+1)*a+this._p1)+1}),B("BackIn",function(a){return a*a*((this._p1+1)*a-this._p1)}),B("BackInOut",function(a){return 1>(a*=2)?.5*a*a*((this._p2+1)*a-this._p2):.5*((a-=2)*a*((this._p2+1)*a+this._p2)+2)})),w=m("easing.SlowMo",function(a,b,d){null==a?a=.7:1this._p3?this._calcEnd?1-(a=(a-this._p3)/this._p1)*a:b+(a-b)*(a=(a-this._p3)/this._p1)*a*a*a:this._calcEnd?1:b},w.ease=new w(.7,.7),v.config=w.config=function(a,b,d){return new w(a,b,d)},b=m("easing.SteppedEase",function(a){a=a||1;this._p1=1/a;this._p2=a+1},!0),v=b.prototype=new a,v.constructor=b,v.getRatio=function(a){return 0>a?a=0:1<=a&&(a=.999999999),(this._p2*a>>0)*this._p1},v.config=b.config=function(a){return new b(a)},d=m("easing.RoughEase",function(b){b=b||{};for(var d,e,f,h,l=b.taper||"none",k=[],m=0,q=h=0|(b.points||20),r=!1!==b.randomize,v=!0===b.clamp,w=b.template instanceof a?b.template:null,x="number"==typeof b.strength?.4*b.strength:.4;-1<--q;)b=r?Math.random():1/h*q,d=w?w.getRatio(b):b,"none"===l?e=x:"out"===l?(f=1-b,e=f*f*x):"in"===l?e=b*b*x:.5>b?(f=2*b,e=f*f*.5*x):(f=2*(1-b),e=f*f*.5*x),r?d+=Math.random()*e-.5*e:q%2?d+=.5*e:d-=.5*e,v&&(1d&&(d=0)),k[m++]={x:b,y:d};k.sort(function(a,b){return a.x-b.x});e=new G(1,1,null);for(q=h;-1<--q;)h=k[q],e=new G(h.x,h.y,e);this._prev=new G(0,0,0!==e.t?e:e.next)},!0),v=d.prototype=new a,v.constructor=d,v.getRatio=function(a){var b=this._prev;if(a>b.t){for(;b.next&&a>=b.t;)b=b.next;b=b.prev}else for(;b.prev&&a<=b.t;)b=b.prev;return this._prev=b,b.v+(a-b.t)/b.gap*b.c},v.config=function(a){return new d(a)},d.ease=new d,x("Bounce",r("BounceOut",function(a){return 1/2.75>a?7.5625*a*a:2/2.75>a?7.5625*(a-=1.5/2.75)*a+.75:2.5/2.75>a?7.5625*(a-=2.25/2.75)*a+.9375:7.5625*(a-=2.625/2.75)*a+.984375}),r("BounceIn",function(a){return(a=1-a)<1/2.75?1-7.5625*a*a:2/2.75>a?1-(7.5625*(a-=1.5/2.75)*a+.75):2.5/2.75>a?1-(7.5625*(a-=2.25/2.75)*a+.9375):1-(7.5625*(a-=2.625/2.75)*a+.984375)}),r("BounceInOut",function(a){var b=.5>a;return a=b?1-2*a:2*a-1,a=1/2.75>a?7.5625*a*a:2/2.75>a?7.5625*(a-=1.5/2.75)*a+.75:2.5/2.75>a?7.5625*(a-=2.25/2.75)*a+.9375:7.5625*(a-=2.625/2.75)*a+.984375,b?.5*(1-a):.5*a+.5})),x("Circ",r("CircOut",function(a){return Math.sqrt(1- --a*a)}),r("CircIn",function(a){return-(Math.sqrt(1-a*a)-1)}),r("CircInOut",function(a){return 1>(a*=2)?-.5*(Math.sqrt(1-a*a)-1):.5*(Math.sqrt(1-(a-=2)*a)+1)})),e=function(b,d,e){var f=m("easing."+b,function(a,b){this._p1=1<=a?a:1;this._p2=(b||e)/(1>a?a:1);this._p3=this._p2/h*(Math.asin(1/this._p1)||0);this._p2=h/this._p2},!0);b=f.prototype=new a;return b.constructor=f,b.getRatio=d,b.config=function(a,b){return new f(a,b)},f},x("Elastic",e("ElasticOut",function(a){return this._p1*Math.pow(2,-10*a)*Math.sin((a-this._p3)*this._p2)+1},.3),e("ElasticIn",function(a){return-(this._p1*Math.pow(2,10*--a)*Math.sin((a-this._p3)*this._p2))},.3),e("ElasticInOut",function(a){return 1>(a*=2)?-.5*this._p1*Math.pow(2,10*--a)*Math.sin((a-this._p3)*this._p2):this._p1*Math.pow(2,-10*--a)*Math.sin((a-this._p3)*this._p2)*.5+1},.45)),x("Expo",r("ExpoOut",function(a){return 1-Math.pow(2,-10*a)}),r("ExpoIn",function(a){return Math.pow(2,10*(a-1))-.001}),r("ExpoInOut",function(a){return 1>(a*=2)?.5*Math.pow(2,10*(a-1)):.5*(2-Math.pow(2,-10*(a-1)))})),x("Sine",r("SineOut",function(a){return Math.sin(a*l)}),r("SineIn",function(a){return-Math.cos(a*l)+1}),r("SineInOut",function(a){return-.5*(Math.cos(Math.PI*a)-1)})),m("easing.EaseLookup",{find:function(b){return a.map[b]}},!0),q(f.SlowMo,"SlowMo","ease,"),q(d,"RoughEase","ease,"),q(b,"SteppedEase","ease,"),B},!0)});_gsScope._gsDefine&&_gsScope._gsQueue.pop()();(function(a,b){var d={},e=a.document,f=a.GreenSockGlobals=a.GreenSockGlobals||a;if(!f.TnLite){var h,l,m,r,q,x=function(a){var b=a.split("."),d=f;for(a=0;aa?2*a:2*(1-a);return 1===d?e*=e:2===d?e*=e*e:3===d?e*=e*e*e:4===d&&(e*=e*e*e*e),1===b?1-e:2===b?e:.5>a?e/2:1-e/2};h=["Linear","Quad","Cubic","Quart","Quint,Strong"];for(l=h.length;-1<--l;)m=h[l]+",Power"+l,F(new W(null,null,1,l),m,"easeOut",!0),F(new W(null,null,2,l),m,"easeIn"+(0===l?",easeNone":"")),F(new W(null,null,3,l),m,"easeInOut");aa.linear=G.easing.Linear.easeIn;aa.swing=G.easing.Quad.easeInOut;var L=E("events.EventDispatcher",function(a){this._listeners={};this._eventTarget=a||this});m=L.prototype;m.addEventListener=function(a,b,d,e,f){f=f||0;var h,l=this._listeners[a],k=0;this!==r||q||r.wake();null==l&&(this._listeners[a]=l=[]);for(h=l.length;-1<--h;)a=l[h],a.c===b&&a.s===d?l.splice(h,1):0===k&&a.pru&&(p+=b-v);M+=b;m.time=(M-p)/1E3;b=m.time-k;(!d||0=l?.004:l-b),e=!0);!0!==a&&(h=f(J));e&&m.dispatchEvent("tick")};L.call(m);m.time=m.frame=0;m.tick=function(){J(!0)};m.lagSmoothing=function(a,b){u=a||1E10;v=Math.min(b,u,0)};m.sleep=function(){null!=h&&(z&&H?H(h):clearTimeout(h),f=w,h=null,m===r&&(q=!1))};m.wake=function(a){null!==h?m.sleep():a?p+=-M+(M=D()):10m.frame&&"hidden"!==e.visibilityState&&m.useRAF(!1)},1500)});m=G.Ticker.prototype=new G.events.EventDispatcher;m.constructor=G.Ticker;var N=E("core.Animation",function(a,b){if(this.vars=b=b||{},this._duration=this._totalDuration=a||0,this._delay=Number(b.delay)||0,this._timeScale=1,this._active=!0===b.immediateRender,this.data=b.data,this._reversed=!0===b.reversed,ka){q||r.wake();var d=this.vars.useFrames?ja:ka;d.add(this,d._time);this.vars.paused&&this.paused(!0)}});r=N.ticker=new G.Ticker;m=N.prototype;m._dirty=m._gc=m._initted=m._paused=!1;m._totalTime=m._time=0;m._rawPrevTime=-1;m._next=m._last=m._onUpdate=m._timeline=m.timeline=null;m._paused=!1;var V=function(){q&&2E3=d&&athis._duration?this._duration:a,b)):this._time};m.totalTime=function(a,b,d){if(q||r.wake(),!arguments.length)return this._totalTime;if(this._timeline){if(0>a&&!d&&(a+=this.totalDuration()),this._timeline.smoothChildTiming){this._dirty&&this.totalDuration();var e=this._totalDuration,f=this._timeline;if(a>e&&!d&&(a=e),this._startTime=(this._paused?this._pauseTime:f._time)-(this._reversed?e-a:a)/this._timeScale,f._dirty||this._uncache(!1),f._timeline)for(;f._timeline;)f._timeline._time!==(f._startTime+f._totalTime)/f._timeScale&&f.totalTime(f._totalTime,!0),f=f._timeline}this._gc&&this._enabled(!0,!1);(this._totalTime!==a||0===this._duration)&&(K.length&&na(),this.render(a,b,!1),K.length&&na())}return this};m.progress=m.totalProgress=function(a,b){var d=this.duration();return arguments.length?this.totalTime(d*a,b):d?this._time/d:this.ratio};m.startTime=function(a){return arguments.length?(a!==this._startTime&&(this._startTime=a,this.timeline&&this.timeline._sortChildren&&this.timeline.add(this,a-this._delay)),this):this._startTime};m.endTime=function(a){return this._startTime+(0!=a?this.totalDuration():this.duration())/this._timeScale};m.timeScale=function(a){if(!arguments.length)return this._timeScale;if(a=a||1E-10,this._timeline&&this._timeline.smoothChildTiming){var b=this._pauseTime,b=b||0===b?b:this._timeline.totalTime();this._startTime=b-(b-this._startTime)*this._timeScale/a}return this._timeScale=a,this._uncache(!1)};m.reversed=function(a){return arguments.length?(a!=this._reversed&&(this._reversed=a,this.totalTime(this._timeline&&!this._timeline.smoothChildTiming?this.totalDuration()-this._totalTime:this._totalTime,!0)),this):this._reversed};m.paused=function(a){if(!arguments.length)return this._paused;var b,d,e=this._timeline;return a!=this._paused&&e&&(q||a||r.wake(),b=e.rawTime(),d=b-this._pauseTime,!a&&e.smoothChildTiming&&(this._startTime+=d,this._uncache(!1)),this._pauseTime=a?b:null,this._paused=a,this._active=this.isActive(),!a&&0!==d&&this._initted&&this.duration()&&(b=e.smoothChildTiming?this._totalTime:(b-this._startTime)/this._timeScale,this.render(b,b===this._totalTime,!0))),this._gc&&!a&&this._enabled(!0,!1),this};h=E("core.SimpleTimeline",function(a){N.call(this,0,a);this.autoRemoveChildren=this.smoothChildTiming=!0});m=h.prototype=new N;m.constructor=h;m.kill()._gc=!1;m._first=m._last=m._recent=null;m._sortChildren=!1;m.add=m.insert=function(a,b,d,e){if(a._startTime=Number(b||0)+a._delay,a._paused&&this!==a._timeline&&(a._pauseTime=a._startTime+(this.rawTime()-a._startTime)/a._timeScale),a.timeline&&a.timeline._remove(a,!0),a.timeline=a._timeline=this,a._gc&&a._enabled(!0,!0),b=this._last,this._sortChildren)for(d=a._startTime;b&&b._startTime>d;)b=b._prev;return b?(a._next=b._next,b._next=a):(a._next=this._first,this._first=a),a._next?a._next._prev=a:this._last=a,a._prev=b,this._recent=a,this._timeline&&this._uncache(!0),this};m._remove=function(a,b){return a.timeline===this&&(b||a._enabled(!1,!0),a._prev?a._prev._next=a._next:this._first===a&&(this._first=a._next),a._next?a._next._prev=a._prev:this._last===a&&(this._last=a._prev),a._next=a._prev=a.timeline=null,a===this._recent&&(this._recent=this._last),this._timeline&&this._uncache(!0)),this};m.render=function(a,b,d){var e,f=this._first;for(this._totalTime=this._time=this._rawPrevTime=a;f;)e=f._next,(f._active||a>=f._startTime&&!f._paused)&&(f._reversed?f.render((f._dirty?f.totalDuration():f._totalDuration)-(a-f._startTime)*f._timeScale,b,d):f.render((a-f._startTime)*f._timeScale,b,d)),f=e};m.rawTime=function(){return q||r.wake(),this._totalTime};var Q=E("TnLite",function(b,d,e){if(N.call(this,d,e),this.render=Q.prototype.render,null==b)throw"Cannot tn a null target.";this.target=b="string"!=typeof b?b:Q.selector(b)||b;var f,h;f=b.jquery||b.length&&b!==a&&b[0]&&(b[0]===a||b[0].nodeType&&b[0].style&&!b.nodeType);e=this.vars.overwrite;if(this._overwrite=e=null==e?ga[Q.defaultOverwrite]:"number"==typeof e?e>>0:ga[e],(f||b instanceof Array||b.push&&v(b))&&"number"!=typeof b[0])for(this._targets=h=B(b),this._propLookup=[],this._siblings=[],b=0;bb&&-1E-6e;e++)k=d[e],l=b.substr(p,b.indexOf(k,p)-p),q+=l||!e?l:",",p+=l.length,z?z=(z+1)%5:"rgba("===l.substr(-5)&&(z=1),k===a[e]||a.length<=e?q+=k:(q&&(m.push(q),q=""),f=parseFloat(a[e]),m.push(f),m._firstPT={_next:m._firstPT,t:m,p:m.length-1,s:f,c:("\x3d"===k.charAt(1)?parseInt(k.charAt(0)+"1",10)*parseFloat(k.substr(2)):parseFloat(k)-f)||0,f:0,m:z&&4>z?Math.round:0}),p+=k.length;return q+=b.substr(p),q&&m.push(q),m.setRatio=Na,m},Z=function(a,b,d,e,f,h,l,k,m){"function"==typeof e&&(e=e(m||0,a));var p;m=typeof a[b];var q="function"!==m?"":b.indexOf("set")||"function"!=typeof a["get"+b.substr(3)]?b:"get"+b.substr(3);d="get"!==d?d:q?l?a[q](l):a[q]():a[b];q="string"==typeof e&&"\x3d"===e.charAt(1);a={t:a,p:b,s:d,f:"function"===m,pg:0,n:f||b,m:h?"function"==typeof h?h:Math.round:0,pr:0,c:q?parseInt(e.charAt(0)+"1",10)*parseFloat(e.substr(2)):parseFloat(e)-d||0};return("number"!=typeof d||"number"!=typeof e&&!q)&&(l||isNaN(d)||!q&&isNaN(e)||"boolean"==typeof d||"boolean"==typeof e?(a.fp=l,p=R(d,q?a.s+a.c:e,k||Q.defaultStringFilter,a),a={t:p,p:"setRatio",s:0,c:1,f:2,pg:0,n:f||b,pr:0,m:0}):(a.s=parseFloat(d),q||(a.c=parseFloat(e)-a.s||0))),a.c?((a._next=this._firstPT)&&(a._next._prev=a),this._firstPT=a,a):void 0};l=Q._internals={isArray:v,isSelector:J,lazyTns:K,blobDif:R};var ta=Q._plugins={},da=l.tnLookup={},Y=0,S=l.reservedProps={ease:1,delay:1,overwrite:1,onComplete:1,onCompleteParams:1,onCompleteScope:1,useFrames:1,runBackwards:1,startAt:1,onUpdate:1,onUpdateParams:1,onUpdateScope:1,onStart:1,onStartParams:1,onStartScope:1,onReverseComplete:1,onReverseCompleteParams:1,onReverseCompleteScope:1,onRepeat:1,onRepeatParams:1,onRepeatScope:1,easeParams:1,yoyo:1,immediateRender:1,repeat:1,repeatDelay:1,data:1,paused:1,reversed:1,autoCSS:1,lazy:1,onOverwrite:1,callbackScope:1,stringFilter:1,id:1},ga={none:0,all:1,auto:2,concurrent:3,allOnStart:4,preexisting:5,"true":1,"false":0},ja=N._rootFramesTimeline=new h,ka=N._rootTimeline=new h,ha=30,na=l.lazyRender=function(){var a,b=K.length;for(ba={};-1<--b;)(a=K[b])&&!1!==a._lazy&&(a.render(a._lazy[0],a._lazy[1],!0),a._lazy=!1);K.length=0};ka._startTime=r.time;ja._startTime=r.frame;ka._active=ja._active=!0;setTimeout(na,1);N._updateRoot=Q.render=function(){var a,b,d;if(K.length&&na(),ka.render((r.time-ka._startTime)*ka._timeScale,!1,!1),ja.render((r.frame-ja._startTime)*ja._timeScale,!1,!1),K.length&&na(),r.frame>=ha){ha=r.frame+(parseInt(Q.autoSleep,10)||120);for(d in da){b=da[d].tns;for(a=b.length;-1<--a;)b[a]._gc&&b.splice(a,1);0===b.length&&delete da[d]}if(d=ka._first,(!d||d._paused)&&Q.autoSleep&&!ja._first&&1===r._listeners.tick.length){for(;d&&d._paused;)d=d._next;d||r.sleep()}}};r.addEventListener("tick",N._updateRoot);var Oa=function(a,b,d){var e,f,h=a._gsTnID;if(da[h||(a._gsTnID=h="t"+Y++)]||(da[h]={target:a,tns:[]}),b&&(e=da[h].tns,e[f=e.length]=b,d))for(;-1<--f;)e[f]===b&&e.splice(f,1);return da[h].tns},Ea=function(a,b,d,e){var f,h,l=a.vars.onOverwrite;return l&&(f=l(a,b,d,e)),l=Q.onOverwrite,l&&(h=l(a,b,d,e)),!1!==f&&!1!==h},X=function(a,b,d,e,f){var h,l,k;if(1===e||4<=e){d=f.length;for(h=0;d>h;h++)if((k=f[h])!==b)k._gc||k._kill(null,a,b)&&(l=!0);else if(5===e)break;return l}var m,p=b._startTime+1E-10,q=[],z=0,r=0===b._duration;for(h=f.length;-1<--h;)(k=f[h])===b||k._gc||k._paused||(k._timeline!==b._timeline?(m=m||Hb(b,0,r),0===Hb(k,m,r)&&(q[z++]=k)):k._startTime<=p&&k._startTime+k.totalDuration()/k._timeScale>p&&((r||!k._initted)&&2E-10>=p-k._startTime||(q[z++]=k)));for(h=z;-1<--h;)(k=q[h],2===e&&k._kill(d,a,b)&&(l=!0),2!==e||!k._firstPT&&k._initted)&&(2===e||Ea(k,b))&&k._enabled(!1,!1)&&(l=!0);return l},Hb=function(a,b,d){for(var e=a._timeline,f=e._timeScale,h=a._startTime;e._timeline;){if(h+=e._startTime,f*=e._timeScale,e._paused)return-100;e=e._timeline}return h/=f,h>b?h-b:d&&h===b||!a._initted&&2E-10>h-b?1E-10:(h+=a.totalDuration()/a._timeScale/f)>b+1E-10?0:h-b-1E-10};m._init=function(){var a,b,d,e,f=this.vars,h=this._overwrittenProps,l=this._duration;e=!!f.immediateRender;var k=f.ease;if(f.startAt){this._startAt&&(this._startAt.render(-1,!0),this._startAt.kill());d={};for(a in f.startAt)d[a]=f.startAt[a];if(d.overwrite=!1,d.immediateRender=!0,d.lazy=e&&!1!==f.lazy,d.startAt=d.delay=null,this._startAt=Q.to(this.target,0,d),e)if(0a;a++)this._initProps(this._targets[a],this._propLookup[a]={},this._siblings[a],h?h[a]:null,a)&&(b=!0);else b=this._initProps(this.target,this._propLookup,this._siblings,h,0);if(b&&Q._onPluginEvent("_onInitAllProps",this),h&&(this._firstPT||"function"!=typeof this.target&&this._enabled(!1,!1)),f.runBackwards)for(d=this._firstPT;d;)d.s+=d.c,d.c=-d.c,d=d._next;this._onUpdate=f.onUpdate;this._initted=!0};m._initProps=function(b,d,e,f,h){var l,k,m,p,q;if(null==b)return!1;ba[b._gsTnID]&&na();if(!this.vars.css&&b.style&&b!==a&&b.nodeType&&ta.css&&!1!==this.vars.autoCSS){k=this.vars;var r={};for(q in k)S[q]||q in b&&"transform"!==q&&"x"!==q&&"y"!==q&&"width"!==q&&"height"!==q&&"className"!==q&&"border"!==q||!(!ta[q]||ta[q]&&ta[q]._autoCSS)||(r[q]=k[q],delete k[q]);k.css=r}for(l in this.vars)if(k=this.vars[l],S[l])k&&(k instanceof Array||k.push&&v(k))&&-1!==k.join("").indexOf("{self}")&&(this.vars[l]=this._swapSelfInParams(k,this));else if(ta[l]&&(p=new ta[l])._onInitTn(b,this.vars[l],this,h)){this._firstPT=q={_next:this._firstPT,t:p,p:"setRatio",s:0,c:1,f:1,n:l,pg:1,pr:p._priority,m:0};for(k=p._overwriteProps.length;-1<--k;)d[p._overwriteProps[k]]=this._firstPT;(p._priority||p._onInitAllProps)&&(m=!0);(p._onDisable||p._onEnable)&&(this._notifyPluginsOfEnabled=!0);q._next&&(q._next._prev=q)}else d[l]=Z.call(this,b,l,"get",k,l,0,null,this.vars.stringFilter,h);return f&&this._kill(f,b)?this._initProps(b,d,e,f,h):1=m-1E-7&&0<=a)this._totalTime=this._time=m,this.ratio=this._ease._calcEnd?this._ease.getRatio(1):1,this._reversed||(e=!0,f="onComplete",d=d||this._timeline.autoRemoveChildren),0===m&&(this._initted||!this.vars.lazy||d)&&(this._startTime===this._timeline._duration&&(a=0),(0>h||0>=a&&-1E-7<=a||1E-10===h&&"isPause"!==this.data)&&h!==a&&(d=!0,1E-10a)this._totalTime=this._time=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0,(0!==k||0===m&&0a&&(this._active=!1,0===m&&(this._initted||!this.vars.lazy||d)&&(0<=h&&(1E-10!==h||"isPause"!==this.data)&&(d=!0),this._rawPrevTime=l=!b||a||h===a?a:1E-10)),this._initted||(d=!0);else if(this._totalTime=this._time=a,this._easeType){var p=a/m,q=this._easeType,r=this._easePower;(1===q||3===q&&.5<=p)&&(p=1-p);3===q&&(p*=2);1===r?p*=p:2===r?p*=p*p:3===r?p*=p*p*p:4===r&&(p*=p*p*p*p);1===q?this.ratio=1-p:2===q?this.ratio=p:.5>a/m?this.ratio=p/2:this.ratio=1-p/2}else this.ratio=this._ease.getRatio(a/m);if(this._time!==k||d){if(!this._initted){if(this._init(),!this._initted||this._gc)return;if(!d&&this._firstPT&&(!1!==this.vars.lazy&&this._duration||this.vars.lazy&&!this._duration))return this._time=this._totalTime=k,this._rawPrevTime=h,K.push(this),void(this._lazy=[a,b]);this._time&&!e?this.ratio=this._ease.getRatio(this._time/m):e&&this._ease._calcEnd&&(this.ratio=this._ease.getRatio(0===this._time?0:1))}!1!==this._lazy&&(this._lazy=!1);this._active||!this._paused&&this._time!==k&&0<=a&&(this._active=!0);0!==k||(this._startAt&&(0<=a?this._startAt.render(a,b,d):f||(f="_dummyGS")),!this.vars.onStart||0===this._time&&0!==m||!b&&this._callback("onStart"));for(h=this._firstPT;h;)h.f?h.t[h.p](h.c*this.ratio+h.s):h.t[h.p]=h.c*this.ratio+h.s,h=h._next;this._onUpdate&&(0>a&&this._startAt&&-1E-4!==a&&this._startAt.render(a,b,d),b||(this._time!==k||e||d)&&this._callback("onUpdate"));f&&(!this._gc||d)&&(0>a&&this._startAt&&!this._onUpdate&&-1E-4!==a&&this._startAt.render(a,b,d),e&&(this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!b&&this.vars[f]&&this._callback(f),0===m&&1E-10===this._rawPrevTime&&1E-10!==l&&(this._rawPrevTime=0))}};m._kill=function(a,b,d){if("all"===a&&(a=null),null==a&&(null==b||b===this.target))return this._lazy=!1,this._enabled(!1,!1);b="string"!=typeof b?b||this._targets||this.target:Q.selector(b)||b;var e,f,h,l,k,m,p,q,r=d&&this._time&&d._startTime===this._startTime&&this._timeline===d._timeline;if((v(b)||J(b))&&"number"!=typeof b[0])for(e=b.length;-1<--e;)this._kill(a,b[e],d)&&(m=!0);else{if(this._targets)for(e=this._targets.length;-1<--e;){if(b===this._targets[e]){k=this._propLookup[e]||{};this._overwrittenProps=this._overwrittenProps||[];f=this._overwrittenProps[e]=a?this._overwrittenProps[e]||{}:"all";break}}else{if(b!==this.target)return!1;k=this._propLookup;f=this._overwrittenProps=a?this._overwrittenProps||{}:"all"}if(k){if(e=a||k,p=a!==f&&"all"!==f&&a!==k&&("object"!=typeof a||!a._tempKill),d&&(Q.onOverwrite||this.vars.onOverwrite)){for(h in e)k[h]&&(q||(q=[]),q.push(h));if((q||!a)&&!Ea(this,d,b,q))return!1}for(h in e)(l=k[h])&&(r&&(l.f?l.t[l.p](l.s):l.t[l.p]=l.s,m=!0),l.pg&&l.t._kill(e)&&(m=!0),l.pg&&0!==l.t._overwriteProps.length||(l._prev?l._prev._next=l._next:l===this._firstPT&&(this._firstPT=l._next),l._next&&(l._next._prev=l._prev),l._next=l._prev=null),delete k[h]),p&&(f[h]=1);!this._firstPT&&this._initted&&this._enabled(!1,!1)}}return m};m.invalidate=function(){return this._notifyPluginsOfEnabled&&Q._onPluginEvent("_onDisable",this),this._firstPT=this._overwrittenProps=this._startAt=this._onUpdate=null,this._notifyPluginsOfEnabled=this._active=this._lazy=!1,this._propLookup=this._targets?{}:[],N.prototype.invalidate.call(this),this.vars.immediateRender&&(this._time=-1E-10,this.render(Math.min(0,-this._delay))),this};m._enabled=function(a,b){if(q||r.wake(),a&&this._gc){var d,e=this._targets;if(e)for(d=e.length;-1<--d;)this._siblings[d]=Oa(e[d],this,!0);else this._siblings=Oa(this.target,this,!0)}return N.prototype._enabled.call(this,a,b),this._notifyPluginsOfEnabled&&this._firstPT?Q._onPluginEvent(a?"_onEnable":"_onDisable",this):!1};Q.to=function(a,b,d){return new Q(a,b,d)};Q.from=function(a,b,d){return d.runBackwards=!0,d.immediateRender=0!=d.immediateRender,new Q(a,b,d)};Q.fromTo=function(a,b,d,e){return e.startAt=d,e.immediateRender=0!=e.immediateRender&&0!=d.immediateRender,new Q(a,b,e)};Q.delayedCall=function(a,b,d,e,f){return new Q(b,0,{delay:a,onComplete:b,onCompleteParams:d,callbackScope:e,onReverseComplete:b,onReverseCompleteParams:d,immediateRender:!1,lazy:!1,useFrames:f,overwrite:0})};Q.set=function(a,b){return new Q(a,0,b)};Q.getTnsOf=function(a,b){if(null==a)return[];a="string"!=typeof a?a:Q.selector(a)||a;var d,e,f,h;if((v(a)||J(a))&&"number"!=typeof a[0]){d=a.length;for(e=[];-1<--d;)e=e.concat(Q.getTnsOf(a[d],b));for(d=e.length;-1<--d;)for(h=e[d],f=d;-1<--f;)h===e[f]&&e.splice(d,1)}else for(e=Oa(a).concat(),d=e.length;-1<--d;)(e[d]._gc||b&&!e[d].isActive())&&e.splice(d,1);return e};Q.killTnsOf=Q.killDelayedCallsTo=function(a,b,d){"object"==typeof b&&(d=b,b=!1);b=Q.getTnsOf(a,b);for(var e=b.length;-1<--e;)b[e]._kill(d,a)};var ua=E("plugins.TnPlugin",function(a,b){this._overwriteProps=(a||"").split(",");this._propName=this._overwriteProps[0];this._priority=b||0;this._super=ua.prototype},!0);if(m=ua.prototype,ua.version="1.19.0",ua.API=2,m._firstPT=null,m._addTn=Z,m.setRatio=Na,m._kill=function(a){var b,d=this._overwriteProps,e=this._firstPT;if(null!=a[this._propName])this._overwriteProps=[];else for(b=d.length;-1<--b;)null!=a[d[b]]&&d.splice(b,1);for(;e;)null!=a[e.n]&&(e._next&&(e._next._prev=e._prev),e._prev?(e._prev._next=e._next,e._prev=null):this._firstPT===e&&(this._firstPT=e._next)),e=e._next;return!1},m._mod=m._roundProps=function(a){for(var b,d=this._firstPT;d;)(b=a[this._propName]||null!=d.n&&a[d.n.split(this._propName+"_").join("")])&&"function"==typeof b&&(2===d.f?d.t._applyPT.m=b:d.m=b),d=d._next},Q._onPluginEvent=function(a,b){var d,e,f,h,l,k=b._firstPT;if("_onInitAllProps"===a){for(;k;){l=k._next;for(e=f;e&&e.pr>k.pr;)e=e._next;(k._prev=e?e._prev:h)?k._prev._next=k:f=k;(k._next=e)?e._prev=k:h=k;k=l}k=b._firstPT=f}for(;k;)k.pg&&"function"==typeof k.t[a]&&k.t[a]()&&(d=!0),k=k._next;return d},ua.activate=function(a){for(var b=a.length;-1<--b;)a[b].API===ua.API&&(ta[(new a[b])._propName]=a[b]);return!0},p.plugin=function(a){if(!(a&&a.propName&&a.init&&a.API))throw"illegal plugin definition.";var b,d=a.propName,e=a.priority||0,f=a.overwriteProps,h={init:"_onInitTn",set:"setRatio",kill:"_kill",round:"_mod",mod:"_mod",initAll:"_onInitAllProps"},l=E("plugins."+d.charAt(0).toUpperCase()+d.substr(1)+"Plugin",function(){ua.call(this,d,e);this._overwriteProps=f||[]},!0===a.global),k=l.prototype=new ua(d);k.constructor=l;l.API=a.API;for(b in h)"function"==typeof a[b]&&(k[h[b]]=a[b]);return l.version=a.version,ua.activate([l]),l},h=a._gsQueue){for(l=0;la&&(G_5.zd=.3*GLE_zd);requestAnimationFrame(animate);render();G_21&&G_1.update();G_28&&G_5.update()}function LodProcess(){for(var a=0;ad?e&&0>a[d].name.indexOf("-high")&&(b=a[d].name.indexOf("_"),e=a[d].name.substr(0,b),b=("ids/"+a[d].name.substr(b+1,a[d].name.length)).replace("-low",".glb").replace("-medium",".glb").replace("-high",".glb"),LoadSingleObj(G_12[a[d].tx],b,e,"high",a[d].name)):e&&0>a[d].name.indexOf("-low")&&(b=a[d].name.indexOf("_"),e=a[d].name.substr(0,b),b=("ids/"+a[d].name.substr(b+1,a[d].name.length)).replace("-low",".glb").replace("-medium",".glb").replace("-high",".glb"),LoadSingleObj(G_12[a[d].tx],b,e,"low",a[d].name));G_7=!0;bprocess=!1}}function DeleteModel(a){if(a=G_34.ge(a))G_34.remove(a),a.geometry.dispose(),a.material.dispose()}function render(){G_7&&(G_4.setViewport(0,0,G_0.offsetWidth,G_0.offsetHeight),G_4.render(G_3,G_2),TN.update())}function mapProcess(){G_4.setViewport(G_0.offsetWidth-200,0,200,200);G_4.render(G_3,GLE_topCamera)}function ik0(a){}function GetMeshById(a){var b;b=a.toString().split("_");var d=parseInt(b[1]);for(a=0;a2*b-1&&4==G_49||G_50.length>3*b-1&&5==G_49))if(GLE_AutoCorrection){G_7=!1;G_3.ge("back").visible=!1;if(needAxis=G_48.visible?!0:!1)G_48.visible=!1;for(var d=0;dd.x&&(d.x=e[b].x),e[b].y>d.y&&(d.y=e[b].y),e[b].z>d.z&&(d.z=e[b].z);h.x=f/e.length;h.y=l/e.length;h.z=m/e.length;e=(parseFloat(r)/1E9).toFixed(3);GLE_bMeasureWord&&DrawWords(h,e+"\u7acb\u65b9\u7c73","areaResult");for(b=0;bd.x&&(d.x=e[b].x),e[b].y>d.y&&(d.y=e[b].y),e[b].z>d.z&&(d.z=e[b].z);h.x=f/e.length;h.y=l/e.length;h.z=m/e.length;e=r/1E9;b=(G_52/1E3*e).toFixed(3)+"\u5428";GLE_bMeasureWord&&DrawWords(h,b,"areaResult");for(b=0;bb[1].x&&(a=b[0].x,b[0].x=b[1].x,b[1].x=a),a=0;150*a+b[0].xb[1].x?e.vertices.push(new GLE.Vector3(b[1].x,b[0].y,b[0].z)):e.vertices.push(new GLE.Vector3(b[0].x+150*a+100,b[0].y,b[0].z));else if("y"==d)for(b[0].y>b[1].y&&(a=b[0].y,b[0].y=b[1].y,b[1].y=a),a=0;150*a+b[0].yb[1].y?e.vertices.push(new GLE.Vector3(b[0].x,b[1].y,b[0].z)):e.vertices.push(new GLE.Vector3(b[0].x,b[0].y+150*a+100,b[0].z));else if("z"==d)for(b[0].z>b[1].z&&(a=b[0].z,b[0].z=b[1].z,b[1].z=a),a=0;150*a+b[0].zb[1].z?e.vertices.push(new GLE.Vector3(b[0].x,b[0].y,b[1].z)):e.vertices.push(new GLE.Vector3(b[0].x,b[0].y,b[0].z+150*a+100));e=new GLE.LineSegments(e,f);e.material.transparent=!0;e.material.side=GLE.DoubleSide;e.material.alphaTest=.1;e.material.depthTest=!1;e.material.depthWrite=!1;e.renderOrder=10;G_34.ge("myline").add(e)}function DrawLineSegments1(a,b){for(var d=new GLE.Geometry,e=new GLE.LineBasicMaterial({color:16711935}),f=0;fMath.abs(G_53.min.x)&&.01>Math.abs(G_53.min.y)&&.01>Math.abs(G_53.min.z)&&.01>Math.abs(G_53.max.x)&&.01>Math.abs(G_53.max.y)&&.01>Math.abs(G_53.max.z)&&(G_53=h);h.min.xG_53.max.x&&(G_53.max.x=h.max.x);h.max.y>G_53.max.y&&(G_53.max.y=h.max.y);h.max.z>G_53.max.z&&(G_53.max.z=h.max.z);G_22&&(h=new GLE.Box3Helper(h,16711680),G_34.add(h));ZoomFitAll();GLE_LoadNum--;0==GLE_LoadNum?(G_7=!0,UpdateOrder(),OnLoadModelEnd(e)):(f++,LoadObj(a,b,a[f].model,e,f))})})})})})})}function SceneAnimationPlay(){tmpAnimation.reset();tmpAnimation.play()}var tmpAnimation;function LoadGLB(a,b,d,e,f){var h=new GLE.Lr,l=new GLE.Gr(h),m=[],m=d.split("/");l.load(b+m[1],function(b){G_8.push([]);G_10.push("GLB_"+e);G_12.push("");G_9.push([]);var d=b.scene;d.scale.x=1E3;d.scale.y=1E3;d.scale.z=1E3;if(0G_53.min.x&&.01>G_53.min.y&&.01>G_53.min.z&&.01>G_53.max.x&&.01>G_53.max.y&&.01>G_53.max.z&&(G_53=(new GLE.Box3).st(d,!0));G_22&&(b=new GLE.Box3Helper(G_53,16711680),G_34.add(b));d.traverse(function(a){a instanceof GLE.Mesh?(a.name="GLB_"+e,a.material.side=GLE.DoubleSide,a.material.transparent=!0,a.material.depthTest=!0,a.material.depthWrite=!0,G_11.lengthMath.abs(G_53.min.x)&&.01>Math.abs(G_53.min.y)&&.01>Math.abs(G_53.min.z)&&.01>Math.abs(G_53.max.x)&&.01>Math.abs(G_53.max.y)&&.01>Math.abs(G_53.max.z)&&(G_53=k);k.min.xG_53.max.x&&(G_53.max.x=k.max.x);k.max.y>G_53.max.y&&(G_53.max.y=k.max.y);k.max.z>G_53.max.z&&(G_53.max.z=k.max.z);GLE_LoadNum--;G_22&&(k=new GLE.Box3Helper(G_53,16711680),G_34.add(k));if(1==m||0==m%20)GLE_bNeedCamera&&ZoomFitAll(),G_4.render(G_3,G_2),VerifyEngine(),1==m&&UpdateOrder();0==GLE_LoadNum?(OnLoadModelProcess(1-GLE_LoadNum/a.length),GetBBox(),1==a.length&&UpdateOrder(),GLE_bNeedCamera&&ZoomFitAll(),VerifyEngine(),G_7=!0,render(),OnLoadModelEnd(h)):(m++,OnLoadModelProcess(1-GLE_LoadNum/a.length),LoadId2(a,G_13+"ids/"+a[m].model+".glb",h,l,m))})})})})})}function LoadId4(a,b,d,e,f,h,l,m){b.file(f+".pos").async("arraybuffer").then(function(r){b.file(f+".mati").async("arraybuffer").then(function(q){b.file(f+".color").async("arraybuffer").then(function(x){b.file(f+".id").async("arraybuffer").then(function(G){b.file(f+".edge").async("arraybuffer").then(function(B){b.file(f+".edgei").async("arraybuffer").then(function(b){var v=new Uint32Array(r),k=new Uint32Array(q),u=new Uint8Array(x),p=new Uint32Array(G),w=new Uint32Array(B),C=new Uint32Array(b),W=new Uint8Array(u.length/4*3),aa=new Uint8Array(u.length);b=new Float32Array(3*v.length);for(var F=0;FMath.abs(G_53.min.x)&&.01>Math.abs(G_53.min.y)&&.01>Math.abs(G_53.min.z)&&.01>Math.abs(G_53.max.x)&&.01>Math.abs(G_53.max.y)&&.01>Math.abs(G_53.max.z)&&(G_53=w);w.min.xG_53.max.x&&(G_53.max.x=w.max.x);w.max.y>G_53.max.y&&(G_53.max.y=w.max.y);w.max.z>G_53.max.z&&(G_53.max.z=w.max.z);GLE_LoadNum--;if(1==m||0==m%20)GLE_bNeedCamera&&ZoomFitAll(),G_4.render(G_3,G_2),VerifyEngine(),1==m&&UpdateOrder();0==GLE_LoadNum?(OnLoadModelProcess(1-GLE_LoadNum/a.length),GetBBox(),GLE_bNeedCamera&&ZoomFitAll(),VerifyEngine(),G_7=!0,OnLoadModelEnd(h)):(G_22&&(w=new GLE.Box3Helper(G_53,16711680),G_34.add(w)),m++,OnLoadModelProcess(1-GLE_LoadNum/a.length),LoadId2(a,G_13+"ids/"+a[m].model+".glb",h,l,m))})})})})})})}function LoadId5(a,b,d,e,f,h,l,m){b.file(f+".pos").async("arraybuffer").then(function(r){b.file(f+".mati").async("arraybuffer").then(function(q){b.file(f+".color").async("arraybuffer").then(function(x){b.file(f+".id").async("arraybuffer").then(function(G){b.file(f+".normal").async("arraybuffer").then(function(B){b.file(f+".tex").async("arraybuffer").then(function(w){b.file(f+".tpos").async("arraybuffer").then(function(v){b.file(f+".tnum").async("arraybuffer").then(function(b){var k=new Uint32Array(r),p=new Uint32Array(q),E=new Uint8Array(x),C=new Uint32Array(G),W=new Uint8Array(B),aa=new Uint8Array(E.length/4*3),F=new Uint8Array(E.length),L=new Float32Array(3*k.length),A=new Float32Array(w),H=new Uint32Array(v),D=new Uint16Array(b);b=new Uint8Array(2*D.length);for(var M=0;MMath.abs(G_53.min.x)&&.01>Math.abs(G_53.min.y)&&.01>Math.abs(G_53.min.z)&&.01>Math.abs(G_53.max.x)&&.01>Math.abs(G_53.max.y)&&.01>Math.abs(G_53.max.z)&&(G_53=E);E.min.xG_53.max.x&&(G_53.max.x=E.max.x);E.max.y>G_53.max.y&&(G_53.max.y=E.max.y);E.max.z>G_53.max.z&&(G_53.max.z=E.max.z);GLE_LoadNum--;if(1==m||0==m%20)GLE_bNeedCamera&&ZoomFitAll(),G_4.render(G_3,G_2),VerifyEngine(),1==m&&UpdateOrder();0==GLE_LoadNum?(OnLoadModelProcess(1-GLE_LoadNum/a.length),GetBBox(),GLE_bNeedCamera&&ZoomFitAll(),VerifyEngine(),G_7=!0,OnLoadModelEnd(h)):(G_22&&(E=new GLE.Box3Helper(G_53,16711680),G_34.add(E)),m++,OnLoadModelProcess(1-GLE_LoadNum/a.length),LoadId2(a,G_13+"ids/"+a[m].model+".glb",h,l,m))})})})})})})})})}function LoadId2(a,b,d,e,f){JSZipUtils.getBinaryContent(b,function(h,l){JSZip.loadAsync(l).then(function(h){var l=b.lastIndexOf("/"),m=b.lastIndexOf("."),x=b.substr(l+1,m-l-1);h.file(x+".ver").async("arraybuffer").then(function(b){if(h.file(x+".mat"))h.file(x+".mat").async("arraybuffer").then(function(l){var k=new Float32Array(b);l=new Float32Array(l);h.file(x+".normal")||(GLE_RenderMode=1);0==GLE_RenderMode?LoadId3(a,h,k,l,x,d,e,f):1==GLE_RenderMode?LoadId4(a,h,k,l,x,d,e,f):h.file(x+".tex")?LoadId5(a,h,k,l,x,d,e,f):(GLE_RenderMode=0,LoadId3(a,h,k,l,x,d,e,f))});else{var l=new Float32Array(b),m=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];h.file(x+".normal")||(GLE_RenderMode=1);0==GLE_RenderMode?LoadId3(a,h,l,m,x,d,e,f):1==GLE_RenderMode?LoadId4(a,h,l,m,x,d,e,f):h.file(x+".tex")?LoadId5(a,h,l,m,x,d,e,f):(GLE_RenderMode=0,LoadId3(a,h,l,m,x,d,e,f))}})})})}function LoadTest(a){JSZipUtils.getBinaryContent(a,function(b,d){JSZip.loadAsync(d).then(function(b){var d=a.lastIndexOf("/"),e=a.lastIndexOf("."),l=a.substr(d+1,e-d-1);b.file(l+".ver").async("arraybuffer").then(function(a){b.file(l+".mat").async("arraybuffer").then(function(d){b.file(l+".pos").async("arraybuffer").then(function(e){b.file(l+".mati").async("arraybuffer").then(function(f){b.file(l+".color").async("arraybuffer").then(function(h){b.file(l+".id").async("arraybuffer").then(function(m){b.file(l+".edge").async("arraybuffer").then(function(q){b.file(l+".edgei").async("arraybuffer").then(function(b){var l=new GLE.LineBasicMaterial({color:6710886}),r=new Float32Array(a),p=new Float32Array(d),v=new Uint32Array(e),w=new Uint32Array(f),x=new Uint8Array(h),B=new Uint32Array(m),G=new Uint32Array(q);new Uint32Array(b);var L=new Uint8Array(x.length/4*3),A=new Uint8Array(x.length);b=new Float32Array(3*v.length);UpdateOrder();for(var H=0;HMath.abs(G_53.min.x)&&.01>Math.abs(G_53.min.y)&&.01>Math.abs(G_53.min.z)&&.01>Math.abs(G_53.max.x)&&.01>Math.abs(G_53.max.y)&&.01>Math.abs(G_53.max.z)&&(G_53=l);l.min.xG_53.max.x&&(G_53.max.x=l.max.x);l.max.y>G_53.max.y&&(G_53.max.y=l.max.y);l.max.z>G_53.max.z&&(G_53.max.z=l.max.z);G_22&&(l=new GLE.Box3Helper(G_53,16711680),G_34.add(l));GetBBox();ZoomFitAll();VerifyEngine();G_7=!0;OnLoadModelEnd("test")})})})})})})})})})})}function LoadTest1(a){JSZipUtils.getBinaryContent(a,function(b,d){JSZip.loadAsync(d).then(function(b){var d=a.lastIndexOf("/"),e=a.lastIndexOf("."),l=a.substr(d+1,e-d-1);b.file(l+".ver").async("arraybuffer").then(function(a){b.file(l+".mat").async("arraybuffer").then(function(d){b.file(l+".pos").async("arraybuffer").then(function(e){b.file(l+".mati").async("arraybuffer").then(function(f){b.file(l+".color").async("arraybuffer").then(function(h){b.file(l+".edge").async("arraybuffer").then(function(b){new GLE.LineBasicMaterial({color:6710886});var l=new Float32Array(a),m=new Float32Array(d),k=new Uint32Array(e),q=new Uint32Array(f),p=new Uint8Array(h);b=new Uint32Array(b);for(var r=new Float32Array(3*k.length),x=0;xMath.abs(G_53.min.x)&&.01>Math.abs(G_53.min.y)&&.01>Math.abs(G_53.min.z)&&.01>Math.abs(G_53.max.x)&&.01>Math.abs(G_53.max.y)&&.01>Math.abs(G_53.max.z)&&(G_53=b);b.min.xG_53.max.x&&(G_53.max.x=b.max.x);b.max.y>G_53.max.y&&(G_53.max.y=b.max.y);b.max.z>G_53.max.z&&(G_53.max.z=b.max.z);G_22&&(b=new GLE.Box3Helper(G_53,16711680),G_34.add(b));GetBBox();ZoomFitAll();VerifyEngine();G_7=!0;OnLoadModelEnd("test")})})})})})})})})}function SetPivot(a){var b;b=a.toString().split(",");if(!(2>b.length)){G_35.rotation.x=parseFloat(b[3]);G_35.rotation.y=parseFloat(b[4]);G_35.rotation.z=parseFloat(b[5]);G_35.position.x=parseFloat(b[0]);G_35.position.y=parseFloat(b[1]);G_35.position.z=parseFloat(b[2]);G_35.uld(!0);var d=new GLE.Vector3(parseFloat(b[6]),parseFloat(b[7]),parseFloat(b[8])),e=new GLE.Matrix4;d.applyMatrix4(e.getInverse(G_35.matrixWorld));G_36.position.x-=d.x;G_36.position.y-=d.y;G_36.position.z-=d.z;G_35.position.x=parseFloat(b[6]);G_35.position.y=parseFloat(b[7]);G_35.position.z=parseFloat(b[8]);GLE_lastPivot=a}}function ReSetPivot(){GLE_lastPivot.toString().split(",");var a=new GLE.Vector3;G_53.getCenter(a);a.applyMatrix4(G_34.matrixWorld);SetPivot(G_35.position.x+","+G_35.position.y+","+G_35.position.z+","+G_35.rotation.x+","+G_35.rotation.y+","+G_35.rotation.z+","+a.x+","+a.y+","+a.z)}function ZoomFitAll(a,b){if(GLE_bSvg){var d=document.getElementById(G_15),e=d3.select(d).select("g").select("rect").attr("height"),f=d3.select(d).select("g").select("rect").attr("width"),h=d3.zoom().on("zoom",function(){d3.select(d).select("g").attr("transform",d3.zoomTransform(d3.select(d).select("svg").node()))}),l=d.offsetHeight-0,m=d.offsetWidth-0;ScalingRatio=l/e;scalex=(m-f*l/e)/2;d3.select(d).select("svg").call(h.transform,d3.zoomIdentity.translate(scalex,0).scale(ScalingRatio))}else{if(a)for(G_53=new GLE.Box3,G_53.min.x=0,G_53.min.y=0,G_53.min.z=0,G_53.max.x=0,G_53.max.y=0,e=G_53.max.z=0;eMath.abs(G_53.min.x)&&.01>Math.abs(G_53.min.y)&&.01>Math.abs(G_53.min.z)&&.01>Math.abs(G_53.max.x)&&.01>Math.abs(G_53.max.y)&&.01>Math.abs(G_53.max.z)&&(G_53=h),h.min.xG_53.max.x&&(G_53.max.x=h.max.x),h.max.y>G_53.max.y&&(G_53.max.y=h.max.y),h.max.z>G_53.max.z&&(G_53.max.z=h.max.z);e=new GLE.Vector3;f=new GLE.Vector3;G_53.getCenter(e);G_53.getSize(f);G_32=f.length();G_59=e;G_48.scale.x=G_32/1E4;G_48.scale.y=G_32/1E4;G_48.scale.z=G_32/1E4;G_2.position.copy(e);G_2.position.y-=G_32*GLE_PrimitiveViewDistance;G_2.near=G_32/5E3;G_2.far=1E4*G_32;G_2.ux();G_2.lookAt(e);GLE_topCamera.position.copy(e);GLE_topCamera.position.y-=G_32*GLE_PrimitiveViewDistance;GLE_topCamera.near=G_32/1E4;GLE_topCamera.far=1E4*G_32;GLE_topCamera.ux();GLE_topCamera.lookAt(e);b?(ReSetPivot(),(new TN.Tn(G_35.position)).to({x:e.x,y:e.y,z:e.z},400).delay(0).easing(TN.Easing.Linear.None).start(),(new TN.Tn(G_35.rotation)).to({x:Math.PI*GLE_PrimitiveViewAngle/180,y:0,z:Math.PI/4},400).delay(0).easing(TN.Easing.Linear.None).start()):(G_35.position.x=e.x,G_35.position.y=e.y,G_35.position.z=e.z,G_36.position.x=0,G_36.position.y=0,G_36.position.z=0,SetPivot("0,0,0,0,0,0,"+e.x+","+e.y+","+e.z),G_35.rotation.x=Math.PI*GLE_PrimitiveViewAngle/180,G_35.rotation.y=0,G_35.rotation.z=Math.PI/4);new GLE.CameraHelper(G_2);G_56=M_distance([G_35.position.x,G_35.position.y,G_35.position.z],[G_2.position.x,G_2.position.y,G_2.position.z])}}function GetIdImage(a){var b;b=a.toString().split("#");ShowActors(b);MyZoom(GetIdBox(a));render();a=G_4.domElement;return Canvas2Image.getImage(a,a.width,a.height)}function MyZoom(a){var b=new GLE.Vector3,d=new GLE.Vector3;a.getSize(d);a.getCenter(b);a=d.length();G_2.position.copy(b);G_2.position.y-=a/.8;G_2.ux();G_2.lookAt(b);G_35.position.x=b.x;G_35.position.y=b.y;G_35.position.z=b.z;G_36.position.x=0;G_36.position.y=0;G_36.position.z=0;SetPivot("0,0,0,0,0,0,"+b.x+","+b.y+","+b.z);G_35.rotation.x=Math.PI/4;G_35.rotation.y=0;G_35.rotation.z=Math.PI/4;G_48.visible=!1}function ZoomFit(a,b){GLE_lastPivot.toString().split(",");var d=new GLE.Vector3;a.getCenter(d);d.applyMatrix4(G_34.matrixWorld);SetPivot(G_35.position.x+","+G_35.position.y+","+G_35.position.z+","+G_35.rotation.x+","+G_35.rotation.y+","+G_35.rotation.z+","+d.x+","+d.y+","+d.z);(new TN.Tn(G_35.rotation)).to({x:Math.PI/4,y:0,z:Math.PI/4},400).delay(0).easing(TN.Easing.Linear.None).start();d=new GLE.Vector3;a.getSize(d);d.length();(new TN.Tn(G_35.position)).to({x:G_2.position.x,y:G_2.position.y+100*b,z:G_2.position.z},400).delay(0).easing(TN.Easing.Linear.None).start()}function OnAnchorClick(a){}function OnLoadSceneEnd(){}function OnLoadModelProcess(a){}function OnLoadModelEnd(a){}function OnSelectionChanged(a){}function OnClickPosition(a){}function OnClickBlank(){}function OnMeasureResult(a){}function ShowBox(a){G_22=a}function SetModelWireFrame(a){for(var b=-1,d=0;db))for(d=0;db))if(0==GLE_RenderMode||2==GLE_RenderMode)for(d=0;db)){for(var e=G_8[b],d=0;dMath.floor((b-f)/6E4))if(e=$.trim(e),"glendale"==d)if(-1Math.floor((b-f)/6E4))if(e=$.trim(e),"glendale"==d)if(-1b||0>d||0>e)h=!1;a=a.toString().split("#");for(var l=0;lMath.sqrt(l*l+m*m+h*h)&&b.push(G_8[d][e].ids[3*f]);a.push(G_8[d][e].ids[3*f])}}function PopOut(a){var b=(a-G_27)/(G_32/1E5),d=new GLE.Vector3;G_53.getCenter(d);for(var e=0;eMath.abs(M_dot(e,f)-a)}function M_distance(a,b){var d=b[0]-a[0],e=b[1]-a[1],f=b[2]-a[2];return Math.sqrt(d*d+e*e+f*f)}function M_GetArea(a,b,d){var e=M_distance(a,b);a=M_distance(a,d);b=M_distance(b,d);d=(e+a+b)/2;return Math.sqrt(d*(d-e)*(d-a)*(d-b))}function M_GetAngle(a,b,d){var e=M_distance(a,b);a=M_distance(a,d);b=M_distance(b,d);return 180*Math.acos((e*e+b*b-a*a)/(2*e*b))/3.1415926}function SetSelectState(a){G_17=a}function SetAutoCorrection(a){for(var b=0;bd))for(a=G_8[d],b=0;bd))for(a=G_8[d],b=0;bd))for(a=G_8[d],b=0;bd))for(var f=G_8[d],e=0;ef))for(h=0;hd))for(e=0;ethis.idCounter?d.id:this.idCounter;e.executejson()}}};function loadEdit(a){G_71=new G_71;$.getJSON(a,function(a){G_71.recovery(a)})}function ChangeCameras(){if(G_2 instanceof GLE.Pa){var a=window.innerWidth,b=window.innerHeight;G_2=new GLE.OrthographicCamera(a/-.016,a/.016,b/.016,b/-.016,1E-6,1E5);var d=G_53.getCenter();G_59=d;G_32=G_53.getSize().length();G_2.position.copy(d);G_2.position.y-=G_32*GLE_PrimitiveViewDistance;G_2.near=G_32/1E4;G_2.far=1E4*G_32;var e=G_53.max.x-G_53.min.x,f=G_53.max.y-G_53.min.y,a=window.innerWidth,b=window.innerHeight,h=a/e,l=b/f;e>2*f?G_2 instanceof GLE.OrthographicCamera&&(G_2.left=a/-h/2,G_2.right=a/h/2,G_2.top=b/h/2,G_2.bottom=b/-h/2):G_2 instanceof GLE.OrthographicCamera&&(G_2.left=a/-l/2,G_2.right=a/l/2,G_2.top=b/l/2,G_2.bottom=b/-l/2);G_2.ux();G_2.lookAt(d);GLE_topCamera.position.copy(d);GLE_topCamera.position.y-=G_32*GLE_PrimitiveViewDistance;GLE_topCamera.near=G_32/1E4;GLE_topCamera.far=1E4*G_32;GLE_topCamera.ux();GLE_topCamera.lookAt(d);G_35.position.x=d.x;G_35.position.y=d.y;G_35.position.z=d.z;G_36.position.x=0;G_36.position.y=0;G_36.position.z=0;SetPivot("0,0,0,0,0,0,"+d.x+","+d.y+","+d.z);G_35.rotation.x=Math.PI*GLE_PrimitiveViewAngle/180;G_35.rotation.y=0;G_35.rotation.z=Math.PI/4;G_56=M_distance([G_35.position.x,G_35.position.y,G_35.position.z],[G_2.position.x,G_2.position.y,G_2.position.z])}else G_2=new GLE.Pa(45,G_0.offsetWidth/G_0.offsetHeight,1E-6,1E5),ZoomFitAll()}function CameraRecovery(){G_2=new GLE.Pa(45,G_0.offsetWidth/G_0.offsetHeight,1E-6,1E5);ZoomFitAll()}String.prototype.myReplace=function(a,b){return this.replace(new RegExp(a,"g"),b)};function OrthogonalScreenshot(a,b){SetModelVisible(a,!1);(new Date).getTime();b=("#"+b).myReplace("#","#"+a+"_");for(var d=0;db?b=m:mf?f=r:re?e=r:rh?h=q:qthis.header.version)throw Error("GLE.Gr: Legacy binary file detected. Use LegacyGr instead.");for(var b=new DataView(a,aa),d=0;da.length)return!1;var b=a[0],d=b.targets||[];if(void 0===b.indices)return!1;for(var e=1,f=a.length;ea.asset.version[0])q&&q(Error("GLE.Gr: Unsupported asset. glTF versions \x3e\x3d2.0 are supported. Use LegacyGr instead."));else{if(a.extensionsUsed)for(var u=0;uh+1E3&&(m.update(1E3*l/(a-h),100),h=a,l=0,q)){var b=performance.memory;q.update(b.usedJSHeapSize/1048576,b.jsHeapSizeLimit/1048576)}return a},update:function(){f=this.end()},domElement:e,setMode:b}};Stats.Panel=function(a,b,d){var e=Infinity,f=0,h=Math.round,l=h(window.devicePixelRatio||1),m=80*l,r=48*l,q=3*l,x=2*l,G=3*l,B=15*l,w=74*l,v=30*l,k=document.createElement("canvas");k.width=m;k.height=r;k.style.cssText="width:80px;height:48px";var u=k.getContext("2d");u.font="bold "+9*l+"px Helvetica,Arial,sans-serif";u.textBaseline="top";u.fillStyle=d;u.fillRect(0,0,m,r);u.fillStyle=b;u.fillText(a,q,x);u.fillRect(G,B,w,v);u.fillStyle=d;u.globalAlpha=.9;u.fillRect(G,B,w,v);return{dom:k,update:function(p,r){e=Math.min(e,p);f=Math.max(f,p);u.fillStyle=d;u.globalAlpha=1;u.fillRect(0,0,m,B);u.fillStyle=b;u.fillText(h(p)+" "+a+" ("+h(e)+"-"+h(f)+")",q,x);u.drawImage(k,G+l,B,w-l,v,G,B,w-l,v);u.fillRect(G+w-l,B,l,v);u.fillStyle=d;u.globalAlpha=.9;u.fillRect(G+w-l,B,l,h((1-p/r)*v))}}};"object"===typeof module&&(module.exports=Stats);var Canvas2Image=function(){function a(a,b,d){var e=a.width,f=a.height;void 0==b&&(b=e);void 0==d&&(d=f);var h=document.createElement("canvas"),l=h.getContext("2d");h.width=b;h.height=d;l.drawImage(a,0,0,e,f,0,0,b,d);return h}function b(a,b,d,e,f,h,l){b=document.createElement("canvas");d=b.getContext("2d");b.width=h;b.height=l;d.drawImage(a,e,f,h,l,0,0,h,l);return b}function d(b,d,e,f){b=a(b,e,f);return b.toDataURL(d)}function e(a){var b=document.createElement("img");b.src=a;return b}function f(a){a=a.toLowerCase().replace(/jpg/i,"jpeg");return"image/"+a.match(/png|jpeg|bmp|gif/)[0]}function h(a){if(!window.btoa)throw"btoa undefined";var b="";if("string"==typeof a)b=a;else for(var d=0;d>8&255,f>>16&255,f>>24&255,0,0,0,0,54,0,0,0],e=[40,0,0,0,b&255,b>>8&255,b>>16&255,b>>24&255,d&255,d>>8&255,d>>16&255,d>>24&255,1,0,24,0,0,0,0,0,e&255,e>>8&255,e>>16&255,e>>24&255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],l=(4-3*b%4)%4;a=a.data;var m="",q=b<<2,r=String.fromCharCode;do{for(var v=q*(d-1),w="",x=0;xGLE_AngleLimit&&(G_35.rotation.x=GLE_AngleLimit*Math.PI/180)),G_24&&G_26&&MyClip(),GLE_CSR(180/Math.PI*G_35.rotation.x,180/Math.PI*G_35.rotation.z);E.copy(C)}}();this.zoomCamera=function(){var a;if(u===v.TOUCH_ZOOM_PAN){a=F/L;if(1.001a)G_58=(new Date).getTime();G_35.position.y-=2E3*(1-a)*w.zd}else{a=1+(aa.y-W.y)*w.zd*8;if(1.001a)G_58=(new Date).getTime();if(G_53){var b=new GLE.Vector3;G_53.getSize(b);b=b.length();G_35.position.y-=(1-a)*b*.2}else G_35.position.y-=1E4*(1-a);W.copy(aa)}G_24&&MyClip()};this.panCamera=function(){var a=new GLE.Vector2;new GLE.Vector3;return function(){a.copy(H).sub(A);if(1E-5w.maxDistance*w.maxDistance&&(w.object.position.addVectors(w.target,p.setLength(w.maxDistance)),W.copy(aa)),p.lengthSq()(a*=2)?.5*a*a:-.5*(--a*(a-2)-1)}},Cubic:{In:function(a){return a*a*a},Out:function(a){return--a*a*a+1},InOut:function(a){return 1>(a*=2)?.5*a*a*a:.5*((a-=2)*a*a+2)}},Quartic:{In:function(a){return a*a*a*a},Out:function(a){return 1- --a*a*a*a},InOut:function(a){return 1>(a*=2)?.5*a*a*a*a:-.5*((a-=2)*a*a*a-2)}},Quintic:{In:function(a){return a*a*a*a*a},Out:function(a){return--a*a*a*a*a+1},InOut:function(a){return 1>(a*=2)?.5*a*a*a*a*a:.5*((a-=2)*a*a*a*a+2)}},Sinusoidal:{In:function(a){return 1-Math.cos(a*Math.PI/2)},Out:function(a){return Math.sin(a*Math.PI/2)},InOut:function(a){return.5*(1-Math.cos(Math.PI*a))}},Exponential:{In:function(a){return 0===a?0:Math.pow(1024,a-1)},Out:function(a){return 1===a?1:1-Math.pow(2,-10*a)},InOut:function(a){return 0===a?0:1===a?1:1>(a*=2)?.5*Math.pow(1024,a-1):.5*(-Math.pow(2,-10*(a-1))+2)}},Circular:{In:function(a){return 1-Math.sqrt(1-a*a)},Out:function(a){return Math.sqrt(1- --a*a)},InOut:function(a){return 1>(a*=2)?-.5*(Math.sqrt(1-a*a)-1):.5*(Math.sqrt(1-(a-=2)*a)+1)}},Elastic:{In:function(a){return 0===a?0:1===a?1:-Math.pow(2,10*(a-1))*Math.sin(5*(a-1.1)*Math.PI)},Out:function(a){return 0===a?0:1===a?1:Math.pow(2,-10*a)*Math.sin(5*(a-.1)*Math.PI)+1},InOut:function(a){if(0===a)return 0;if(1===a)return 1;a*=2;return 1>a?-.5*Math.pow(2,10*(a-1))*Math.sin(5*(a-1.1)*Math.PI):.5*Math.pow(2,-10*(a-1))*Math.sin(5*(a-1.1)*Math.PI)+1}},Back:{In:function(a){return a*a*(2.70158*a-1.70158)},Out:function(a){return--a*a*(2.70158*a+1.70158)+1},InOut:function(a){return 1>(a*=2)?.5*a*a*(3.5949095*a-2.5949095):.5*((a-=2)*a*(3.5949095*a+2.5949095)+2)}},Bounce:{In:function(a){return 1-TN.Easing.Bounce.Out(1-a)},Out:function(a){return a<1/2.75?7.5625*a*a:a<2/2.75?7.5625*(a-=1.5/2.75)*a+.75:a<2.5/2.75?7.5625*(a-=2.25/2.75)*a+.9375:7.5625*(a-=2.625/2.75)*a+.984375},InOut:function(a){return.5>a?.5*TN.Easing.Bounce.In(2*a):.5*TN.Easing.Bounce.Out(2*a-1)+.5}}};TN.Interpolation={Linear:function(a,b){var d=a.length-1,e=d*b,f=Math.floor(e),h=TN.Interpolation.Utils.Linear;return 0>b?h(a[0],a[1],e):1d?d:f+1],e-f)},Bezier:function(a,b){for(var d=0,e=a.length-1,f=Math.pow,h=TN.Interpolation.Utils.Bernstein,l=0;l<=e;l++)d+=f(1-b,e-l)*f(b,l)*a[l]*h(e,l);return d},CatmullRom:function(a,b){var d=a.length-1,e=d*b,f=Math.floor(e),h=TN.Interpolation.Utils.CatmullRom;return a[0]===a[d]?(0>b&&(f=Math.floor(e=d*(1+b))),h(a[(f-1+d)%d],a[f],a[(f+1)%d],a[(f+2)%d],e-f)):0>b?a[0]-(h(a[0],a[0],a[1],a[1],-e)-a[0]):1>2,G=(3&d)<<4|e>>4,B=1>6:64,w=2>4,e=(15&e)<<4|l>>2,f=(3&l)<<6|G,v[w++]=d,64!==l&&(v[w++]=e),64!==G&&(v[w++]=f);return v}},{"./support":30,"./utils":32}],2:[function(b,d,e){function f(b,d,e,f,h){this.compressedSize=b;this.uncompressedSize=d;this.crc32=e;this.compression=f;this.compressedContent=h}var h=b("./external"),l=b("./stream/DataWorker"),m=b("./stream/DataLengthProbe"),r=b("./stream/Crc32Probe"),m=b("./stream/DataLengthProbe");f.prototype={getContentWorker:function(){var b=(new l(h.Promise.resolve(this.compressedContent))).pipe(this.compression.uncompressWorker()).pipe(new m("data_length")),d=this;return b.on("end",function(){if(this.streamInfo.data_length!==d.uncompressedSize)throw Error("Bug : uncompressed data size mismatch");}),b},getCompressedWorker:function(){return(new l(h.Promise.resolve(this.compressedContent))).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}};f.createWorkerFrom=function(b,d,e){return b.pipe(new r).pipe(new m("uncompressedSize")).pipe(d.compressWorker(e)).pipe(new m("compressedSize")).withStreamInfo("compression",d)};d.exports=f},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(b,d,e){var f=b("./stream/GenericWorker");e.STORE={magic:"\x00\x00",compressWorker:function(b){return new f("STORE compression")},uncompressWorker:function(){return new f("STORE decompression")}};e.DEFLATE=b("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(b,d,e){var f=b("./utils"),h=function(){for(var b,d=[],e=0;256>e;e++){b=e;for(var f=0;8>f;f++)b=1&b?3988292384^b>>>1:b>>>1;d[e]=b}return d}();d.exports=function(b,d){if("undefined"==typeof b||!b.length)return 0;var e;if("string"!==f.getTypeOf(b)){var l=0+b.length;e=(0|d)^-1;for(var m=0;m>>8^h[255&(e^b[m])]}else for(l=0+b.length,e=(0|d)^-1,m=0;m>>8^h[255&(e^b.charCodeAt(m))];return e^=-1}},{"./utils":32}],5:[function(b,d,e){e.base64=!1;e.binary=!1;e.dir=!1;e.createFolders=!0;e.date=null;e.compression=null;e.compressionOptions=null;e.comment=null;e.unixPermissions=null;e.dosPermissions=null},{}],6:[function(b,d,e){b="undefined"!=typeof Promise?Promise:b("lie");d.exports={Promise:b}},{lie:58}],7:[function(b,d,e){function f(b,d){m.call(this,"FlateWorker/"+b);this._pako=null;this._pakoAction=b;this._pakoOptions=d;this.meta={}}d="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array;var h=b("pako"),l=b("./utils"),m=b("./stream/GenericWorker"),r=d?"uint8array":"array";e.magic="\b\x00";l.inherits(f,m);f.prototype.processChunk=function(b){this.meta=b.meta;null===this._pako&&this._createPako();this._pako.push(l.transformTo(r,b.data),!1)};f.prototype.flush=function(){m.prototype.flush.call(this);null===this._pako&&this._createPako();this._pako.push([],!0)};f.prototype.cleanUp=function(){m.prototype.cleanUp.call(this);this._pako=null};f.prototype._createPako=function(){this._pako=new h[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var b=this;this._pako.onData=function(d){b.push({data:d,meta:b.meta})}};e.compressWorker=function(b){return new f("Deflate",b)};e.uncompressWorker=function(){return new f("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:59}],8:[function(b,d,e){function f(b,d,e,f){l.call(this,"ZipFileWorker");this.bytesWritten=0;this.zipComment=d;this.zipPlatform=e;this.encodeFileName=f;this.streamFiles=b;this.accumulate=!1;this.contentBuffer=[];this.dirRecords=[];this.entriesCount=this.currentSourceOffset=0;this.currentFile=null;this._sources=[]}var h=b("../utils"),l=b("../stream/GenericWorker"),m=b("../utf8"),r=b("../crc32"),q=b("../signature"),x=function(b,d){var e,f="";for(e=0;e>>=8;return f},G=function(b,d,e,f,l,B){var k,p;k=b.file;var u=b.compression,v=B!==m.utf8encode,w=h.transformTo("string",B(k.name)),A=h.transformTo("string",m.utf8encode(k.name)),E=k.comment;B=h.transformTo("string",B(E));var D=h.transformTo("string",m.utf8encode(E)),G=A.length!==k.name.length,N=D.length!==E.length,V=E="",Q="";p=k.dir;var J=k.date,K=0,ba=0,ca=0;d&&!e||(K=b.crc32,ba=b.compressedSize,ca=b.uncompressedSize);b=0;d&&(b|=8);v||!G&&!N||(b|=2048);d=0;p&&(d|=16);"UNIX"===l?(l=798,k=v=k.unixPermissions,p=(v||(k=p?16893:33204),(65535&k)<<16),d|=p):(l=20,d|=63&(k.dosPermissions||0));k=J.getUTCHours();k=k<<6|J.getUTCMinutes();k=k<<5|J.getUTCSeconds()/2;p=J.getUTCFullYear()-1980;p=p<<4|J.getUTCMonth()+1;p=p<<5|J.getUTCDate();G&&(V=x(1,1)+x(r(w),4)+A,E+="up"+x(V.length,2)+V);N&&(Q=x(1,1)+x(r(B),4)+D,E+="uc"+x(Q.length,2)+Q);A="\n\x00"+x(b,2);A+=u.magic;A+=x(k,2);A+=x(p,2);A+=x(K,4);A+=x(ba,4);A+=x(ca,4);A+=x(w.length,2);A+=x(E.length,2);u=q.LOCAL_FILE_HEADER+A+w+E;f=q.CENTRAL_FILE_HEADER+x(l,2)+A+x(B.length,2)+"\x00\x00\x00\x00"+x(d,4)+x(f,4)+w+E+B;return{fileRecord:u,dirRecord:f}},B=function(b){return q.DATA_DESCRIPTOR+x(b.crc32,4)+x(b.compressedSize,4)+x(b.uncompressedSize,4)};h.inherits(f,l);f.prototype.push=function(b){var d=b.meta.percent||0,e=this.entriesCount,f=this._sources.length;this.accumulate?this.contentBuffer.push(b):(this.bytesWritten+=b.data.length,l.prototype.push.call(this,{data:b.data,meta:{currentFile:this.currentFile,percent:e?(d+100*(e-f-1))/e:100}}))};f.prototype.openedSource=function(b){this.currentSourceOffset=this.bytesWritten;this.currentFile=b.file.name;var d=this.streamFiles&&!b.file.dir;d?(b=G(b,d,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName),this.push({data:b.fileRecord,meta:{percent:0}})):this.accumulate=!0};f.prototype.closedSource=function(b){this.accumulate=!1;var d=this.streamFiles&&!b.file.dir,e=G(b,d,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(e.dirRecord),d)this.push({data:B(b),meta:{percent:100}});else for(this.push({data:e.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null};f.prototype.flush=function(){for(var b=this.bytesWritten,d=0;db)throw Error("End of data reached (data length \x3d "+this.length+", asked index \x3d "+b+"). Corrupted zip ?");},setIndex:function(b){this.checkIndex(b);this.index=b},skip:function(b){this.setIndex(this.index+b)},byteAt:function(b){},readInt:function(b){var d,e=0;this.checkOffset(b);for(d=this.index+b-1;d>=this.index;d--)e=(e<<8)+this.byteAt(d);return this.index+=b,e},readString:function(b){return h.transformTo("string",this.readData(b))},readData:function(b){},lastIndexOfSignature:function(b){},readAndCheckSignature:function(b){},readDate:function(){var b=this.readInt(4);return new Date(Date.UTC((b>>25&127)+1980,(b>>21&15)-1,b>>16&31,b>>11&31,b>>5&63,(31&b)<<1))}};d.exports=f},{"../utils":32}],19:[function(b,d,e){function f(b){h.call(this,b)}var h=b("./Uint8ArrayReader");b("../utils").inherits(f,h);f.prototype.readData=function(b){this.checkOffset(b);var d=this.data.slice(this.zero+this.index,this.zero+this.index+b);return this.index+=b,d};d.exports=f},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(b,d,e){function f(b){h.call(this,b)}var h=b("./DataReader");b("../utils").inherits(f,h);f.prototype.byteAt=function(b){return this.data.charCodeAt(this.zero+b)};f.prototype.lastIndexOfSignature=function(b){return this.data.lastIndexOf(b)-this.zero};f.prototype.readAndCheckSignature=function(b){var d=this.readData(4);return b===d};f.prototype.readData=function(b){this.checkOffset(b);var d=this.data.slice(this.zero+this.index,this.zero+this.index+b);return this.index+=b,d};d.exports=f},{"../utils":32,"./DataReader":18}],21:[function(b,d,e){function f(b){h.call(this,b)}var h=b("./ArrayReader");b("../utils").inherits(f,h);f.prototype.readData=function(b){if(this.checkOffset(b),0===b)return new Uint8Array(0);var d=this.data.subarray(this.zero+this.index,this.zero+this.index+b);return this.index+=b,d};d.exports=f},{"../utils":32,"./ArrayReader":17}],22:[function(b,d,e){var f=b("../utils"),h=b("../support"),l=b("./ArrayReader"),m=b("./StringReader"),r=b("./NodeBufferReader"),q=b("./Uint8ArrayReader");d.exports=function(b){var d=f.getTypeOf(b);return f.checkSupport(d),"string"!==d||h.uint8array?"nodebuffer"===d?new r(b):h.uint8array?new q(f.transformTo("uint8array",b)):new l(f.transformTo("array",b)):new m(b)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(b,d,e){e.LOCAL_FILE_HEADER="PK\u0003\u0004";e.CENTRAL_FILE_HEADER="PK\u0001\u0002";e.CENTRAL_DIRECTORY_END="PK\u0005\u0006";e.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\u0006\u0007";e.ZIP64_CENTRAL_DIRECTORY_END="PK\u0006\u0006";e.DATA_DESCRIPTOR="PK\u0007\b"},{}],24:[function(b,d,e){function f(b){h.call(this,"ConvertWorker to "+b);this.destType=b}var h=b("./GenericWorker"),l=b("../utils");l.inherits(f,h);f.prototype.processChunk=function(b){this.push({data:l.transformTo(this.destType,b.data),meta:b.meta})};d.exports=f},{"../utils":32,"./GenericWorker":28}],25:[function(b,d,e){function f(){h.call(this,"Crc32Probe");this.withStreamInfo("crc32",0)}var h=b("./GenericWorker"),l=b("../crc32");b("../utils").inherits(f,h);f.prototype.processChunk=function(b){this.streamInfo.crc32=l(b.data,this.streamInfo.crc32||0);this.push(b)};d.exports=f},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(b,d,e){function f(b){h.call(this,"DataLengthProbe for "+b);this.propName=b;this.withStreamInfo(b,0)}e=b("../utils");var h=b("./GenericWorker");e.inherits(f,h);f.prototype.processChunk=function(b){b&&(this.streamInfo[this.propName]=(this.streamInfo[this.propName]||0)+b.data.length);h.prototype.processChunk.call(this,b)};d.exports=f},{"../utils":32,"./GenericWorker":28}],27:[function(b,d,e){function f(b){l.call(this,"DataWorker");var d=this;this.dataIsReady=!1;this.max=this.index=0;this.data=null;this.type="";this._tickScheduled=!1;b.then(function(b){d.dataIsReady=!0;d.data=b;d.max=b&&b.length||0;d.type=h.getTypeOf(b);d.isPaused||d._tickAndRepeat()},function(b){d.error(b)})}var h=b("../utils"),l=b("./GenericWorker");h.inherits(f,l);f.prototype.cleanUp=function(){l.prototype.cleanUp.call(this);this.data=null};f.prototype.resume=function(){return!!l.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,h.delay(this._tickAndRepeat,[],this)),!0)};f.prototype._tickAndRepeat=function(){this._tickScheduled=!1;this.isPaused||this.isFinished||(this._tick(),this.isFinished||(h.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))};f.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var b=null,d=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case "string":b=this.data.substring(this.index,d);break;case "uint8array":b=this.data.subarray(this.index,d);break;case "array":case "nodebuffer":b=this.data.slice(this.index,d)}return this.index=d,this.push({data:b,meta:{percent:this.max?this.index/this.max*100:0}})};d.exports=f},{"../utils":32,"./GenericWorker":28}],28:[function(b,d,e){function f(b){this.name=b||"default";this.streamInfo={};this.generatedError=null;this.extraStreamInfo={};this.isPaused=!0;this.isLocked=this.isFinished=!1;this._listeners={data:[],end:[],error:[]};this.previous=null}f.prototype={push:function(b){this.emit("data",b)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(h){this.emit("error",h)}return!0},error:function(b){return!this.isFinished&&(this.isPaused?this.generatedError=b:(this.isFinished=!0,this.emit("error",b),this.previous&&this.previous.error(b),this.cleanUp()),!0)},on:function(b,d){return this._listeners[b].push(d),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null;this._listeners=[]},emit:function(b,d){if(this._listeners[b])for(var e=0;eb;b++)x[b]=252<=b?6:248<=b?5:240<=b?4:224<=b?3:192<=b?2:1;x[254]=x[254]=1;e.utf8encode=function(b){if(m.nodebuffer)b=r.newBufferFrom(b,"utf-8");else{var d,e,f,h,l,p=b.length,q=0;for(h=0;he?1:2048>e?2:65536>e?3:4;d=m.uint8array?new Uint8Array(q):Array(q);for(h=l=0;le?d[l++]=e:2048>e?(d[l++]=192|e>>>6,d[l++]=128|63&e):65536>e?(d[l++]=224|e>>>12,d[l++]=128|e>>>6&63,d[l++]=128|63&e):(d[l++]=240|e>>>18,d[l++]=128|e>>>12&63,d[l++]=128|e>>>6&63,d[l++]=128|63&e);b=d}return b};e.utf8decode=function(b){var d;if(m.nodebuffer)d=l.transformTo("nodebuffer",b).toString("utf-8");else{var e=b=l.transformTo(m.uint8array?"uint8array":"array",b),f,h,q,p=e.length;b=Array(2*p);for(f=h=0;fd)b[h++]=d;else if(q=x[d],4d?b[h++]=d:(d-=65536,b[h++]=55296|d>>10&1023,b[h++]=56320|1023&d)}d=(b.length!==h&&(b.subarray?b=b.subarray(0,h):b.length=h),l.applyFromCharCode(b))}return d};l.inherits(f,q);f.prototype.processChunk=function(b){var d=l.transformTo(m.uint8array?"uint8array":"array",b.data);if(this.leftOver&&this.leftOver.length){if(m.uint8array){var f=d,d=new Uint8Array(f.length+this.leftOver.length);d.set(this.leftOver,0);d.set(f,this.leftOver.length)}else d=this.leftOver.concat(d);this.leftOver=null}var h,f=d.length;f>d.length&&(f=d.length);for(h=f-1;0<=h&&128===(192&d[h]);)h--;f=0>h?f:0===h?f:h+x[d[h]]>f?h:f;h=d;f!==d.length&&(m.uint8array?(h=d.subarray(0,f),this.leftOver=d.subarray(f,d.length)):(h=d.slice(0,f),this.leftOver=d.slice(f,d.length)));this.push({data:e.utf8decode(h),meta:b.meta})};f.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:e.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)};e.Utf8DecodeWorker=f;l.inherits(h,q);h.prototype.processChunk=function(b){this.push({data:e.utf8encode(b.data),meta:b.meta})};e.Utf8EncodeWorker=h},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(b,d,e){function f(b){return b}function h(b,d){for(var e=0;ed?"0":"")+d.toString(16).toUpperCase();return f};e.delay=function(b,d,e){G(function(){b.apply(e||null,d||[])})};e.inherits=function(b,d){var e=function(){};e.prototype=d.prototype;b.prototype=new e};e.extend=function(){var b,d,e={};for(b=0;bb)throw this.isSignature(0,m.LOCAL_FILE_HEADER)?Error("Corrupted zip: can't find end of central directory"):Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(b);var d=b;if(this.checkSignature(m.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===l.MAX_VALUE_16BITS||this.diskWithCentralDirrt===l.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===l.MAX_VALUE_16BITS||this.centralDirRecords===l.MAX_VALUE_16BITS||this.centralDirSize===l.MAX_VALUE_32BITS||this.centralDirOffset===l.MAX_VALUE_32BITS){if(this.zip64=!0,b=this.reader.lastIndexOfSignature(m.ZIP64_CENTRAL_DIRECTORY_LOCATOR),0>b)throw Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(b),this.checkSignature(m.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,m.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(m.ZIP64_CENTRAL_DIRECTORY_END),0>this.relativeOffsetEndOfZip64CentralDir))throw Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir);this.checkSignature(m.ZIP64_CENTRAL_DIRECTORY_END);this.readBlockZip64EndOfCentral()}b=this.centralDirOffset+this.centralDirSize;this.zip64&&(b+=20,b+=12+this.zip64EndOfCentralSize);b=d-b;if(0b)throw Error("Corrupted zip: missing "+Math.abs(b)+" bytes.");},prepareReader:function(b){this.reader=h(b)},load:function(b){this.prepareReader(b);this.readEndOfCentral();this.readCentralDir();this.readLocalFiles()}};d.exports=f},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utf8":31,"./utils":32,"./zipEntry":34}],34:[function(b,d,e){function f(b,d){this.options=b;this.loadOptions=d}var h=b("./reader/readerFor"),l=b("./utils"),m=b("./compressedObject"),r=b("./crc32"),q=b("./utf8"),x=b("./compressions"),G=b("./support");f.prototype={isEncrypted:function(){return 1===(1&this.bitFlag)},useUTF8:function(){return 2048===(2048&this.bitFlag)},readLocalPart:function(b){var d,e;if(b.skip(22),this.fileNameLength=b.readInt(2),e=b.readInt(2),this.fileName=b.readData(this.fileNameLength),b.skip(e),-1===this.compressedSize||-1===this.uncompressedSize)throw Error("Bug or corrupted zip : didn't get enough informations from the central directory (compressedSize \x3d\x3d\x3d -1 || uncompressedSize \x3d\x3d\x3d -1)");var f;a:{e=this.compressionMethod;for(f in x)if(x.hasOwnProperty(f)&&x[f].magic===e){f=x[f];break a}f=null}if(d=f,null===d)throw Error("Corrupted zip : compression "+l.pretty(this.compressionMethod)+" unknown (inner file : "+l.transformTo("string",this.fileName)+")");this.decompressed=new m(this.compressedSize,this.uncompressedSize,this.crc32,d,b.readData(this.compressedSize))},readCentralPart:function(b){this.versionMadeBy=b.readInt(2);b.skip(2);this.bitFlag=b.readInt(2);this.compressionMethod=b.readString(2);this.date=b.readDate();this.crc32=b.readInt(4);this.compressedSize=b.readInt(4);this.uncompressedSize=b.readInt(4);var d=b.readInt(2);if(this.extraFieldsLength=b.readInt(2),this.fileCommentLength=b.readInt(2),this.diskNumberrt=b.readInt(2),this.internalFileAttributes=b.readInt(2),this.externalFileAttributes=b.readInt(4),this.localHeaderOffset=b.readInt(4),this.isEncrypted())throw Error("Encrypted zip are not supported");b.skip(d);this.readExtraFields(b);this.parseZIP64ExtraField(b);this.fileComment=b.readData(this.fileCommentLength)},processAttributes:function(){this.dosPermissions=this.unixPermissions=null;var b=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes);0===b&&(this.dosPermissions=63&this.externalFileAttributes);3===b&&(this.unixPermissions=this.externalFileAttributes>>16&65535);this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(b){this.extraFields[1]&&(b=h(this.extraFields[1].value),this.uncompressedSize===l.MAX_VALUE_32BITS&&(this.uncompressedSize=b.readInt(8)),this.compressedSize===l.MAX_VALUE_32BITS&&(this.compressedSize=b.readInt(8)),this.localHeaderOffset===l.MAX_VALUE_32BITS&&(this.localHeaderOffset=b.readInt(8)),this.diskNumberrt===l.MAX_VALUE_32BITS&&(this.diskNumberrt=b.readInt(4)))},readExtraFields:function(b){var d,e,f,h=b.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});b.indexe;)d.push(arguments[e++]);return u[++k]=function(){r("function"==typeof b?b:Function(b),d)},f(k),k},w=function(b){delete u[b]},"process"==b("./_cof")(B)?f=function(b){B.nextTick(m(p,b,1))}:v?(h=new v,l=h.port2,h.port1.onmessage=E,f=m(l.postMessage,l,1)):G.addEventListener&&"function"==typeof postMessage&&!G.importScripts?(f=function(b){G.postMessage(b+"","*")},G.addEventListener("message",E,!1)):f="onreadystatechange"in x("script")?function(b){q.appendChild(x("script")).onreadystatechange=function(){q.removeChild(this);p.call(b)}}:function(b){setTimeout(m(p,b,1),0)});d.exports={set:e,clear:w}},{"./_cof":39,"./_ctx":41,"./_dom-create":43,"./_global":46,"./_html":48,"./_invoke":50}],55:[function(b,d,e){var f=b("./_is-object");d.exports=function(b,d){if(!f(b))return b;var e,h;if(d&&"function"==typeof(e=b.toString)&&!f(h=e.call(b))||"function"==typeof(e=b.valueOf)&&!f(h=e.call(b))||!d&&"function"==typeof(e=b.toString)&&!f(h=e.call(b)))return h;throw TypeError("Can't convert object to primitive value");}},{"./_is-object":51}],56:[function(b,d,e){d=b("./_export");b=b("./_task");d(d.G+d.B,{setImmediate:b.set,clearImmediate:b.clear})},{"./_export":44,"./_task":54}],57:[function(b,d,e){(function(b){function e(){G=!0;for(var b,d,e=B.length;e;){d=B;B=[];for(b=-1;++bb.windowBits&&(b.windowBits+=16);this.err=0;this.msg="";this.ended=!1;this.chunks=[];this.strm=new x;this.strm.avail_out=0;var d=l.deflateInit2(this.strm,b.level,b.method,b.windowBits,b.memLevel,b.strategy);if(d!==B)throw Error(q[d]);if(b.header&&l.deflateSetHeader(this.strm,b.header),b.dictionary){var e;if(e="string"==typeof b.dictionary?r.string2buf(b.dictionary):"[object ArrayBuffer]"===G.call(b.dictionary)?new Uint8Array(b.dictionary):b.dictionary,d=l.deflateSetDictionary(this.strm,e),d!==B)throw Error(q[d]);this._dict_set=!0}}function h(b,d){var e=new f(d);if(e.push(b,!0),e.err)throw e.msg||q[e.err];return e.result}var l=b("./zlib/deflate"),m=b("./utils/common"),r=b("./utils/strings"),q=b("./zlib/messages"),x=b("./zlib/zstream"),G=Object.prototype.toString,B=0,w=-1,v=0,k=8;f.prototype.push=function(b,d){var e,f,h=this.strm,k=this.options.chunkSize;if(this.ended)return!1;f=d===~~d?d:!0===d?4:0;"string"==typeof b?h.input=r.string2buf(b):"[object ArrayBuffer]"===G.call(b)?h.input=new Uint8Array(b):h.input=b;h.next_in=0;h.avail_in=h.input.length;do{if(0===h.avail_out&&(h.output=new m.Buf8(k),h.next_out=0,h.avail_out=k),e=l.deflate(h,f),1!==e&&e!==B)return this.onEnd(e),this.ended=!0,!1;0!==h.avail_out&&(0!==h.avail_in||4!==f&&2!==f)||("string"===this.options.to?this.onData(r.buf2binstring(m.shrinkBuf(h.output,h.next_out))):this.onData(m.shrinkBuf(h.output,h.next_out)))}while((0d.windowBits&&(d.windowBits=-d.windowBits,0===d.windowBits&&(d.windowBits=-15));!(0<=d.windowBits&&16>d.windowBits)||b&&b.windowBits||(d.windowBits+=32);15d.windowBits&&0===(15&d.windowBits)&&(d.windowBits|=15);this.err=0;this.msg="";this.ended=!1;this.chunks=[];this.strm=new G;this.strm.avail_out=0;b=l.inflateInit2(this.strm,d.windowBits);if(b!==q.Z_OK)throw Error(x[b]);this.header=new B;l.inflateGetHeader(this.strm,this.header)}function h(b,d){var e=new f(d);if(e.push(b,!0),e.err)throw e.msg||x[e.err];return e.result}var l=b("./zlib/inflate"),m=b("./utils/common"),r=b("./utils/strings"),q=b("./zlib/constants"),x=b("./zlib/messages"),G=b("./zlib/zstream"),B=b("./zlib/gzheader"),w=Object.prototype.toString;f.prototype.push=function(b,d){var e,f,h,k,v,x,B=this.strm,G=this.options.chunkSize,A=this.options.dictionary,H=!1;if(this.ended)return!1;f=d===~~d?d:!0===d?q.Z_FINISH:q.Z_NO_FLUSH;"string"==typeof b?B.input=r.binstring2buf(b):"[object ArrayBuffer]"===w.call(b)?B.input=new Uint8Array(b):B.input=b;B.next_in=0;B.avail_in=B.input.length;do{if(0===B.avail_out&&(B.output=new m.Buf8(G),B.next_out=0,B.avail_out=G),e=l.inflate(B,q.Z_NO_FLUSH),e===q.Z_NEED_DICT&&A&&(x="string"==typeof A?r.string2buf(A):"[object ArrayBuffer]"===w.call(A)?new Uint8Array(A):A,e=l.inflateSetDictionary(this.strm,x)),e===q.Z_BUF_ERROR&&!0===H&&(e=q.Z_OK,H=!1),e!==q.Z_STREAM_END&&e!==q.Z_OK)return this.onEnd(e),this.ended=!0,!1;B.next_out&&(0!==B.avail_out&&e!==q.Z_STREAM_END&&(0!==B.avail_in||f!==q.Z_FINISH&&f!==q.Z_SYNC_FLUSH)||("string"===this.options.to?(h=r.utf8border(B.output,B.next_out),k=B.next_out-h,v=r.buf2string(B.output,h),B.next_out=k,B.avail_out=G-k,k&&m.arraySet(B.output,B.output,h,k,0),this.onData(v)):this.onData(m.shrinkBuf(B.output,B.next_out))));0===B.avail_in&&0===B.avail_out&&(H=!0)}while((0d&&(b.subarray&&m||!b.subarray&&l))return String.fromCharCode.apply(null,h.shrinkBuf(b,d));for(var e="",f=0;fb;b++)r[b]=252<=b?6:248<=b?5:240<=b?4:224<=b?3:192<=b?2:1;r[254]=r[254]=1;e.string2buf=function(b){var d,e,f,l,m,k=b.length,q=0;for(l=0;le?1:2048>e?2:65536>e?3:4;d=new h.Buf8(q);for(l=m=0;me?d[m++]=e:2048>e?(d[m++]=192|e>>>6,d[m++]=128|63&e):65536>e?(d[m++]=224|e>>>12,d[m++]=128|e>>>6&63,d[m++]=128|63&e):(d[m++]=240|e>>>18,d[m++]=128|e>>>12&63,d[m++]=128|e>>>6&63,d[m++]=128|63&e);return d};e.buf2binstring=function(b){return f(b,b.length)};e.binstring2buf=function(b){for(var d=new h.Buf8(b.length),e=0,f=d.length;el)q[h++]=l;else if(m=r[l],4l?q[h++]=l:(l-=65536,q[h++]=55296|l>>10&1023,q[h++]=56320|1023&l)}return f(q,h)};e.utf8border=function(b,d){var e;d=d||b.length;d>b.length&&(d=b.length);for(e=d-1;0<=e&&128===(192&b[e]);)e--;return 0>e?d:0===e?d:e+r[b[e]]>d?e:d}},{"./common":62}],64:[function(b,d,e){d.exports=function(b,d,e,m){var f=65535&b|0;b=b>>>16&65535|0;for(var h;0!==e;){h=2E3e;e++){b=e;for(var f=0;8>f;f++)b=1&b?3988292384^b>>>1:b>>>1;d[e]=b}return d}();d.exports=function(b,d,e,r){e=r+e;for(b^=-1;r>>8^f[255&(b^d[r])];return b^-1}},{}],67:[function(b,d,e){function f(b,d){return b.msg=A[d],d}function h(b){for(var d=b.length;0<=--d;)b[d]=0}function l(b){var d=b.state,e=d.pending;e>b.avail_out&&(e=b.avail_out);0!==e&&(W.arraySet(b.output,d.pending_buf,d.pending_out,e,b.next_out),b.next_out+=e,d.pending_out+=e,b.total_out+=e,b.avail_out-=e,d.pending-=e,0===d.pending&&(d.pending_out=0))}function m(b,d){aa._tr_flush_block(b,0<=b.block_start?b.block_start:-1,b.strstart-b.block_start,d);b.block_start=b.strstart;l(b.strm)}function r(b,d){b.pending_buf[b.pending++]=d}function q(b,d){b.pending_buf[b.pending++]=d>>>8&255;b.pending_buf[b.pending++]=255&d}function x(b,d){var e,f,h=b.max_chain_length,l=b.strstart,k=b.prev_length,m=b.nice_match,p=b.strstart>b.w_size-ga?b.strstart-(b.w_size-ga):0,q=b.window,r=b.w_mask,u=b.prev,D=b.strstart+S,v=q[l+k-1],A=q[l+k];b.prev_length>=b.good_match&&(h>>=2);m>b.lookahead&&(m=b.lookahead);do if(e=d,q[e+k]===A&&q[e+k-1]===v&&q[e]===q[l]&&q[++e]===q[l+1]){l+=2;for(e++;q[++l]===q[++e]&&q[++l]===q[++e]&&q[++l]===q[++e]&&q[++l]===q[++e]&&q[++l]===q[++e]&&q[++l]===q[++e]&&q[++l]===q[++e]&&q[++l]===q[++e]&&lk){if(b.match_start=d,k=f,f>=m)break;v=q[l+k-1];A=q[l+k]}}while((d=u[d&r])>p&&0!==--h);return k<=b.lookahead?k:b.lookahead}function G(b){var d,e,f,h,l=b.w_size;do{if(h=b.window_size-b.lookahead-b.strstart,b.strstart>=l+(l-ga)){W.arraySet(b.window,b.window,l,l,0);b.match_start-=l;b.strstart-=l;b.block_start-=l;d=e=b.hash_size;do f=b.head[--d],b.head[d]=f>=l?f-l:0;while(--e);d=e=l;do f=b.prev[--d],b.prev[d]=f>=l?f-l:0;while(--e);h+=l}if(0===b.strm.avail_in)break;d=b.strm;f=b.window;var k=b.strstart+b.lookahead,m=d.avail_in;if(e=(m>h&&(m=h),0===m?0:(d.avail_in-=m,W.arraySet(f,d.input,d.next_in,m,k),1===d.state.wrap?d.adler=F(d.adler,f,m,k):2===d.state.wrap&&(d.adler=L(d.adler,f,m,k)),d.next_in+=m,d.total_in+=m,m)),b.lookahead+=e,b.lookahead+b.insert>=Y)for(h=b.strstart-b.insert,b.ins_h=b.window[h],b.ins_h=(b.ins_h<=Y&&(b.ins_h=(b.ins_h<=Y)if(f=aa._tr_tally(b,b.strstart-b.match_start,b.match_length-Y),b.lookahead-=b.match_length,b.match_length<=b.max_lazy_match&&b.lookahead>=Y){b.match_length--;do b.strstart++,b.ins_h=(b.ins_h<=Y&&(b.ins_h=(b.ins_h<=b.match_length&&(b.strategy===Q||b.match_length===Y&&4096=Y&&b.match_length<=b.prev_length){h=b.strstart+b.lookahead-Y;f=aa._tr_tally(b,b.strstart-1-b.prev_match,b.prev_length-Y);b.lookahead-=b.prev_length-1;b.prev_length-=2;do++b.strstart<=h&&(b.ins_h=(b.ins_h<d.wrap&&(d.wrap=-d.wrap),d.status=d.wrap?ja:ka,b.adler=2===d.wrap?0:1,d.last_flush=H,aa._tr_init(d),M):f(b,N)}function p(b){var d=u(b);d===M&&(b=b.state,b.window_size=2*b.w_size,h(b.head),b.max_lazy_match=C[b.level].max_lazy,b.good_match=C[b.level].good_length,b.nice_match=C[b.level].nice_length,b.max_chain_length=C[b.level].max_chain,b.strstart=0,b.block_start=0,b.lookahead=0,b.insert=0,b.match_length=b.prev_length=Y-1,b.match_available=0,b.ins_h=0);return d}function E(b,d,e,h,l,m){if(!b)return N;var q=1;if(d===V&&(d=6),0>h?(q=0,h=-h):15l||l>ca||e!==ba||8>h||15d||9m||m>J)return f(b,N);8===h&&(h=9);var r=new k;return b.state=r,r.strm=b,r.wrap=q,r.gzhead=null,r.w_bits=h,r.w_size=1<b.pending_buf_size-5&&(e=b.pending_buf_size-5);;){if(1>=b.lookahead){if(G(b),0===b.lookahead&&d===H)return ha;if(0===b.lookahead)break}b.strstart+=b.lookahead;b.lookahead=0;var f=b.block_start+e;if((0===b.strstart||b.strstart>=f)&&(b.lookahead=b.strstart-f,b.strstart=f,m(b,!1),0===b.strm.avail_out)||b.strstart-b.block_start>=b.w_size-ga&&(m(b,!1),0===b.strm.avail_out))return ha}return b.insert=0,d===D?(m(b,!0),0===b.strm.avail_out?Oa:Ea):(b.strstart>b.block_start&&m(b,!1),ha)}),new v(4,4,8,4,B),new v(4,5,16,8,B),new v(4,6,32,32,B),new v(4,4,16,16,w),new v(8,16,32,32,w),new v(8,16,128,128,w),new v(8,32,128,256,w),new v(32,128,258,1024,w),new v(32,258,258,4096,w)];e.deflateInit=function(b,d){return E(b,d,ba,15,8,0)};e.deflateInit2=E;e.deflateReset=p;e.deflateResetKeep=u;e.deflateSetHeader=function(b,d){return b&&b.state?2!==b.state.wrap?N:(b.state.gzhead=d,M):N};e.deflate=function(b,d){var e,k,p,u;if(!b||!b.state||5d)return b?f(b,N):N;if(k=b.state,!b.output||!b.input&&0!==b.avail_in||666===k.status&&d!==D)return f(b,0===b.avail_out?-5:N);if(k.strm=b,e=k.last_flush,k.last_flush=d,k.status===ja)2===k.wrap?(b.adler=0,r(k,31),r(k,139),r(k,8),k.gzhead?(r(k,(k.gzhead.text?1:0)+(k.gzhead.hcrc?2:0)+(k.gzhead.extra?4:0)+(k.gzhead.name?8:0)+(k.gzhead.comment?16:0)),r(k,255&k.gzhead.time),r(k,k.gzhead.time>>8&255),r(k,k.gzhead.time>>16&255),r(k,k.gzhead.time>>24&255),r(k,9===k.level?2:2<=k.strategy||2>k.level?4:0),r(k,255&k.gzhead.os),k.gzhead.extra&&k.gzhead.extra.length&&(r(k,255&k.gzhead.extra.length),r(k,k.gzhead.extra.length>>8&255)),k.gzhead.hcrc&&(b.adler=L(b.adler,k.pending_buf,k.pending,0)),k.gzindex=0,k.status=69):(r(k,0),r(k,0),r(k,0),r(k,0),r(k,0),r(k,9===k.level?2:2<=k.strategy||2>k.level?4:0),r(k,3),k.status=ka)):(p=ba+(k.w_bits-8<<4)<<8,p|=(2<=k.strategy||2>k.level?0:6>k.level?1:6===k.level?2:3)<<6,0!==k.strstart&&(p|=32),k.status=ka,q(k,p+(31-p%31)),0!==k.strstart&&(q(k,b.adler>>>16),q(k,65535&b.adler)),b.adler=1);if(69===k.status)if(k.gzhead.extra){for(p=k.pending;k.gzindex<(65535&k.gzhead.extra.length)&&(k.pending!==k.pending_buf_size||(k.gzhead.hcrc&&k.pending>p&&(b.adler=L(b.adler,k.pending_buf,k.pending-p,p)),l(b),p=k.pending,k.pending!==k.pending_buf_size));)r(k,255&k.gzhead.extra[k.gzindex]),k.gzindex++;k.gzhead.hcrc&&k.pending>p&&(b.adler=L(b.adler,k.pending_buf,k.pending-p,p));k.gzindex===k.gzhead.extra.length&&(k.gzindex=0,k.status=73)}else k.status=73;if(73===k.status)if(k.gzhead.name){p=k.pending;do{if(k.pending===k.pending_buf_size&&(k.gzhead.hcrc&&k.pending>p&&(b.adler=L(b.adler,k.pending_buf,k.pending-p,p)),l(b),p=k.pending,k.pending===k.pending_buf_size)){u=1;break}u=k.gzindexp&&(b.adler=L(b.adler,k.pending_buf,k.pending-p,p));0===u&&(k.gzindex=0,k.status=91)}else k.status=91;if(91===k.status)if(k.gzhead.comment){p=k.pending;do{if(k.pending===k.pending_buf_size&&(k.gzhead.hcrc&&k.pending>p&&(b.adler=L(b.adler,k.pending_buf,k.pending-p,p)),l(b),p=k.pending,k.pending===k.pending_buf_size)){u=1;break}u=k.gzindexp&&(b.adler=L(b.adler,k.pending_buf,k.pending-p,p));0===u&&(k.status=103)}else k.status=103;if(103===k.status&&(k.gzhead.hcrc?(k.pending+2>k.pending_buf_size&&l(b),k.pending+2<=k.pending_buf_size&&(r(k,255&b.adler),r(k,b.adler>>8&255),b.adler=0,k.status=ka)):k.status=ka),0!==k.pending){if(l(b),0===b.avail_out)return k.last_flush=-1,M}else if(0===b.avail_in&&(d<<1)-(4=Y&&0k.lookahead&&(k.match_length=k.lookahead)}if(k.match_length>=Y?(v=aa._tr_tally(k,1,k.match_length-Y),k.lookahead-=k.match_length,k.strstart+=k.match_length,k.match_length=0):(v=aa._tr_tally(k,0,k.window[k.strstart]),k.lookahead--,k.strstart++),v&&(m(k,!1),0===k.strm.avail_out)){v=ha;break a}}v=(k.insert=0,d===D?(m(k,!0),0===k.strm.avail_out?Oa:Ea):k.last_lit&&(m(k,!1),0===k.strm.avail_out)?ha:na)}else v=C[k.level].func(k,d);if(v!==Oa&&v!==Ea||(k.status=666),v===ha||v===Oa)return 0===b.avail_out&&(k.last_flush=-1),M;if(v===na&&(1===d?aa._tr_align(k):5!==d&&(aa._tr_stored_block(k,0,0,!1),3===d&&(h(k.head),0===k.lookahead&&(k.strstart=0,k.block_start=0,k.insert=0))),l(b),0===b.avail_out))return k.last_flush=-1,M}return d!==D?M:0>=k.wrap?1:(2===k.wrap?(r(k,255&b.adler),r(k,b.adler>>8&255),r(k,b.adler>>16&255),r(k,b.adler>>24&255),r(k,255&b.total_in),r(k,b.total_in>>8&255),r(k,b.total_in>>16&255),r(k,b.total_in>>24&255)):(q(k,b.adler>>>16),q(k,65535&b.adler)),l(b),0=e.w_size&&(0===l&&(h(e.head),e.strstart=0,e.block_start=0,e.insert=0),m=new W.Buf8(e.w_size),W.arraySet(m,d,f-e.w_size,e.w_size,0),d=m,f=e.w_size);m=b.avail_in;p=b.next_in;q=b.input;b.avail_in=f;b.next_in=0;b.input=d;for(G(e);e.lookahead>=Y;){f=e.strstart;k=e.lookahead-(Y-1);do e.ins_h=(e.ins_h<E&&(p+=N[f++]<>>24,p>>>=A,E-=A,A=L>>>16&255,0===A)V[q++]=65535&L;else{if(!(16&A)){if(0===(64&A)){L=C[(65535&L)+(p&(1<>>=A,E-=A);15>E&&(p+=N[f++]<>>24,p>>>=A,E-=A,A=L>>>16&255,!(16&A)){if(0===(64&A)){L=W[(65535&L)+(p&(1<B){b.msg="invalid distance too far back";e.mode=30;break a}if(p>>>=A,E-=A,A=q-x,D>A){if(A=D-A,A>v&&e.sane){b.msg="invalid distance too far back";e.mode=30;break a}if(L=0,M=u,0===k){if(L+=w-A,A>3;f-=H;E-=H<<3;b.next_in=f;b.next_out=q;b.avail_in=f>>24&255)+(b>>>8&65280)+((65280&b)<<8)+((255&b)<<24)}function h(){this.mode=0;this.last=!1;this.wrap=0;this.havedict=!1;this.total=this.check=this.dmax=this.flags=0;this.head=null;this.wnext=this.whave=this.wsize=this.wbits=0;this.window=null;this.extra=this.offset=this.length=this.bits=this.hold=0;this.distcode=this.lencode=null;this.have=this.ndist=this.nlen=this.ncode=this.distbits=this.lenbits=0;this.next=null;this.lens=new w.Buf16(320);this.work=new w.Buf16(288);this.distdyn=this.lendyn=null;this.was=this.back=this.sane=0}function l(b){var d;return b&&b.state?(d=b.state,b.total_in=b.total_out=d.total=0,b.msg="",d.wrap&&(b.adler=1&d.wrap),d.mode=W,d.last=0,d.havedict=0,d.dmax=32768,d.head=null,d.hold=0,d.bits=0,d.lencode=d.lendyn=new w.Buf32(aa),d.distcode=d.distdyn=new w.Buf32(F),d.sane=1,d.back=-1,E):C}function m(b){var d;return b&&b.state?(d=b.state,d.wsize=0,d.whave=0,d.wnext=0,l(b)):C}function r(b,d){var e,f;return b&&b.state?(f=b.state,0>d?(e=0,d=-d):(e=(d>>4)+1,48>d&&(d&=15)),d&&(8>d||15=b.wsize?(w.arraySet(b.window,d,e-b.wsize,b.wsize,0),b.wnext=0,b.whave=b.wsize):(h=b.wsize-b.wnext,h>f&&(h=f),w.arraySet(b.window,d,e-f,h,b.wnext),f-=h,f?(w.arraySet(b.window,d,e-f,f,0),b.wnext=f,b.whave=b.wsize):(b.wnext+=h,b.wnext===b.wsize&&(b.wnext=0),b.whaveH;){if(0===r)break a;r--;F+=h[m++]<>>8&255;e.check=k(e.check,X,2,0);H=F=0;e.mode=2;break}if(e.flags=0,e.head&&(e.head.done=!1),!(1&e.wrap)||(((255&F)<<8)+(F>>8))%31){b.msg="incorrect header check";e.mode=30;break}if(8!==(15&F)){b.msg="unknown compression method";e.mode=30;break}if(F>>>=4,H-=4,ha=(15&F)+8,0===e.wbits)e.wbits=ha;else if(ha>e.wbits){b.msg="invalid window size";e.mode=30;break}e.dmax=1<H;){if(0===r)break a;r--;F+=h[m++]<>8&1);512&e.flags&&(X[0]=255&F,X[1]=F>>>8&255,e.check=k(e.check,X,2,0));H=F=0;e.mode=3;case 3:for(;32>H;){if(0===r)break a;r--;F+=h[m++]<>>8&255,X[2]=F>>>16&255,X[3]=F>>>24&255,e.check=k(e.check,X,4,0));H=F=0;e.mode=4;case 4:for(;16>H;){if(0===r)break a;r--;F+=h[m++]<>8);512&e.flags&&(X[0]=255&F,X[1]=F>>>8&255,e.check=k(e.check,X,2,0));H=F=0;e.mode=5;case 5:if(1024&e.flags){for(;16>H;){if(0===r)break a;r--;F+=h[m++]<>>8&255,e.check=k(e.check,X,2,0));H=F=0}else e.head&&(e.head.extra=null);e.mode=6;case 6:if(1024&e.flags&&(Z=e.length,Z>r&&(Z=r),Z&&(e.head&&(ha=e.head.extra_len-e.length,e.head.extra||(e.head.extra=Array(e.head.extra_len)),w.arraySet(e.head.extra,h,m,Z,ha)),512&e.flags&&(e.check=k(e.check,h,Z,m)),r-=Z,m+=Z,e.length-=Z),e.length))break a;e.length=0;e.mode=7;case 7:if(2048&e.flags){if(0===r)break a;Z=0;do ha=h[m+Z++],e.head&&ha&&65536>e.length&&(e.head.name+=String.fromCharCode(ha));while(ha&&Ze.length&&(e.head.comment+=String.fromCharCode(ha));while(ha&&ZH;){if(0===r)break a;r--;F+=h[m++]<>9&1,e.head.done=!0);b.adler=e.check=0;e.mode=12;break;case 10:for(;32>H;){if(0===r)break a;r--;F+=h[m++]<>>=7&H;H-=7&H;e.mode=27;break}for(;3>H;){if(0===r)break a;r--;F+=h[m++]<>>=1,--H,3&F){case 0:e.mode=14;break;case 1:da=e;if(L){G=new w.Buf32(512);B=new w.Buf32(32);for(S=0;144>S;)da.lens[S++]=8;for(;256>S;)da.lens[S++]=9;for(;280>S;)da.lens[S++]=7;for(;288>S;)da.lens[S++]=8;p(1,da.lens,0,288,G,0,da.work,{bits:9});for(S=0;32>S;)da.lens[S++]=5;p(2,da.lens,0,32,B,0,da.work,{bits:5});L=!1}da.lencode=G;da.lenbits=9;da.distcode=B;da.distbits=5;if(e.mode=20,6===d){F>>>=2;H-=2;break a}break;case 2:e.mode=17;break;case 3:b.msg="invalid block type",e.mode=30}F>>>=2;H-=2;break;case 14:F>>>=7&H;for(H-=7&H;32>H;){if(0===r)break a;r--;F+=h[m++]<>>16^65535)){b.msg="invalid stored block lengths";e.mode=30;break}if(e.length=65535&F,F=0,H=0,e.mode=15,6===d)break a;case 15:e.mode=16;case 16:if(Z=e.length){if(Z>r&&(Z=r),Z>A&&(Z=A),0===Z)break a;w.arraySet(l,h,m,Z,q);r-=Z;m+=Z;A-=Z;q+=Z;e.length-=Z;break}e.mode=12;break;case 17:for(;14>H;){if(0===r)break a;r--;F+=h[m++]<>>=5,H-=5,e.ndist=(31&F)+1,F>>>=5,H-=5,e.ncode=(15&F)+4,F>>>=4,H-=4,286H;){if(0===r)break a;r--;F+=h[m++]<>>=3;H-=3}for(;19>e.have;)e.lens[Hb[e.have++]]=0;if(e.lencode=e.lendyn,e.lenbits=7,Oa={bits:e.lenbits},na=p(0,e.lens,0,19,e.lencode,0,e.work,Oa),e.lenbits=Oa.bits,na){b.msg="invalid code lengths set";e.mode=30;break}e.have=0;e.mode=19;case 19:for(;e.have>>24,S=65535&Ea,!(Y<=H);){if(0===r)break a;r--;F+=h[m++]<S)F>>>=Y,H-=Y,e.lens[e.have++]=S;else{if(16===S){for(da=Y+2;H>>=Y,H-=Y,0===e.have){b.msg="invalid bit length repeat";e.mode=30;break}ha=e.lens[e.have-1];Z=3+(3&F);F>>>=2;H-=2}else if(17===S){for(da=Y+3;H>>=Y;H-=Y;ha=0;Z=3+(7&F);F>>>=3;H-=3}else{for(da=Y+7;H>>=Y;H-=Y;ha=0;Z=11+(127&F);F>>>=7;H-=7}if(e.have+Z>e.nlen+e.ndist){b.msg="invalid bit length repeat";e.mode=30;break}for(;Z--;)e.lens[e.have++]=ha}}if(30===e.mode)break;if(0===e.lens[256]){b.msg="invalid code -- missing end-of-block";e.mode=30;break}if(e.lenbits=9,Oa={bits:e.lenbits},na=p(1,e.lens,0,e.nlen,e.lencode,0,e.work,Oa),e.lenbits=Oa.bits,na){b.msg="invalid literal/lengths set";e.mode=30;break}if(e.distbits=6,e.distcode=e.distdyn,Oa={bits:e.distbits},na=p(2,e.lens,e.nlen,e.ndist,e.distcode,0,e.work,Oa),e.distbits=Oa.bits,na){b.msg="invalid distances set";e.mode=30;break}if(e.mode=20,6===d)break a;case 20:e.mode=21;case 21:if(6<=r&&258<=A){b.next_out=q;b.avail_out=A;b.next_in=m;b.avail_in=r;e.hold=F;e.bits=H;u(b,R);q=b.next_out;l=b.output;A=b.avail_out;m=b.next_in;h=b.input;r=b.avail_in;F=e.hold;H=e.bits;12===e.mode&&(e.back=-1);break}for(e.back=0;Ea=e.lencode[F&(1<>>24,da=Ea>>>16&255,S=65535&Ea,!(Y<=H);){if(0===r)break a;r--;F+=h[m++]<>ga)],Y=Ea>>>24,da=Ea>>>16&255,S=65535&Ea,!(ga+Y<=H);){if(0===r)break a;r--;F+=h[m++]<>>=ga;H-=ga;e.back+=ga}if(F>>>=Y,H-=Y,e.back+=Y,e.length=S,0===da){e.mode=26;break}if(32&da){e.back=-1;e.mode=12;break}if(64&da){b.msg="invalid literal/length code";e.mode=30;break}e.extra=15&da;e.mode=22;case 22:if(e.extra){for(da=e.extra;H>>=e.extra;H-=e.extra;e.back+=e.extra}e.was=e.length;e.mode=23;case 23:for(;Ea=e.distcode[F&(1<>>24,da=Ea>>>16&255,S=65535&Ea,!(Y<=H);){if(0===r)break a;r--;F+=h[m++]<>ga)],Y=Ea>>>24,da=Ea>>>16&255,S=65535&Ea,!(ga+Y<=H);){if(0===r)break a;r--;F+=h[m++]<>>=ga;H-=ga;e.back+=ga}if(F>>>=Y,H-=Y,e.back+=Y,64&da){b.msg="invalid distance code";e.mode=30;break}e.offset=S;e.extra=15&da;e.mode=24;case 24:if(e.extra){for(da=e.extra;H>>=e.extra;H-=e.extra;e.back+=e.extra}if(e.offset>e.dmax){b.msg="invalid distance too far back";e.mode=30;break}e.mode=25;case 25:if(0===A)break a;if(Z=R-A,e.offset>Z){if(Z=e.offset-Z,Z>e.whave&&e.sane){b.msg="invalid distance too far back";e.mode=30;break}Z>e.wnext?(Z-=e.wnext,ta=e.wsize-Z):ta=e.wnext-Z;Z>e.length&&(Z=e.length);da=e.window}else da=l,ta=q-e.offset,Z=e.length;Z>A&&(Z=A);A-=Z;e.length-=Z;do l[q++]=da[ta++];while(--Z);0===e.length&&(e.mode=21);break;case 26:if(0===A)break a;l[q++]=e.length;A--;e.mode=21;break;case 27:if(e.wrap){for(;32>H;){if(0===r)break a;r--;F|=h[m++]<H;){if(0===r)break a;r--;F+=h[m++]<e.mode&&(27>e.mode||4!==d))&&x(b,b.output,b.next_out,R-b.avail_out)?(e.mode=31,-4):(aa-=b.avail_in,R-=b.avail_out,b.total_in+=aa,b.total_out+=R,e.total+=R,e.wrap&&R&&(b.adler=e.check=e.flags?k(e.check,l,R,b.next_out-R):v(e.check,l,R,b.next_out-R)),b.data_type=e.bits+(e.last?64:0)+(12===e.mode?128:0)+(20===e.mode||15===e.mode?256:0),(0===aa&&0===R||4===d)&&na===E&&(na=-5),na)};e.inflateEnd=function(b){if(!b||!b.state)return C;var d=b.state;return d.window&&(d.window=null),b.state=null,E};e.inflateGetHeader=function(b,d){var e;return b&&b.state?(e=b.state,0===(2&e.wrap)?C:(e.head=d,d.done=!1,E)):C};e.inflateSetDictionary=function(b,d){var e,f,h=d.length;return b&&b.state?(e=b.state,0!==e.wrap&&11!==e.mode?C:11===e.mode&&(f=1,f=v(f,d,h,0),f!==e.check)?-3:x(b,d,h,h)?(e.mode=31,-4):(e.havedict=1,E)):C};e.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":62,"./adler32":64,"./crc32":66,"./inffast":69,"./inftrees":71}],71:[function(b,d,e){var f=b("../utils/common"),h=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],l=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],m=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],r=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];d.exports=function(b,d,e,B,w,v,k,u){var p,q,x,G,aa,F,L,A,H=u.bits,D,M,N,V,Q,J,K=0,ba,ca=null,Na=0,R=new f.Buf16(16);G=new f.Buf16(16);var Z=null,ta=0;for(D=0;15>=D;D++)R[D]=0;for(M=0;MN&&(V=N),0===N)return w[v++]=20971520,w[v++]=20971520,u.bits=1,0;for(H=1;H=D;D++)if(p<<=1,p-=R[D],0>p)return-1;if(0D;D++)G[D+1]=G[D]+R[D];for(M=0;Maa?(L=Z[ta+k[M]],A=ca[Na+k[M]]):(L=96,A=0);p=1<>J)+q]=F<<24|L<<16|A|0;while(0!==q);for(p=1<>=1;if(0!==p?(ba&=p-1,ba+=p):ba=0,M++,0===--R[D]){if(D===N)break;D=d[e+k[M]]}if(D>V&&(ba&B)!==x){0===J&&(J=V);G+=H;Q=D-J;for(p=1<=p));)Q++,p<<=1;if(K+=1<>>8&255}function r(b,d,e){b.bi_valid>K-e?(b.bi_buf|=d<>K-b.bi_valid,b.bi_valid+=e-K):(b.bi_buf|=d<>>=1,e<<=1;while(0<--d);return e>>>1}function G(b,d,e){var f,h=Array(J+1),k=0;for(f=1;f<=J;f++)h[f]=k=k+e[f-1]<<1;for(e=0;e<=d;e++)f=b[2*e+1],0!==f&&(b[2*e]=x(h[f]++,f))}function B(b){var d;for(d=0;df?ja[f]:ja[256+(f>>>7)],q(b,k,e),l=ta[k],0!==l&&(f-=na[k],r(b,f,l)));while(mb.heap_len;)h=b.heap[++b.heap_len]=2>q?++q:0,l[2*h]=1,b.depth[h]=0,b.opt_len--,m&&(b.static_len-=f[2*h+1]);d.max_code=q;for(e=b.heap_len>>1;1<=e;e--)k(b,l,e);h=p;do e=b.heap[1],b.heap[1]=b.heap[b.heap_len--],k(b,l,1),f=b.heap[1],b.heap[--b.heap_max]=e,b.heap[--b.heap_max]=f,l[2*h]=l[2*e]+l[2*f],b.depth[h]=(b.depth[e]>=b.depth[f]?b.depth[e]:b.depth[f])+1,l[2*e+1]=l[2*f+1]=h,b.heap[1]=h++,k(b,l,1);while(2<=b.heap_len);b.heap[--b.heap_max]=b.heap[1];var r,u,m=d.dyn_tree,p=d.max_code,v=d.stat_desc.static_tree,w=d.stat_desc.has_stree,x=d.stat_desc.extra_bits,z=d.stat_desc.extra_base,A=d.stat_desc.max_length,B=0;for(f=0;f<=J;f++)b.bl_count[f]=0;m[2*b.heap[b.heap_max]+1]=0;for(e=b.heap_max+1;eA&&(f=A,B++),m[2*h+1]=f,h>p||(b.bl_count[f]++,r=0,h>=z&&(r=x[h-z]),u=m[2*h],b.opt_len+=u*(f+r),w&&(b.static_len+=u*(v[2*h+1]+r)));if(0!==B){do{for(f=A-1;0===b.bl_count[f];)f--;b.bl_count[f]--;b.bl_count[f+1]+=2;b.bl_count[A]--;B-=2}while(0p||(m[2*r+1]!==f&&(b.opt_len+=(f-m[2*r+1])*m[2*r],m[2*r+1]=f),h--)}G(l,q,b.bl_count)}function E(b,d,e){var f,h,k=-1,l=d[1],m=0,p=7,q=4;0===l&&(p=138,q=3);d[2*(e+1)+1]=65535;for(f=0;f<=e;f++)h=l,l=d[2*(f+1)+1],++m=m?b.bl_tree[2*Na]++:b.bl_tree[2*R]++,m=0,k=h,0===l?(p=138,q=3):h===l?(p=6,q=3):(p=7,q=4))}function C(b,d,e){var f,h,k=-1,l=d[1],m=0,p=7,u=4;0===l&&(p=138,u=3);for(f=0;f<=e;f++)if(h=l,l=d[2*(f+1)+1],!(++m=m?(q(b,Na,b.bl_tree),r(b,m-3,3)):(q(b,R,b.bl_tree),r(b,m-11,7));m=0;k=h;0===l?(p=138,u=3):h===l?(p=6,u=3):(p=7,u=4)}}function W(b){var d,e=4093624447;for(d=0;31>=d;d++,e>>>=1)if(1&e&&0!==b.dyn_ltree[2*d])return L;if(0!==b.dyn_ltree[18]||0!==b.dyn_ltree[20]||0!==b.dyn_ltree[26])return A;for(d=32;df;f++)for(ha[f]=e,d=0;d<1<f;f++)for(na[f]=e,d=0;d<1<>=7;f=d;)S[2*d+1]=8,d++,k[8]++;for(;255>=d;)S[2*d+1]=9,d++,k[9]++;for(;279>=d;)S[2*d+1]=7,d++,k[7]++;for(;287>=d;)S[2*d+1]=8,d++,k[8]++;G(S,M+1,k);for(d=0;d>>3;k=b.static_len+3+7>>>3;k<=h&&(h=k)}else h=k=e+5;if(e+4<=h&&-1!==d)aa(b,d,e,f);else if(4===b.strategy||k===h)r(b,2+(f?1:0),3),u(b,S,ga);else{r(b,4+(f?1:0),3);d=b.l_desc.max_code+1;e=b.d_desc.max_code+1;l+=1;r(b,d-257,5);r(b,e-1,5);r(b,l-4,4);for(h=0;h>>8&255,b.pending_buf[b.d_buf+2*b.last_lit+1]=255&d,b.pending_buf[b.l_buf+b.last_lit]=255&e,b.last_lit++,0===d?b.dyn_ltree[2*e]++:(b.matches++,d--,b.dyn_ltree[2*(ka[e]+D+1)]++,b.dyn_dtree[2*(256>d?ja[d]:ja[256+(d>>>7)])]++),b.last_lit===b.lit_bufsize-1};e._tr_align=function(b){r(b,2,3);q(b,ba,S);16===b.bi_valid?(m(b,b.bi_buf),b.bi_buf=0,b.bi_valid=0):8<=b.bi_valid&&(b.pending_buf[b.pending++]=255&b.bi_buf,b.bi_buf>>=8,b.bi_valid-=8)}},{"../utils/common":62}],74:[function(b,d,e){d.exports=function(){this.input=null;this.total_in=this.avail_in=this.next_in=0;this.output=null;this.total_out=this.avail_out=this.next_out=0;this.msg="";this.state=null;this.data_type=2;this.adler=0}},{}]},{},[10])(10)});!function(a){"object"==typeof exports?module.exports=a():"function"==typeof define&&define.amd?define(a):"undefined"!=typeof window?window.JSZipUtils=a():"undefined"!=typeof global?global.JSZipUtils=a():"undefined"!=typeof self&&(self.JSZipUtils=a())}(function(){return function b(d,e,f){function h(m,q){if(!e[m]){if(!d[m]){var r="function"==typeof require&&require;if(!q&&r)return r(m,!0);if(l)return l(m,!0);throw Error("Cannot find module '"+m+"'");}r=e[m]={exports:{}};d[m][0].call(r.exports,function(b){var e=d[m][1][b];return h(e?e:b)},r,r.exports,b,d,e,f)}return e[m].exports}for(var l="function"==typeof require&&require,m=0;m>>4^C)&252645135;C^=k;E^=k<<4;k=(E>>>16^C)&65535;C^=k;E^=k<<16;k=(C>>>2^E)&858993459;E^=k;C^=k<<2;k=(C>>>8^E)&16711935;E^=k;C^=k<<8;k=(E>>>1^C)&1431655765;C^=k;E^=k<<1;E=E<<1|E>>>31;C=C<<1|C>>>31;for(v=0;v>>4|C<<28)^a[f+1],k=E,E=C,C=k^(l[u>>>24&63]|r[u>>>16&63]|x[u>>>8&63]|B[u&63]|h[p>>>24&63]|m[p>>>16&63]|q[p>>>8&63]|G[p&63]);k=E;E=C;C=k}E=E>>>1|E<<31;C=C>>>1|C<<31;k=(E>>>1^C)&1431655765;C^=k;E^=k<<1;k=(C>>>8^E)&16711935;E^=k;C^=k<<8;k=(C>>>2^E)&858993459;E^=k;C^=k<<2;k=(E>>>16^C)&65535;C^=k;E^=k<<16;k=(E>>>4^C)&252645135;C^=k;E^=k<<4;1==e&&(d?(aa=E,L=C):(E^=F,C^=A));tempresult=d?tempresult+String.fromCharCode(E>>>24,E>>>16&255,E>>>8&255,E&255,C>>>24,C>>>16&255,C>>>8&255,C&255):tempresult+String.fromCharCode(E>>>16&65535,E&65535,C>>>16&65535,C&65535);d?N+=16:N+=8;512==N&&(result+=tempresult,tempresult="",N=0)}return result+tempresult}function des_createKeys(a){pc2bytes0=[0,4,536870912,536870916,65536,65540,536936448,536936452,512,516,536871424,536871428,66048,66052,536936960,536936964];pc2bytes1=[0,1,1048576,1048577,67108864,67108865,68157440,68157441,256,257,1048832,1048833,67109120,67109121,68157696,68157697];pc2bytes2=[0,8,2048,2056,16777216,16777224,16779264,16779272,0,8,2048,2056,16777216,16777224,16779264,16779272];pc2bytes3=[0,2097152,134217728,136314880,8192,2105344,134225920,136323072,131072,2228224,134348800,136445952,139264,2236416,134356992,136454144];pc2bytes4=[0,262144,16,262160,0,262144,16,262160,4096,266240,4112,266256,4096,266240,4112,266256];pc2bytes5=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488];pc2bytes6=[0,268435456,524288,268959744,2,268435458,524290,268959746,0,268435456,524288,268959744,2,268435458,524290,268959746];pc2bytes7=[0,65536,2048,67584,536870912,536936448,536872960,536938496,131072,196608,133120,198656,537001984,537067520,537004032,537069568];pc2bytes8=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578];pc2bytes9=[0,268435456,8,268435464,0,268435456,8,268435464,1024,268436480,1032,268436488,1024,268436480,1032,268436488];pc2bytes10=[0,32,0,32,1048576,1048608,1048576,1048608,8192,8224,8192,8224,1056768,1056800,1056768,1056800];pc2bytes11=[0,16777216,512,16777728,2097152,18874368,2097664,18874880,67108864,83886080,67109376,83886592,69206016,85983232,69206528,85983744];pc2bytes12=[0,4096,134217728,134221824,524288,528384,134742016,134746112,16,4112,134217744,134221840,524304,528400,134742032,134746128];pc2bytes13=[0,4,256,260,0,4,256,260,1,5,257,261,1,5,257,261];for(var b=24<=a.length?3:1,d=Array(32*b),e=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0],f,h,l=0,m=0,r,q=0;q>>4^right)&252645135,right^=r,left^=r<<4,r=(right>>>-16^left)&65535,left^=r,right^=r<<-16,r=(left>>>2^right)&858993459,right^=r,left^=r<<2,r=(right>>>-16^left)&65535,left^=r,right^=r<<-16,r=(left>>>1^right)&1431655765,right^=r,left^=r<<1,r=(right>>>8^left)&16711935,left^=r,right^=r<<8,r=(left>>>1^right)&1431655765,right^=r,left^=r<<1,r=left<<8|right>>>20&240,left=right<<24|right<<8&16711680|right>>>8&65280|right>>>24&240,right=r,i=0;i>>26,right=right<<2|right>>>26):(left=left<<1|left>>>27,right=right<<1|right>>>27),left&=-15,right&=-15,f=pc2bytes0[left>>>28]|pc2bytes1[left>>>24&15]|pc2bytes2[left>>>20&15]|pc2bytes3[left>>>16&15]|pc2bytes4[left>>>12&15]|pc2bytes5[left>>>8&15]|pc2bytes6[left>>>4&15],h=pc2bytes7[right>>>28]|pc2bytes8[right>>>24&15]|pc2bytes9[right>>>20&15]|pc2bytes10[right>>>16&15]|pc2bytes11[right>>>12&15]|pc2bytes12[right>>>8&15]|pc2bytes13[right>>>4&15],r=(h>>>16^f)&65535,d[m++]=f^r,d[m++]=h^r<<16;return d}function stringToHex(a){for(var b="",d="0123456789abcdef".split(""),e=0;e>4]+d[a.charCodeAt(e)&15];return b}function HexTostring(a){for(var b="",d=0;dGLE_bCubeControls&&(G_35.rotation.x-=(C.y-E.y)*this.rd,180/Math.PI*G_35.rotation.x<-GLE_AngleLimit&&(G_35.rotation.x=-GLE_AngleLimit*Math.PI/180),180/Math.PI*G_35.rotation.x>GLE_AngleLimit&&(G_35.rotation.x=GLE_AngleLimit*Math.PI/180));E.copy(C)}}();this.update=function(){w.noRotate||w.rotateCamera()};this.reset=function(){u=v.NONE;w.target.copy(w.target0);w.object.position.copy(w.position0);w.object.up.copy(w.up0);p.subVectors(w.object.position,w.target);w.object.lookAt(w.target);w.dispatchEvent(W);k.copy(w.object.position)};this.dispose=function(){this.domElement.removeEventListener("contextmenu",B,!1);this.domElement.removeEventListener("mousedown",h,!1);this.domElement.removeEventListener("wheel",r,!1);this.domElement.removeEventListener("touchstart",q,!1);this.domElement.removeEventListener("touchend",G,!1);this.domElement.removeEventListener("touchmove",x,!1);document.removeEventListener("mousemove",l,!1);document.removeEventListener("mouseup",m,!1);window.removeEventListener("keydown",e,!1);window.removeEventListener("keyup",f,!1)};this.domElement.addEventListener("contextmenu",B,!1);this.domElement.addEventListener("mousedown",h,!1);this.domElement.addEventListener("wheel",r,!1);this.domElement.addEventListener("touchstart",q,!1);this.domElement.addEventListener("touchend",G,!1);this.domElement.addEventListener("touchmove",x,!1);window.addEventListener("keydown",e,!1);window.addEventListener("keyup",f,!1);this.handleResize();this.update()};GLE.CubeTs.prototype=Object.create(GLE.EventDispatcher.prototype);GLE.CubeTs.prototype.constructor=GLE.CubeTs;!function(a,b){"object"==typeof exports&&"undefined"!=typeof module?b(exports):"function"==typeof define&&define.amd?define(["exports"],b):b(a.d3=a.d3||{})}(this,function(a){function b(a,b){return ab?1:a>=b?0:NaN}function d(a){var c;return 1===a.length&&(c=a,a=function(a,d){return b(c(a),d)}),{left:function(b,c,d,e){null==d&&(d=0);for(null==e&&(e=b.length);d>>1;0>a(b[f],c)?d=f+1:e=f}return d},right:function(b,c,d,e){null==d&&(d=0);for(null==e&&(e=b.length);d>>1;0=c)for(d=e=c;++gc&&(d=c),e=c)for(d=e=c;++gc&&(d=c),e(e=arguments.length)?(b=a,a=0,1):3>e?1:+c;for(var d=-1,e=0|Math.max(0,Math.ceil((b-a)/c)),f=Array(e);++d=Wj?10:b>=Xj?5:b>=Yj?2:1)*Math.pow(10,a):-Math.pow(10,-a)/(b>=Wj?10:b>=Xj?5:b>=Yj?2:1)}function w(a,b,c){var d=Math.abs(b-a)/Math.max(0,c);c=Math.pow(10,Math.floor(Math.log(d)/Math.LN10));d/=c;return d>=Wj?c*=10:d>=Xj?c*=5:d>=Yj&&(c*=2),b=(b=+b)||2>d)return+c(a[0],0,a);if(1<=b)return+c(a[d-1],d-1,a);var d;b*=d-1;d=Math.floor(b);var e=+c(a[d],d,a);return e+(+c(a[d+1],d+1,a)-e)*(b-d)}}function u(a,b){var c,d,e=a.length,f=-1;if(null==b)for(;++f=c)for(d=c;++fd&&(d=c)}else for(;++f=c)for(d=c;++fd&&(d=c);return d}function p(a){var b,c,d,e=a.length;b=-1;for(var f=0;++b=c)for(d=c;++fc&&(d=c)}else for(;++f=c)for(d=c;++fc&&(d=c);return d}function C(a){if(!(e=a.length))return[];for(var b=-1,c=E(a,W),d=Array(c);++bb?1:a>=b?0:NaN}function S(a){return a.ownerDocument&&a.ownerDocument.defaultView||a.document&&a||a.defaultView}function ga(a,b){return a.style.getPropertyValue(b)||S(a).getComputedStyle(a,null).getPropertyValue(b)}function ja(a){return a.classList||new ka(a)}function ka(a){this._node=a;this._names=(a.getAttribute("class")||"").trim().split(/^|\s+/)}function ha(a,b){for(var c=ja(a),d=-1,e=b.length;++darguments.length&&(c=b,b=Nc().changedTouches);for(var d,e=0,f=b?b.length:0;e>8&15|b>>4&240,b>>4&15|240&b,(15&b)<<4|15&b,1):(b=Dp.exec(a))?Wb(parseInt(b[1],16)):(b=Ep.exec(a))?new fb(b[1],b[2],b[3],1):(b=Fp.exec(a))?new fb(255*b[1]/100,255*b[2]/100,255*b[3]/100,1):(b=Gp.exec(a))?Xd(b[1],b[2],b[3],b[4]):(b=Hp.exec(a))?Xd(255*b[1]/100,255*b[2]/100,255*b[3]/100,b[4]):(b=Ip.exec(a))?Ke(b[1],b[2]/100,b[3]/100,1):(b=Jp.exec(a))?Ke(b[1],b[2]/100,b[3]/100,b[4]):Fl.hasOwnProperty(a)?Wb(Fl[a]):"transparent"===a?new fb(NaN,NaN,NaN,0):null}function Wb(a){return new fb(a>>16&255,a>>8&255,255&a,1)}function Xd(a,b,c,d){return 0>=d&&(a=b=c=NaN),new fb(a,b,c,d)}function xf(a){return a instanceof uc||(a=Vb(a)),a?new fb((a=a.rgb()).r,a.g,a.b,a.opacity):new fb}function dd(a,b,c,d){return 1===arguments.length?xf(a):new fb(a,b,c,null==d?1:d)}function fb(a,b,c,d){this.r=+a;this.g=+b;this.b=+c;this.opacity=+d}function yf(a){return(16>(a=Math.max(0,Math.min(255,Math.round(a)||0)))?"0":"")+a.toString(16)}function Ke(a,b,c,d){return 0>=d?a=b=c=NaN:0>=c||1<=c?a=b=NaN:0>=b&&(a=NaN),new Ob(a,b,c,d)}function Yd(a,b,c,d){return 1===arguments.length?function(a){if(a instanceof Ob)return new Ob(a.h,a.s,a.l,a.opacity);if(a instanceof uc||(a=Vb(a)),!a)return new Ob;if(a instanceof Ob)return a;var b=(a=a.rgb()).r/255,c=a.g/255,d=a.b/255,e=Math.min(b,c,d),f=Math.max(b,c,d),g=NaN,h=f-e,k=(f+e)/2;return h?(g=b===f?(c-d)/h+6*(ck?f+e:2-f-e,g*=60):h=0k?0:g,new Ob(g,h,k,a.opacity)}(a):new Ob(a,b,c,null==d?1:d)}function Ob(a,b,c,d){this.h=+a;this.s=+b;this.l=+c;this.opacity=+d}function wd(a,b,c){return 255*(60>a?b+(c-b)*a/60:180>a?c:240>a?b+(c-b)*(240-a)/60:b)}function Xb(a){if(a instanceof Yb)return new Yb(a.l,a.a,a.b,a.opacity);if(a instanceof sb){if(isNaN(a.h))return new Yb(a.l,0,0,a.opacity);var b=a.h*Gl;return new Yb(a.l,Math.cos(b)*a.c,Math.sin(b)*a.c,a.opacity)}a instanceof fb||(a=xf(a));var c,d=zf(a.r),e=zf(a.g),f=zf(a.b),g=Le((.2225045*d+.7168786*e+.0606169*f)/1);return d===e&&e===f?b=c=g:(b=Le((.4360747*d+.3850649*e+.1430804*f)/.96422),c=Le((.0139322*d+.0971045*e+.7141733*f)/.82521)),new Yb(116*g-16,500*(b-g),200*(g-c),a.opacity)}function Rc(a,b,c,d){return 1===arguments.length?Xb(a):new Yb(a,b,c,null==d?1:d)}function Yb(a,b,c,d){this.l=+a;this.a=+b;this.b=+c;this.opacity=+d}function Le(a){return a>Kp?Math.pow(a,1/3):a/Hl+Il}function xd(a){return a>Rg?a*a*a:Hl*(a-Il)}function ed(a){return 255*(.0031308>=a?12.92*a:1.055*Math.pow(a,1/2.4)-.055)}function zf(a){return.04045>=(a/=255)?a/12.92:Math.pow((a+.055)/1.055,2.4)}function og(a){if(a instanceof sb)return new sb(a.h,a.c,a.l,a.opacity);if(a instanceof Yb||(a=Xb(a)),0===a.a&&0===a.b)return new sb(NaN,0,a.l,a.opacity);var b=Math.atan2(a.b,a.a)*Jl;return new sb(0>b?b+360:b,Math.sqrt(a.a*a.a+a.b*a.b),a.l,a.opacity)}function Me(a,b,c,d){return 1===arguments.length?og(a):new sb(a,b,c,null==d?1:d)}function sb(a,b,c,d){this.h=+a;this.c=+b;this.l=+c;this.opacity=+d}function sa(a,b,c,d){var e;if(1===arguments.length)if(e=a,e instanceof Ba)e=new Ba(e.h,e.s,e.l,e.opacity);else{e instanceof fb||(e=xf(e));var f=e.g/255,g=e.b/255,h=(Kl*g+e.r/255*-1.7884503806-3.5172982438*f)/(Kl+-1.7884503806-3.5172982438),g=g-h,k=(1.97294*(f-h)- -.29227*g)/-.90649,g=(f=Math.sqrt(k*k+g*g)/(1.97294*h*(1-h)))?Math.atan2(k,g)*Jl-120:NaN;e=new Ba(0>g?g+360:g,f,h,e.opacity)}else e=new Ba(a,b,c,null==d?1:d);return e}function Ba(a,b,c,d){this.h=+a;this.s=+b;this.l=+c;this.opacity=+d}function tb(a,b,c,d,e){var f=a*a,g=f*a;return((1-3*a+3*f-g)*b+(4-6*f+3*g)*c+(1+3*a+3*f-3*g)*d+g*e)/6}function Xa(a){var b=a.length-1;return function(c){var d=0>=c?c=0:1<=c?(c=1,b-1):Math.floor(c*b),e=a[d],f=a[d+1];return tb((c-d/b)*b,0(c%=1)?++c:c)*b);return tb((c-d/b)*b,a[(d+b-1)%b],a[d%b],a[(d+1)%b],a[(d+2)%b])}}function pg(a){return function(){return a}}function Sc(a,b){return function(c){return a+c*b}}function fd(a,b){var c=b-a;return c?Sc(a,180c?c-360*Math.round(c/360):c):pg(isNaN(a)?b:a)}function Zb(a){return 1==(a=+a)?mb:function(b,c){return c-b?function(a,b,c){return a=Math.pow(a,c),b=Math.pow(b,c)-a,c=1/c,function(d){return Math.pow(a+d*b,c)}}(b,c,a):pg(isNaN(b)?c:b)}}function mb(a,b){var c=b-a;return c?Sc(a,c):pg(isNaN(a)?b:a)}function wi(a){return function(b){var c,d,e=b.length,f=Array(e),g=Array(e),h=Array(e);for(c=0;cf&&(e=b.slice(f,e),h[g]?h[g]+=e:h[++g]=e),(c=c[0])===(d=d[0])?h[g]?h[g]+=d:h[++g]=d:(h[++g]=null,k.push({i:g,x:Wa(c,d)})),f=dk.lastIndex;return fh.length?k[0]?function(a){return function(b){return a(b)+""}}(k[0].x):function(a){return function(){return a}}(b):(b=k.length,function(a){for(var c,d=0;dm)d=Math.log(h/g)/Jh,c=function(a){return[e+a*k,f+a*l,g*Math.exp(Jh*a*d)]};else{var P=Math.sqrt(m);c=(h*h-g*g+4*m)/(4*g*P);var h=(h*h-g*g-4*m)/(4*h*P),n=Math.log(Math.sqrt(c*c+1)-c);d=(Math.log(Math.sqrt(h*h+1)-h)-n)/Jh;c=function(a){var b;a*=d;var c=uh(n),h=g/(2*P),m=c*(b=Jh*a+n,((b=Math.exp(2*b))-1)/(b+1)),p=n;b=((p=Math.exp(p))-1/p)/2;h*=m-b;return[e+h*k,f+h*l,g*c/uh(Jh*a+n)]}}return c.duration=1E3*d,c}function nb(a){return function(b,c){var d=a((b=Yd(b)).h,(c=Yd(c)).h),e=mb(b.s,c.s),f=mb(b.l,c.l),g=mb(b.opacity,c.opacity);return function(a){return b.h=d(a),b.s=e(a),b.l=f(a),b.opacity=g(a),b+""}}}function Ra(a){return function(b,c){var d=a((b=Me(b)).h,(c=Me(c)).h),e=mb(b.c,c.c),f=mb(b.l,c.l),g=mb(b.opacity,c.opacity);return function(a){return b.h=d(a),b.c=e(a),b.l=f(a),b.opacity=g(a),b+""}}}function Ne(a){return function oa(b){function c(c,d){var e=a((c=sa(c)).h,(d=sa(d)).h),f=mb(c.s,d.s),g=mb(c.l,d.l),h=mb(c.opacity,d.opacity);return function(a){return c.h=e(a),c.s=f(a),c.l=g(Math.pow(a,b)),c.opacity=h(a),c+""}}return b=+b,c.gamma=oa,c}(1)}function Zd(){return cg||(Ml(Sj),cg=Kh.now()+Ri)}function Sj(){cg=0}function Tc(){this._call=this._time=this._next=null}function gd(a,b,c){var d=new Tc;return d.restart(a,b,c),d}function $d(){Zd();++Sg;for(var a,b=Si;b;)0<=(a=cg-b._time)&&b._call.call(null,a),b=b._next;--Sg}function Bf(){cg=(Ti=Kh.now())+Ri;Sg=Lh=0;try{$d()}finally{Sg=0;for(var a,b,c=Si,d=1/0;c;)c._call?(d>c._time&&(d=c._time),a=c,c=c._next):(b=c._next,c._next=null,c=a?a._next=b:Si=b);Mh=a;be(d);cg=0}}function ae(){var a=Kh.now(),b=a-Ti;1E3c.state,c.state=6,c.timer.stop(),d&&c.on.call("interrupt",a,a.__data__,c.index,c.group),delete f[e]):g=!1;g&&delete a.__transition}}function Da(a,b,c){var d=a._id;return a.each(function(){var a=Fc(this,d);(a.value||(a.value={}))[b]=c.apply(this,arguments)}),function(a){return ac(a,d).value[b]}}function Pb(a,b){var c;return("number"==typeof b?Wa:b instanceof Vb?Ih:(c=Vb(b))?(b=c,Ih):Bb)(a,b)}function Ha(a,b,c,d){this._groups=a;this._parents=b;this._name=c;this._id=d}function Cf(a){return Ma().transition(a)}function vc(a){return(1>=(a*=2)?a*a:--a*(2-a)+1)/2}function zd(a){return(1>=(a*=2)?a*a*a:(a-=2)*a*a+2)/2}function qg(a){return(1-Math.cos(Nl*a))/2}function de(a){return(1>=(a*=2)?Math.pow(2,10*a-10):2-Math.pow(2,10-10*a))/2}function Pe(a){return(1>=(a*=2)?1-Math.sqrt(1-a*a):Math.sqrt(1-(a-=2)*a)+1)/2}function hd(a){return(a=+a)Math.abs(a[1]-mf[1])?u=!0:t=!0);mf=a;Ia=!0;id();f()}function f(){var a;switch(oa=mf[0]-B[0],Fa=mf[1]-B[1],bb){case fk:case Ol:Pa&&(oa=Math.max(y-h,Math.min(z-p,oa)),l=h+oa,ia=p+oa);Ja&&(Fa=Math.max(lf-n,Math.min(ye-q,Fa)),P=n+Fa,r=q+Fa);break;case Tg:0>Pa?(oa=Math.max(y-h,Math.min(z-h,oa)),l=h+oa,ia=p):0Ja?(Fa=Math.max(lf-n,Math.min(ye-n,Fa)),P=n+Fa,r=q):0Pa?p=ia-oa:0Ja?q=r-Fa:0Pa?p=ia:0Ja?q=r:0Pa?p=ia:0Ja?q=r:0=b;for(Be[l<<1].forEach(f);++g=b,Be[k|l<<1].forEach(f);for(Be[l<<0].forEach(f);++h=b;m=a[h*d]>=b;for(Be[l<<1|m<<2].forEach(f);++g=b,n=m,m=a[h*d+g+1]>=b,Be[k|l<<1|m<<2|n<<3].forEach(f);Be[l|m<<3].forEach(f)}g=-1;m=a[h*d]>=b;for(Be[m<<2].forEach(f);++g=b,Be[m<<2|n<<3].forEach(f);Be[m<<3].forEach(f)}(a,b,function(d){g(d,a,b);for(var e=0,h=d.length,k=d[h-1][1]*d[0][0]-d[h-1][0]*d[0][1];++eP!=v>P&&n<(u-t)*(P-Fa)/(v-Fa)+t&&(p=-p)}h=p}if(h){f=h;break a}}f=0}if(-1!==f)return void b.push(a)}}),{type:"MultiPolygon",value:b,coordinates:c}}function c(a,b,c){a.forEach(function(a){var f,g=a[0],h=a[1],k=0|g,l=0|h,m=b[l*d+k];0=c&&(h>=f&&(k-=a.data[h-f+g*d]),b.data[h-c+g*d]=k/Math.min(h+1,d-1+f-h,f))}function he(a,b,c){for(var d=a.width,e=a.height,f=1+(c<<1),g=0;g=c&&(h>=f&&(k-=a.data[g+(h-f)*d]),b.data[g+(h-c)*d]=k/Math.min(h+1,e-1+f-h,f))}function Ci(a){return a[0]}function Bi(a){return a[1]}function Hf(){return 1}function ug(a){return new Function("d","return {"+a.map(function(a,b){return JSON.stringify(a)+": d["+b+"]"}).join(",")+"}")}function Jf(a){function b(a,b){function c(){if(l)return hk;if(m)return m=!1,Sl;var b,c,d=h;if(34===a.charCodeAt(d)){for(;h++=g?l=!0:10===(c=a.charCodeAt(h++))?m=!0:13===c&&(m=!0,10===a.charCodeAt(h)&&++h),a.slice(d+1,b-1).replace(/""/g,'"')}for(;h=g,m=!1;10===a.charCodeAt(g-1)&&--g;for(13===a.charCodeAt(g-1)&&--g;(d=c())!==hk;){for(var n=[];d!==Sl&&d!==hk;)n.push(d),d=c();b&&null==(n=b(n,k++))||e.push(n)}return e}function c(b){return b.map(d).join(a)}function d(a){return null==a?"":e.test(a+="")?'"'+a.replace(/"/g,'""')+'"':a}var e=new RegExp('["'+a+"\n\r]"),f=a.charCodeAt(0);return{parse:function(a,c){var d,e,f=b(a,function(a,b){if(d)return d(a,b-1);e=a;d=c?function(a,b){var c=ug(a);return function(d,e){return b(c(d),e,a)}}(a,c):ug(a)});return f.columns=e||[],f},parseRows:b,format:function(b,c){return null==c&&(c=function(a){var b=Object.create(null),c=[];return a.forEach(function(a){for(var d in a)d in b||c.push(b[d]=d)}),c}(b)),[c.map(d).join(a)].concat(b.map(function(b){return c.map(function(a){return d(b[a])}).join(a)})).join("\n")},formatRows:function(a){return a.map(c).join("\n")}}}function Ei(a){if(!a.ok)throw Error(a.status+" "+a.statusText);return a.blob()}function ie(a){if(!a.ok)throw Error(a.status+" "+a.statusText);return a.arrayBuffer()}function Wc(a){if(!a.ok)throw Error(a.status+" "+a.statusText);return a.text()}function Kf(a,b){return fetch(a,b).then(Wc)}function Ue(a){return function(b,c,d){return 2===arguments.length&&"function"==typeof c&&(d=c,c=void 0),Kf(b,c).then(function(b){return a(b,d)})}}function Ve(a){if(!a.ok)throw Error(a.status+" "+a.statusText);return a.json()}function je(a){return function(b,c){return Kf(b,c).then(function(b){return(new DOMParser).parseFromString(b,a)})}}function ab(a){return function(){return a}}function xc(){return 1E-6*(Math.random()-.5)}function ke(a,b,c,d){if(isNaN(b)||isNaN(c))return a;var e,f,g,h,k,l,m,n,P=a._root;d={data:d};var p=a._x0,ia=a._y0,q=a._x1,r=a._y1;if(!P)return a._root=d,a;for(;P.length;)if((l=b>=(f=(p+q)/2))?p=f:q=f,(m=c>=(g=(ia+r)/2))?ia=g:r=g,e=P,!(P=P[n=m<<1|l]))return e[n]=d,a;if(h=+a._x.call(null,P.data),k=+a._y.call(null,P.data),b===h&&c===k)return d.next=P,e?e[n]=d:a._root=d,a;do e=e?e[n]=Array(4):a._root=Array(4),(l=b>=(f=(p+q)/2))?p=f:q=f,(m=c>=(g=(ia+r)/2))?ia=g:r=g;while((n=m<<1|l)==(l=(k>=g)<<1|h>=f));return e[l]=P,e[n]=d,a}function ub(a,b,c,d,e){this.node=a;this.x0=b;this.y0=c;this.x1=d;this.y1=e}function We(a){return a[0]}function le(a){return a[1]}function Xc(a,b,c){b=new vg(null==b?We:b,null==c?le:c,NaN,NaN,NaN,NaN);return null==a?b:b.addAll(a)}function vg(a,b,c,d,e,f){this._x=a;this._y=b;this._x0=c;this._y0=d;this._x1=e;this._y1=f;this._root=void 0}function me(a){for(var b={data:a.data},c=b;a=a.next;)c=c.next={data:a.data};return b}function ne(a){return a.x+a.vx}function ld(a){return a.y+a.vy}function Lf(a){return a.index}function Xe(a,b){var c=a.get(b);if(!c)throw Error("missing: "+b);return c}function Mf(a){return a.x}function Ye(a){return a.y}function Yc(a,b){if(0>(c=(a=b?a.toExponential(b-1):a.toExponential()).indexOf("e")))return null;var c,d=a.slice(0,c);return[1c?"0."+Array(-c).join("0")+d:d.length>c+1?d.slice(0,c+1)+"."+d.slice(c+1):d+Array(c-d.length+2).join("0")}function Ed(a){return a}function Fd(a){function b(a){function b(a){var b,f,k,m=oa,Ia=t;if("c"===r)Ia=u(a)+Ia,a="";else{b=0>(a=+a);a=u(Math.abs(a),ia);if(q){var v=a.length,La=1,w=-1;a:for(;La(k=a.charCodeAt(b))||57>1)+m+a+Ia+b.slice(k);break;default:a=b+m+a+Ia}return h(a)}var c=(a=ec(a)).fill,d=a.align,l=a.sign,m=a.symbol,n=a.zero,P=a.width,p=a.comma,ia=a.precision,q=a.trim,r=a.type;"n"===r?(p=!0,r="g"):Vl[r]||(null==ia&&(ia=12),q=!0,r="g");(n||"0"===c&&"\x3d"===d)&&(n=!0,c="0",d="\x3d");var oa="$"===m?f[0]:"#"===m&&/[boxX]/.test(r)?"0"+r.toLowerCase():"",t="$"===m?f[1]:/[%p]/.test(r)?k:"",u=Vl[r],Fa=/[defgprs%]/.test(r);return ia=null==ia?6:/[gprs]/.test(r)?Math.max(1,Math.min(21,ia)):Math.max(0,Math.min(20,ia)),b.toString=function(){return a+""},b}var c,d,e=a.grouping&&a.thousands?(c=a.grouping,d=a.thousands,function(a,b){for(var e=a.length,f=[],g=0,h=c[0],k=0;0b&&(h=Math.max(1,b-k)),f.push(a.substring(e-=h,e+h)),!((k+=h+1)>b));)h=c[g=(g+1)%c.length];return f.reverse().join(d)}):Ed,f=a.currency,g=a.decimal,h=a.numerals?function(a){return function(b){return b.replace(/[0-9]/g,function(b){return a[+b]})}}(a.numerals):Ed,k=a.percent||"%";return{format:b,formatPrefix:function(a,c){var d=b(((a=ec(a)).type="f",a)),e=3*Math.max(-8,Math.min(8,Math.floor(Hc(c)/3))),f=Math.pow(10,-e),g=Tl[8+e/3];return function(a){return d(f*a)+g}}}}function Gd(b){return Yi=Fd(b),a.format=Yi.format,a.formatPrefix=Yi.formatPrefix,Yi}function Hd(a){return Math.max(0,-Hc(Math.abs(a)))}function Id(a,b){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Hc(b)/3)))-Hc(Math.abs(a)))}function wg(a,b){return a=Math.abs(a),b=Math.abs(b)-a,Math.max(0,Hc(b)-Hc(a))+1}function ob(){this.reset()}function vh(a,b,c){var d=a.s=b+c,e=d-b;a.t=b-(d-e)+(c-e)}function xg(a){return 1a?Qa:Math.acos(a)}function vb(a){return 1a?-jb:Math.asin(a)}function yg(a){return(a=pa(a/2))*a}function Za(){}function ra(a,b){a&&Wl.hasOwnProperty(a.type)&&Wl[a.type](a,b)}function Rb(a,b,c){var d=-1,e=a.length-c;for(b.lineStart();++dZc&&(Zc=b)}function zc(a,b){var c=Kb([a*ya,b*ya]);if(Vg){var d=Lb(Vg,c),d=Lb([d[1],-d[0],0],d);gc(d);var d=fc(d),e,f=a-dg,g=0Zc&&(Zc=e):f^(g*dg<(h=(h+360)%360-180)&&hZc&&(Zc=b));f?aMb(rb,xb)&&(xb=a):Mb(a,xb)>Mb(rb,xb)&&(rb=a):xb>=rb?(axb&&(xb=a)):a>dg?Mb(rb,a)>Mb(rb,xb)&&(xb=a):Mb(a,xb)>Mb(rb,xb)&&(rb=a)}else nf.push(Ce=[rb=a,xb=a]);bZc&&(Zc=b);Vg=c;dg=a}function nd(){De.point=zc}function ib(){Ce[0]=rb;Ce[1]=xb;De.point=Ic;Vg=null}function Of(a,b){if(Vg){var c=a-dg;Oh.add(180(b-=a)?b+360:b}function Ag(a,b){return a[0]-b[0]}function $e(a,b){return a[0]<=a[1]?a[0]<=b&&b<=a[1]:bQa?a-Cc:a<-Qa?a+Cc:a,b]}function qe(a,b,c){return(a%=Cc)?b||c?Kd(re(a),nc(b,c)):re(a):b||c?nc(b,c):bf}function Tf(a){return function(b,c){return[(b+=a)>Qa?b-Cc:b<-Qa?b+Cc:b,c]}}function re(a){var b=Tf(a);return b.invert=Tf(-a),b}function nc(a,b){function c(a,b){var c=va(b),h=va(a)*c,c=pa(a)*c,k=pa(b),l=k*d+h*e;return[oc(c*f-l*g,h*d-k*e),vb(l*f+c*g)]}var d=va(a),e=pa(a),f=va(b),g=pa(b);return c.invert=function(a,b){var c=va(b),h=va(a)*c,c=pa(a)*c,k=pa(b),l=k*f-c*g;return[oc(c*f+k*g,h*d+l*e),vb(l*d-h*e)]},c}function Hi(a){function b(b){return(b=a(b[0]*ya,b[1]*ya))[0]*=gb,b[1]*=gb,b}return a=qe(a[0]*ya,a[1]*ya,2f)&&(e+=d*Cc));0f:e-b[2]?-c:c)+Cc-1E-6)%Cc}function Dg(){var a,b=[];return{point:function(b,c){a.push([b,c])},lineStart:function(){b.push(a=[])},lineEnd:Za,rejoin:function(){1Ta(a[0]-b[0])&&1E-6>Ta(a[1]-b[1])}function cf(a,b,c,d){this.x=a;this.z=b;this.o=c;this.e=d;this.v=!1;this.n=this.p=null}function wh(a,b,c,d,e){var f,g=[],h=[];if(a.forEach(function(a){if(!(0>=(b=a.length-1))){var b,c=a[0],d=a[b];if(pd(c,d)){e.lineStart();for(f=0;fQa,q=q*v;if(ok.add(oc(q*x*pa(y),r*u+q*va(y))),g+=z?w+x*Cc:w,z^p>=c^t>=c)n=Lb(Kb(n),Kb(ia)),gc(n),p=Lb(f,n),gc(p),p=(z^0<=w?-1:1)*vb(p[2]),(d>p||d===p&&(n[0]||n[1]))&&(h+=z^0<=w?1:-1)}return(-1E-6>g||1E-6>g&&-1E-6>ok)^1&h}function Gg(a,b,c,d){return function(e){function f(b,c){a(b,c)&&e.point(b,c)}function g(a,b){ia.point(a,b)}function h(){v.point=g;ia.lineStart()}function k(){v.point=f;ia.lineEnd()}function l(a,b){r.push([a,b]);oa.point(a,b)}function m(){oa.lineStart();r=[]}function n(){l(r[0][0],r[0][1]);oa.lineEnd();var a,b,c,d;a=oa.clean();b=t.result();c=b.length;if(r.pop(),P.push(r),r=null,c)if(1&a){if(0<(b=(c=b[0]).length-1)){u||(e.polygonStart(),u=!0);e.lineStart();for(a=0;a(a=a.x)[0]?a[1]-jb-1E-6:jb-a[1])-(0>(b=b.x)[0]?b[1]-jb-1E-6:jb-b[1])}function yh(a){function b(a,b){return va(a)*va(b)>e}function c(a,b,c){var d=[1,0,0],f=Lb(Kb(a),Kb(b)),g=Cb(f,f),h=f[0],k=g-h*h;if(!k)return!c&&a;g=e*g/k;k=-e*h/k;h=Lb(d,f);d=lc(d,g);kc(d,lc(f,k));f=Cb(d,h);g=Cb(h,h);k=f*f-g*(Cb(d,d)-1);if(!(0>k)){var l=zb(k),k=lc(h,(-f-l)/g);if(kc(k,d),k=fc(k),!c)return k;var m;c=a[0];var n=b[0];a=a[1];b=b[1];nTa(p-Qa);if(!P&&bp?P?0Ta(k[0]-c)?a:b):a<=k[1]&&k[1]<=b:p>Qa^(c<=k[0]&&k[0]<=n))return m=lc(h,(-f+l)/g),kc(m,d),[k,fc(m)]}}function d(b,c){var d=g?a:Qa-a,e=0;return b<-d?e|=1:b>d&&(e|=2),c<-d?e|=4:c>d&&(e|=8),e}var e=va(a),f=6*ya,g=0n?Qa:-Qa),p):0;if(!e&&(l=k=r)&&a.lineStart(),r!==k&&(!(P=c(e,q))||pd(e,P)||pd(q,P))&&(q[0]+=1E-6,q[1]+=1E-6,r=b(q[0],q[1])),r!==k)m=0,r?(a.lineStart(),P=c(q,e),a.point(P[0],P[1])):(P=c(e,q),a.point(P[0],P[1]),a.lineEnd()),e=P;else if(h&&e&&g^r){var t;ia&f||!(t=c(q,e,!0))||(m=0,g?(a.lineStart(),a.point(t[0][0],t[0][1]),a.point(t[1][0],t[1][1]),a.lineEnd()):(a.point(t[1][0],t[1][1]),a.lineEnd(),a.lineStart(),a.point(t[0][0],t[0][1])))}!r||e&&pd(e,q)||a.point(q[0],q[1]);e=q;k=r;f=ia},lineEnd:function(){k&&a.lineEnd();e=null},clean:function(){return m|(l&&k)<<1}}},function(b,c,d,e){Ii(e,a,f,d,b,c)},g?[0,-a]:[-Qa,a-Qa])}function Ld(a,b,c,d){function e(e,g,k,l){var m=0,n=0;if(null==e||(m=f(e,k))!==(n=f(g,k))||0>h(e,g)^0Ta(d[0]-a)?0Ta(d[0]-c)?0Ta(d[1]-b)?0n){if(gm)return;g>l&&(l=g)}if(g=e-h,n||!(0>g)){if(g/=n,0>n){if(g>m)return;g>l&&(l=g)}else if(0p){if(gm)return;g>l&&(l=g)}if(g=f-k,p||!(0>g)){if(g/=p,0>p){if(g>m)return;g>l&&(l=g)}else if(0m&&(b[0]=h+m*n,b[1]=k+m*p),!0}}}}})(h,k,a,b,c,d)?(oa||(w.lineStart(),w.point(h[0],h[1])),w.point(k[0],k[1]),g||w.lineEnd(),v=!1):g&&(w.lineStart(),w.point(e,f),v=!1)}ia=e;t=f;oa=g}var l,m,n,P,q,r,ia,t,oa,u,v,w=f,Fa=Dg(),x={point:h,lineStart:function(){x.point=k;m&&m.push(n=[]);u=!0;oa=!1;ia=t=NaN},lineEnd:function(){l&&(k(P,q),r&&oa&&Fa.rejoin(),l.push(Fa.result()));x.point=h;oa&&w.lineEnd()},polygonStart:function(){w=Fa;l=[];m=[];v=!0},polygonEnd:function(){for(var b,c=b=0,h=m.length;cd&&(oa-k)*(d-P)>(t-P)*(a-k)&&++b:t<=d&&(oa-k)*(d-P)<(t-P)*(a-k)&&--b;c=v&&b;h=(l=p(l)).length;(c||h)&&(f.polygonStart(),c&&(f.lineStart(),e(null,null,1,f),f.lineEnd()),h&&wh(l,g,b,e,f),f.polygonEnd());w=f;l=m=n=null}};return x}}function zh(){Wg.point=Wg.lineEnd=Za}function df(a,b){pk=a*ya;ij=pa(b*=ya);jj=va(b);Wg.point=Ah}function Ah(a,b){a*=ya;var c=pa(b*=ya),d=va(b),e=Ta(a-pk),f=va(e),e=d*pa(e),g=jj*c-ij*d*f,f=ij*c+jj*d*f;qk.add(oc(zb(e*e+g*g),f));pk=a;ij=c;jj=d}function Ig(a){return qk.reset(),jc(a,Wg),+qk}function Md(a,b){return rk[0]=a,rk[1]=b,Ig(aq)}function Vf(a,b){return!(!a||!dm.hasOwnProperty(a.type))&&dm[a.type](a,b)}function Eb(a,b){var c=Md(a[0],a[1]);return Md(a[0],b)+Md(b,a[1])<=c+1E-6}function Bh(a,b){return!!Fg(a.map(Ki),Jg(b))}function Ki(a){return(a=a.map(Jg)).pop(),a}function Jg(a){return[a[0]*ya,a[1]*ya]}function Wf(a,b,c){var d=x(a,b-1E-6,c).concat(b);return function(a){return d.map(function(b){return[a,b]})}}function Kg(a,b,c){var d=x(a,b-1E-6,c).concat(b);return function(a){return d.map(function(b){return[b,a]})}}function Lg(){function a(){return{type:"MultiLineString",coordinates:b()}}function b(){return x(kj(f/u)*u,e,u).map(p).concat(x(kj(l/v)*v,k,v).map(q)).concat(x(kj(d/r)*r,c,r).filter(function(a){return 1E-6e&&(b=f,f=e,e=b),l>k&&(b=l,l=k,k=b),a.precision(w)):[[f,l],[e,k]]},a.extentMinor=function(b){return arguments.length?(d=+b[0][0],c=+b[1][0],h=+b[0][1],g=+b[1][1],d>c&&(b=d,d=c,c=b),h>g&&(b=h,h=g,g=b),a.precision(w)):[[d,h],[c,g]]},a.step=function(b){return arguments.length?a.stepMajor(b).stepMinor(b):a.stepMinor()},a.stepMajor=function(b){return arguments.length?(u=+b[0],v=+b[1],a):[u,v]},a.stepMinor=function(b){return arguments.length?(r=+b[0],t=+b[1],a):[r,t]},a.precision=function(b){return arguments.length?(w=+b,m=Wf(h,g,90),n=Kg(d,c,w),p=Wf(l,k,90),q=Kg(f,e,w),a):w},a.extentMajor([[-180,-89.999999],[180,89.999999]]).extentMinor([[-180,-80.000001],[180,80.000001]])}function qd(a){return a}function Li(){Ee.point=Mi}function Mi(a,b){Ee.point=Mg;em=sk=a;fm=tk=b}function Mg(a,b){uk.add(tk*a-sk*b);sk=a;tk=b}function Ni(){Mg(em,fm)}function Nd(a,b){vk+=a;wk+=b;++Ph}function Ch(){$c.point=Dh}function Dh(a,b){$c.point=Eh;Nd(Ud=a,Vd=b)}function Eh(a,b){var c=a-Ud,d=b-Vd,c=zb(c*c+d*d);lj+=c*(Ud+a)/2;mj+=c*(Vd+b)/2;Xg+=c;Nd(Ud=a,Vd=b)}function ef(){$c.point=Nd}function Xf(){$c.point=Oi}function ff(){se(gm,hm)}function Oi(a,b){$c.point=se;Nd(gm=Ud=a,hm=Vd=b)}function se(a,b){var c=a-Ud,d=b-Vd,c=zb(c*c+d*d);lj+=c*(Ud+a)/2;mj+=c*(Vd+b)/2;Xg+=c;xk+=(c=Vd*a-Ud*b)*(Ud+a);yk+=c*(Vd+b);Qh+=3*c;Nd(Ud=a,Vd=b)}function te(a){this._context=a}function gf(a,b){Rh.point=ue;im=Sh=a;jm=Th=b}function ue(a,b){Sh-=a;Th-=b;zk.add(zb(Sh*Sh+Th*Th));Sh=a;Th=b}function hf(){this._string=[]}function Yf(a){return"m0,"+a+"a"+a+","+a+" 0 1,1 0,"+-2*a+"a"+a+","+a+" 0 1,1 0,"+2*a+"z"}function rd(a){return function(b){var c=new Od,d;for(d in a)c[d]=a[d];return c.stream=b,c}}function Od(){}function ve(a,b,c){var d=a.clipExtent&&a.clipExtent();return a.scale(150).translate([0,0]),null!=d&&a.clipExtent(null),jc(c,a.stream(nj)),b(nj.result()),null!=d&&a.clipExtent(d),a}function Ac(a,b,c){return ve(a,function(c){var d=b[1][0]-b[0][0],e=b[1][1]-b[0][1],f=Math.min(d/(c[1][0]-c[0][0]),e/(c[1][1]-c[0][1])),d=+b[0][0]+(d-f*(c[1][0]+c[0][0]))/2;c=+b[0][1]+(e-f*(c[1][1]+c[0][1]))/2;a.scale(150*f).translate([d,c])},c)}function we(a,b,c){return ve(a,function(c){var d=+b,e=d/(c[1][0]-c[0][0]),d=(d-e*(c[1][0]+c[0][0]))/2;c=-e*c[0][1];a.scale(150*e).translate([d,c])},c)}function xe(a,b,c){return ve(a,function(c){var d=+b,e=d/(c[1][1]-c[0][1]),f=-e*c[0][0];c=(d-e*(c[1][1]+c[0][1]))/2;a.scale(150*e).translate([f,c])},c)}function Pd(a,b){return+b?function(a,b){function c(d,e,f,g,h,k,l,m,n,p,P,q,r,ia){var t=l-d,u=m-e,oa=t*t+u*u;if(oa>4*b&&r--){var v=g+p,w=h+P,La=k+q,Ia=zb(v*v+w*w+La*La),x=vb(La/=Ia),Fa=1E-6>Ta(Ta(La)-1)||1E-6>Ta(f-n)?(f+n)/2:oc(w,v),Pa=a(Fa,x),x=Pa[0],Pa=Pa[1],Ja=x-d,y=Pa-e,bb=u*Ja-t*y;(bb*bb/oa>b||.3Ta(e))return function(a){function b(a,b){return[a*c,pa(b)/c]}var c=va(a);return b.invert=function(a,b){return[a/c,vb(b*c)]},b}(a);var f=1+d*(2*e-d),g=zb(f)/e;return c.invert=function(a,b){var c=g-b;return[oc(a,Ta(c))/e*Uh(c),vb((f-(a*a+c*c)*e*e)/(2*e))]},c}function Kc(){return Zf(Aa).scale(155.424).center([0,33.6442])}function oi(){return Kc().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function Ca(a){return function(b,c){var d=va(b),e=va(c),d=a(d*e);return[d*e*pa(b),d*pa(c)]}}function qb(a){return function(b,c){var d=zb(b*b+c*c),e=a(d),f=pa(e),e=va(e);return[oc(b*f,d*e),vb(d&&c*f/d)]}}function $f(a,b){return[a,oj(Yg((jb+b)/2))]}function qa(a){function b(){var b=Qa*h(),g=f(Hi(f.rotate()).invert([0,0]));return l(null==m?[[g[0]-b,g[1]-b],[g[0]+b,g[1]+b]]:a===$f?[[Math.max(g[0]-b,m),c],[Math.min(g[0]+b,d),e]]:[[m,Math.max(g[1]-b,c)],[d,Math.min(g[1]+b,e)]])}var c,d,e,f=Jc(a),g=f.center,h=f.scale,k=f.translate,l=f.clipExtent,m=null;return f.scale=function(a){return arguments.length?(h(a),b()):h()},f.translate=function(a){return arguments.length?(k(a),b()):k()},f.center=function(a){return arguments.length?(g(a),b()):g()},f.clipExtent=function(a){return arguments.length?(null==a?m=c=d=e=null:(m=+a[0][0],c=+a[0][1],d=+a[1][0],e=+a[1][1]),b()):null==m?null:[[m,c],[d,e]]},b()}function Dc(a,b){function c(a,b){0jb-1E-6&&(b=jb-1E-6);var c=f/Bk(Yg((jb+b)/2),e);return[c*pa(e*a),f-c*va(e*a)]}var d=va(a),e=a===b?pa(a):oj(d/va(b))/oj(Yg((jb+b)/2)/Yg((jb+a)/2)),f=d*Bk(Yg((jb+a)/2),e)/e;return e?(c.invert=function(a,b){var c=f-b,d=Uh(e)*zb(a*a+c*c);return[oc(a,Ta(c))/e*Uh(c),2*Zg(Bk(f/d,1/e))-jb]},c):$f}function sf(a,b){return[a,b]}function pi(a,b){function c(a,b){var c=f-b,d=e*a;return[c*pa(d),f-c*va(d)]}var d=va(a),e=a===b?pa(a):(d-va(b))/(b-a),f=d/e+a;return 1E-6>Ta(e)?sf:(c.invert=function(a,b){var c=f-b;return[oc(a,Ta(c))/e*Uh(c),f-Uh(e)*zb(a*a+c*c)]},c)}function jh(a,b){var c=vb(pj*pa(b)),d=c*c,e=d*d*d;return[a*va(c)/(pj*(1.340264+3*-.081106*d+e*(7*8.93E-4+.034164*d))),c*(1.340264+-.081106*d+e*(8.93E-4+.003796*d))]}function mh(a,b){var c=va(b),d=va(a)*c;return[c*pa(a)/d,pa(b)/d]}function vf(a,b,c,d){return 1===a&&1===b&&0===c&&0===d?qd:rd({point:function(e,f){this.stream.point(e*a+c,f*b+d)}})}function oh(a,b){var c=b*b,d=c*c;return[a*(.8707-.131979*c+d*(d*(.003971*c-.001529*d)-.013791)),b*(1.007226+c*(.015085+d*(.028874*c-.044475-.005916*d)))]}function mg(a,b){return[va(b)*pa(a),pa(b)]}function kg(a,b){var c=va(b),d=1+va(a)*c;return[c*pa(a)/d,pa(b)/d]}function lg(a,b){return[oj(Yg((jb+b)/2)),-a]}function vi(a,b){return a.parent===b.parent?1:2}function ui(a,b){return a+b.x}function ti(a,b){return Math.max(a,b.y)}function ph(a){var b=0,c=a.children,d=c&&c.length;if(d)for(;0<=--d;)b+=c[d].value;else b=1;a.value=b}function qh(a,b){var c,d,e,f,g,h=new dc(a),k=+a.value&&(h.value=a.value),l=[h];for(null==b&&(b=Rj);c=l.pop();)if(k&&(c.value=+c.data.value),(e=b(c.data))&&(g=e.length))for(c.children=Array(g),f=g-1;0<=f;--f)l.push(d=c.children[f]=new dc(e[f])),d.parent=c,d.depth=c.depth+1;return h.eachBefore(Pi)}function Rj(a){return a.children}function Oe(a){a.data=a.data.data}function Pi(a){var b=0;do a.height=b;while((a=a.parent)&&a.height<++b)}function dc(a){this.data=a;this.depth=this.height=0;this.parent=null}function Fi(a){var b,c,d=0;a=dq.call(a);var e,f;for(b=a.length;b;)f=Math.random()*b--|0,e=a[b],a[b]=a[f],a[f]=e;e=a.length;for(f=[];dc||c*cd*d+e*e}function sd(a,b){for(var c=0;c(g*=g)?(d=(l+g-e)/(2*l),f=Math.sqrt(Math.max(0,g/l-d*d)),c.x=a.x-d*h-f*k,c.y=a.y-d*k+f*h):(d=(l+e-g)/(2*l),f=Math.sqrt(Math.max(0,e/l-d*d)),c.x=b.x+d*h-f*k,c.y=b.y+d*k+f*h)):(c.x=b.x+c.r,c.y=b.y)}function Og(a,b){var c=a.r+b.r-1E-6,d=b.x-a.x,e=b.y-a.y;return 0d*d+e*e}function Pg(a){var b=a._,c=a.next._,d=b.r+c.r;a=(b.x*c.r+c.x*b.r)/d;b=(b.y*c.r+c.y*b.r)/d;return a*a+b*b}function kf(a){this._=a;this.previous=this.next=null}function Gh(a){if(!(e=a.length))return 0;var b,c,d,e,f,g,h,k,l,m;if((b=a[0]).x=0,b.y=0,!(1n&&(n=h),P=l*l*r,(p=Math.max(n/P,P/m))>q){l-=h;break}q=p}t.push(g={value:l,dice:b=(c[0]-b[0])*(d[1]-b[1])-(c[1]-b[1])*(d[0]-b[0]));)--g;f[g++]=h}return f.slice(0,g)}function Tb(){return Math.random()}function Ub(a){function b(b){var f=b+"",g=c.get(f);if(!g){if(e!==Ck)return e;c.set(f,g=d.push(b))}return a[(g-1)%a.length]}var c=cc(),d=[],e=Ck;return a=null==a?[]:of.call(a),b.domain=function(a){if(!arguments.length)return d.slice();d=[];c=cc();for(var e,f,g=-1,h=a.length;++g=c?1:d(a)}}}(a):a,l)))(+b)}var e,f,g,h=km,k=km,l=Ib,m=!1;return d.invert=function(a){return(g||(g=e(k,h,Pj,m?function(a){return function(b,c){var d=a(b=+b,c=+c);return function(a){return 0>=a?b:1<=a?c:d(a)}}}(b):b)))(+a)},d.domain=function(a){return arguments.length?(h=Dk.call(a,tl),c()):h.slice()},d.range=function(a){return arguments.length?(k=of.call(a),c()):k.slice()},d.rangeRound=function(a){return k=of.call(a),l=rh,c()},d.clamp=function(a){return arguments.length?(m=!!a,c()):m},d.interpolate=function(a){return arguments.length?(l=a,c()):l},c()}function ig(b){var c=b.domain;return b.ticks=function(a){var b=c();return G(b[0],b[b.length-1],null==a?10:a)},b.tickFormat=function(b,d){var e;a:{var f=c();e=d;var g,h=f[0],k=f[f.length-1],f=w(h,k,null==b?10:b);switch((e=ec(null==e?",f":e)).type){case "s":h=Math.max(Math.abs(h),Math.abs(k));e=(null!=e.precision||isNaN(g=Id(f,h))||(e.precision=g),a.formatPrefix(e,h));break a;case "":case "e":case "g":case "p":case "r":null!=e.precision||isNaN(g=wg(f,Math.max(Math.abs(h),Math.abs(k))))||(e.precision=g-("e"===e.type));break;case "f":case "%":null!=e.precision||isNaN(g=Hd(f))||(e.precision=g-2*("%"===e.type))}e=a.format(e)}return e},b.nice=function(a){null==a&&(a=10);var d,e=c(),f=0,g=e.length-1,h=e[f],k=e[g];return kd&&(d=B(h=Math.ceil(h*d)/d,k=Math.floor(k*d)/d,a)),0d&&(e[f]=Math.ceil(h*d)/d,e[g]=Math.floor(k*d)/d,c(e)),b},b}function ol(a,b){var c,d=0,e=(a=a.slice()).length-1,f=a[d],g=a[e];return ga?function(c){return-Math.pow(-b,c)*Math.pow(-a,1-c)}:function(c){return Math.pow(b,c)*Math.pow(a,1-c)}}function so(a){return isFinite(a)?+("1e"+a):0>a?0:a}function pl(a){return 10===a?so:a===Math.E?Math.exp:function(b){return Math.pow(a,b)}}function ql(a){return a===Math.E?Math.log:10===a&&Math.log10||2===a&&Math.log2||(a=Math.log(a),function(b){return Math.log(b)/a})}function rl(a){return function(b){return-a(-b)}}function jg(a,b){return 0>a?-Math.pow(-a,b):Math.pow(a,b)}function Qj(){var a=1,b=ri(function(b,c){return(c=jg(c,a)-(b=jg(b,a)))?function(d){return(jg(d,a)-b)/c}:lh(c)},function(b,c){return c=jg(c,a)-(b=jg(b,a)),function(d){return jg(b+c*d,1/a)}}),c=b.domain;return b.exponent=function(b){return arguments.length?(a=+b,c(c())):a},b.copy=function(){return qi(b,Qj().exponent(a))},ig(b)}function Ab(a,b,c,d){function e(b){return a(b=new Date(+b)),b}return e.floor=e,e.ceil=function(c){return a(c=new Date(c-1)),b(c,1),a(c),c},e.round=function(a){var b=e(a),c=e.ceil(a);return a-b=b)for(;a(b),!c(b);)b.setTime(b-1)},function(a,d){if(a>=a)if(0>d)for(;0>=++d;)for(;b(a,-1),!c(a););else for(;0<=--d;)for(;b(a,1),!c(a););})},c&&(e.count=function(b,d){return Ek.setTime(+b),Fk.setTime(+d),a(Ek),a(Fk),Math.floor(c(Ek,Fk))},e.every=function(a){return a=Math.floor(a),isFinite(a)&&0a.y){var b=new Date(-1,a.m,a.d,a.H,a.M,a.S,a.L);return b.setFullYear(a.y),b}return new Date(a.y,a.m,a.d,a.H,a.M,a.S,a.L)}function si(a){if(0<=a.y&&100>a.y){var b=new Date(Date.UTC(-1,a.m,a.d,a.H,a.M,a.S,a.L));return b.setUTCFullYear(a.y),b}return new Date(Date.UTC(a.y,a.m,a.d,a.H,a.M,a.S,a.L))}function kh(a){return{y:a,m:0,d:1,H:0,M:0,S:0,L:0}}function sl(a){function b(a,b){return function(c){var d,e,f,g=[],h=-1,k=0,l=a.length;for(c instanceof Date||(c=new Date(+c));++hg.V||53=k)return-1;if(37===(e=b.charCodeAt(g++))){if(e=b.charAt(g++),!(f=B[e in lm?b.charAt(g++):e])||0>(d=f(a,c,d)))return-1}else if(e!=c.charCodeAt(d++))return-1}return d}var e=a.dateTime,f=a.date,g=a.time,h=a.periods,k=a.days,l=a.shortDays,m=a.months,n=a.shortMonths,p=th(h),q=sh(h),r=th(k),P=sh(k),t=th(l),u=sh(l),v=th(m),w=sh(m),x=th(n),y=sh(n),z={a:function(a){return l[a.getDay()]},A:function(a){return k[a.getDay()]},b:function(a){return n[a.getMonth()]},B:function(a){return m[a.getMonth()]},c:null,d:wl,e:wl,f:Po,H:Lo,I:Mo,j:No,L:xl,m:Qo,M:Ro,p:function(a){return h[+(12<=a.getHours())]},Q:Bl,s:Cl,S:Oo,u:So,U:To,V:Ho,w:fp,W:gp,x:null,X:null,y:lp,Y:hp,Z:Tj,"%":Al},A={a:function(a){return l[a.getUTCDay()]},A:function(a){return k[a.getUTCDay()]},b:function(a){return n[a.getUTCMonth()]},B:function(a){return m[a.getUTCMonth()]},c:null,d:yl,e:yl,f:Xo,H:Uo,I:Vo,j:Wo,L:zl,m:Yo,M:Zo,p:function(a){return h[+(12<=a.getUTCHours())]},Q:Bl,s:Cl,S:$o,u:ap,U:bp,V:cp,w:dp,W:ep,x:null,X:null,y:ip,Y:jp,Z:kp,"%":Al},B={a:function(a,b,c){return(b=t.exec(b.slice(c)))?(a.w=u[b[0].toLowerCase()],c+b[0].length):-1},A:function(a,b,c){return(b=r.exec(b.slice(c)))?(a.w=P[b[0].toLowerCase()],c+b[0].length):-1},b:function(a,b,c){return(b=x.exec(b.slice(c)))?(a.m=y[b[0].toLowerCase()],c+b[0].length):-1},B:function(a,b,c){return(b=v.exec(b.slice(c)))?(a.m=w[b[0].toLowerCase()],c+b[0].length):-1},c:function(a,b,c){return d(a,e,b,c)},d:ul,e:ul,f:Co,H:vl,I:vl,j:yo,L:Bo,m:xo,M:Ao,p:function(a,b,c){return(b=p.exec(b.slice(c)))?(a.p=q[b[0].toLowerCase()],c+b[0].length):-1},Q:Jo,s:Ko,S:U,u:Eo,U:Fo,V:Go,w:Do,W:Af,x:function(a,b,c){return d(a,f,b,c)},X:function(a,b,c){return d(a,g,b,c)},y:vo,Y:uo,Z:wo,"%":Io};return z.x=b(f,z),z.X=b(g,z),z.c=b(e,z),A.x=b(f,A),A.X=b(g,A),A.c=b(e,A),{format:function(a){var c=b(a+="",z);return c.toString=function(){return a},c},parse:function(a){var b=c(a+="",to);return b.toString=function(){return a},b},utcFormat:function(a){var c=b(a+="",A);return c.toString=function(){return a},c},utcParse:function(a){var b=c(a,si);return b.toString=function(){return a},b}}}function Ya(a,b,c){var d=0>a?"-":"";a=(d?-a:a)+"";var e=a.length;return d+(e=a?-rj:Math.asin(a)}function iq(a){return a.innerRadius}function jq(a){return a.outerRadius}function kq(a){return a.startAngle}function lq(a){return a.endAngle}function mq(a){return a&&a.padAngle}function sj(a,b,c,d,e,f,g){var h=a-c,k=b-d;g=(g?f:-f)/ah(h*h+k*k);var k=g*k,h=-g*h,l=a+k,m=b+h,n=c+k,p=d+h;c=(l+n)/2;d=(m+p)/2;b=n-l;a=p-m;g=b*b+a*a;f=e-f;var p=l*p-n*m,q=(0>a?-1:1)*ah(nq(0,f*f*g-p*p)),l=(p*a-b*q)/g,m=(-p*b-a*q)/g,n=(p*a+b*q)/g;b=(-p*b+a*q)/g;a=l-c;g=m-d;c=n-c;d=b-d;return a*a+g*g>c*c+d*d&&(l=n,m=b),{cx:l,cy:m,x01:-k,y01:-h,x11:l*(e/f-1),y11:m*(e/f-1)}}function om(a){this._context=a}function tj(a){return new om(a)}function Hk(a){return a[0]}function Ik(a){return a[1]}function Jk(){function a(a){var h,k,l,m=a.length,n=!1;null==e&&(g=f(l=wc()));for(h=0;h<=m;++h)!(h=m;--n)l.point(u[n],v[n]);l.lineEnd();l.areaEnd()}t&&(u[b]=+c(p,b,a),v[b]=+e(p,b,a),l.point(d?+d(p,b,a):u[b],f?+f(p,b,a):v[b]))}if(q)return l=null,q+""||null}function b(){return Jk().defined(g).curve(k).context(h)}var c=Hk,d=null,e=Ka(0),f=Ik,g=Ka(!0),h=null,k=tj,l=null;return a.x=function(b){return arguments.length?(c="function"==typeof b?b:Ka(+b),d=null,a):c},a.x0=function(b){return arguments.length?(c="function"==typeof b?b:Ka(+b),a):c},a.x1=function(b){return arguments.length?(d=null==b?null:"function"==typeof b?b:Ka(+b),a):d},a.y=function(b){return arguments.length?(e="function"==typeof b?b:Ka(+b),f=null,a):e},a.y0=function(b){return arguments.length?(e="function"==typeof b?b:Ka(+b),a):e},a.y1=function(b){return arguments.length?(f=null==b?null:"function"==typeof b?b:Ka(+b),a):f},a.lineX0=a.lineY0=function(){return b().x(c).y(e)},a.lineY1=function(){return b().x(c).y(f)},a.lineX1=function(){return b().x(d).y(e)},a.defined=function(b){return arguments.length?(g="function"==typeof b?b:Ka(!!b),a):g},a.curve=function(b){return arguments.length?(k=b,null!=h&&(l=k(h)),a):k},a.context=function(b){return arguments.length?(null==b?h=l=null:l=k(h=b),a):h},a}function oq(a,b){return ba?1:b>=a?0:NaN}function pq(a){return a}function qm(a){this._curve=a}function Kk(a){function b(b){return new qm(a(b))}return b._curve=a,b}function ci(a){var b=a.curve;return a.angle=a.x,delete a.x,a.radius=a.y,delete a.y,a.curve=function(a){return arguments.length?b(Kk(a)):b()._curve},a}function rm(){return ci(Jk().curve(sm))}function tm(){var a=pm().curve(sm),b=a.curve,c=a.lineX0,d=a.lineX1,e=a.lineY0,f=a.lineY1;return a.angle=a.x,delete a.x,a.startAngle=a.x0,delete a.x0,a.endAngle=a.x1,delete a.x1,a.radius=a.y,delete a.y,a.innerRadius=a.y0,delete a.y0,a.outerRadius=a.y1,delete a.y1,a.lineStartAngle=function(){return ci(c())},delete a.lineX0,a.lineEndAngle=function(){return ci(d())},delete a.lineX1,a.lineInnerRadius=function(){return ci(e())},delete a.lineY0,a.lineOuterRadius=function(){return ci(f())},delete a.lineY1,a.curve=function(a){return arguments.length?b(Kk(a)):b()._curve},a}function di(a,b){return[(b=+b)*Math.cos(a-=Math.PI/2),b*Math.sin(a)]}function qq(a){return a.source}function rq(a){return a.target}function Lk(a){function b(){var b,h=Mk.call(arguments),k=c.apply(this,h),l=d.apply(this,h);if(g||(g=b=wc()),a(g,+e.apply(this,(h[0]=k,h)),+f.apply(this,h),+e.apply(this,(h[0]=l,h)),+f.apply(this,h)),b)return g=null,b+""||null}var c=qq,d=rq,e=Hk,f=Ik,g=null;return b.source=function(a){return arguments.length?(c=a,b):c},b.target=function(a){return arguments.length?(d=a,b):d},b.x=function(a){return arguments.length?(e="function"==typeof a?a:Ka(+a),b):e},b.y=function(a){return arguments.length?(f="function"==typeof a?a:Ka(+a),b):f},b.context=function(a){return arguments.length?(g=null==a?null:a,b):g},b}function sq(a,b,c,d,e){a.moveTo(b,c);a.bezierCurveTo(b=(b+d)/2,c,b,e,d,e)}function tq(a,b,c,d,e){a.moveTo(b,c);a.bezierCurveTo(b,c=(c+e)/2,d,c,d,e)}function uq(a,b,c,d,e){var f=di(b,c);b=di(b,c=(c+e)/2);c=di(d,c);d=di(d,e);a.moveTo(f[0],f[1]);a.bezierCurveTo(b[0],b[1],c[0],c[1],d[0],d[1])}function pf(){}function uj(a,b,c){a._context.bezierCurveTo((2*a._x0+a._x1)/3,(2*a._y0+a._y1)/3,(a._x0+2*a._x1)/3,(a._y0+2*a._y1)/3,(a._x0+4*a._x1+b)/6,(a._y0+4*a._y1+c)/6)}function vj(a){this._context=a}function um(a){this._context=a}function vm(a){this._context=a}function wm(a,b){this._basis=new vj(a);this._beta=b}function wj(a,b,c){a._context.bezierCurveTo(a._x1+a._k*(a._x2-a._x0),a._y1+a._k*(a._y2-a._y0),a._x2+a._k*(a._x1-b),a._y2+a._k*(a._y1-c),a._x2,a._y2)}function Nk(a,b){this._context=a;this._k=(1-b)/6}function Ok(a,b){this._context=a;this._k=(1-b)/6}function Pk(a,b){this._context=a;this._k=(1-b)/6}function Qk(a,b,c){var d=a._x1,e=a._y1,f=a._x2,g=a._y2;if(1E-12b&&-0);a=(c-a._y1)/(b||0>d&&-0);return((0>e?-1:1)+(0>a?-1:1))*Math.min(Math.abs(e),Math.abs(a),.5*Math.abs((e*b+a*d)/(d+b)))||0}function Cm(a,b){var c=a._x1-a._x0;return c?(3*(a._y1-a._y0)/c-b)/2:b}function Rk(a,b,c){var d=a._x0,e=a._x1,f=a._y1,g=(e-d)/3;a._context.bezierCurveTo(d+g,a._y0+g*b,e-g,f-g*c,e,f)}function xj(a){this._context=a}function Dm(a){this._context=new Em(a)}function Em(a){this._context=a}function Fm(a){this._context=a}function Gm(a){var b,c,d=a.length-1,e=Array(d),f=Array(d),g=Array(d);e[0]=0;f[0]=2;g[0]=a[0]+2*a[1];for(b=1;bn){if(fm)return;f>l&&(l=f)}if(f=d-k,n||!(0>f)){if(f/=n,0>n){if(f>m)return;f>l&&(l=f)}else if(0h){if(fm)return;f>l&&(l=f)}if(f=e-g,h||!(0>f)){if(f/=h,0>h){if(f>m)return;f>l&&(l=f)}else if(0m)||(0m&&(a[1]=[k+m*n,g+m*h]),!0)}}}}}function zq(a,b,c,d,e){var f=a[1];if(f)return!0;var g,h,k=a[0],l=a.left,m=a.right,f=l[0],l=l[1],n=m[0],m=m[1];h=(f+n)/2;if(m===l){if(h=d)return;if(f>n){if(k){if(k[1]>=e)return}else k=[h,c];f=[h,e]}else{if(k){if(k[1]g||1n){if(k){if(k[1]>=e)return}else k=[(c-h)/g,c];f=[(e-h)/g,e]}else{if(k){if(k[1]=d)return}else k=[b,g*b+h];f=[d,g*d+h]}else{if(k){if(k[0]=-Cq)){var l=g*g+h*h,m=d*d+k*k,h=(k*l-h*m)/e,d=(g*m-d*l)/e,g=Mm.pop()||new Bq;g.arc=a;g.site=b;g.x=h+c;g.y=(g.cy=d+f)+Math.sqrt(h*h+d*d);a.circle=g;a=null;for(b=ii._;b;)if(g.y$a)h=h.L;else{var k=h;e=g;var l=k.N;l?e=Pm(l,e):(k=k.site,e=k[1]===e?k[0]:1/0);if(!((e=f-e)>$a)){d>-$a?(b=h.P,c=h):e>-$a?(b=h,c=h.N):b=c=h;break}if(!h.R){b=h;break}h=h.R}Mc[a.index]={site:a,halfedges:[]};!0;d=Nm(a);if(fh.insert(b,d),b||c){if(b===c)return eh(b),c=Nm(b.site),fh.insert(d,c),d.edge=c.edge=gi(b.site,d.site),dh(b),void dh(c);if(c){eh(b);eh(c);f=b.site;h=f[0];e=f[1];var k=a[0]-h,l=a[1]-e,g=c.site,m=g[0]-h,n=g[1]-e,p=2*(k*n-l*m),q=k*k+l*l,r=m*m+n*n,h=[(n*q-l*r)/p+h,(k*r-m*q)/p+e];Bj(c.edge,f,g,h);d.edge=gi(f,a,null,h);c.edge=gi(a,g,null,h);dh(b);dh(c)}else d.edge=gi(b.site,d.site)}}function Pm(a,b){var c=a.site,d=c[0],e=c[1],f=e-b;if(!f)return d;var g=a.P;if(!g)return-1/0;var g=(c=g.site)[0],c=c[1],h=c-b;if(!h)return g;var k=g-d,l=1/f-1/h,m=k/h;return l?(-m+Math.sqrt(m*m-2*l*(k*k/(-2*h)-c+h/2+e-f/2)))/l+d:(d+g)/2}function Gq(a,b){return b[1]-a[1]||b[0]-a[0]}function Uk(a,b){var c,d,e,f=a.sort(Gq).pop();hc=[];Mc=Array(a.length);fh=new zj;for(ii=new zj;;)if(e=Sk,f&&(!e||f[1]$a||Math.abs(e[0][1]-e[1][1])>$a)||delete hc[f]}(c,d,e,f),function(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,r,t=Mc.length,u=!0;for(e=0;e$a||Math.abs(r-m)>$a)&&(k.splice(h,0,hc.push(hi(g,p,Math.abs(q-a)<$a&&d-r>$a?[a,Math.abs(n-a)<$a?m:d]:Math.abs(r-d)<$a&&c-q>$a?[Math.abs(m-d)<$a?n:c,d]:Math.abs(q-c)<$a&&r-b>$a?[c,Math.abs(n-c)<$a?m:b]:Math.abs(r-b)<$a&&q-a>$a?[Math.abs(m-b)<$a?n:a,b]:null))-1),++l);l&&(u=!1)}if(u){var v,w,Ia;h=1/0;e=0;for(u=null;ed?(d+e)/2:Math.min(0,d)||Math.max(0,e),b>f?(f+b)/2:Math.min(0,f)||Math.max(0,b))}var Sm=d(b),eg=Sm.right,Nq=Sm.left,Tm=Array.prototype,Oq=Tm.slice,Pq=Tm.map,Wj=Math.sqrt(50),Xj=Math.sqrt(10),Yj=Math.sqrt(2),Zj=Array.prototype.slice,Ap={value:function(){}};M.prototype=D.prototype={constructor:M,on:function(a,b){var c,d=this._,e=(a+"").trim().split(/^|\s+/).map(function(a){var b="",c=a.indexOf(".");if(0<=c&&(b=a.slice(c+1),a=a.slice(0,c)),a&&!d.hasOwnProperty(a))throw Error("unknown type: "+a);return{type:a,name:b}}),f=-1,g=e.length;if(!(2>arguments.length)){if(null!=b&&"function"!=typeof b)throw Error("invalid callback: "+b);for(;++fthis._names.indexOf(a)&&(this._names.push(a),this._node.setAttribute("class",this._names.join(" ")))},remove:function(a){a=this._names.indexOf(a);0<=a&&(this._names.splice(a,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(a){return 0<=this._names.indexOf(a)}};var El={};(a.event=null,"undefined"!=typeof document)&&("onmouseenter"in document.documentElement||(El={mouseenter:"mouseover",mouseleave:"mouseout"}));var bk=[null];wa.prototype=Ma.prototype={constructor:wa,select:function(a){"function"!=typeof a&&(a=ba(a));for(var b=this._groups,c=b.length,d=Array(c),e=0;e=w&&(w=q+1);!(p=v[w])&&++warguments.length){var d=this.node();return c.local?d.getAttributeNS(c.space,c.local):d.getAttribute(c)}return this.each((null==b?c.local?function(a){return function(){this.removeAttributeNS(a.space,a.local)}}:function(a){return function(){this.removeAttribute(a)}}:"function"==typeof b?c.local?function(a,b){return function(){var c=b.apply(this,arguments);null==c?this.removeAttributeNS(a.space,a.local):this.setAttributeNS(a.space,a.local,c)}}:function(a,b){return function(){var c=b.apply(this,arguments);null==c?this.removeAttribute(a):this.setAttribute(a,c)}}:c.local?function(a,b){return function(){this.setAttributeNS(a.space,a.local,b)}}:function(a,b){return function(){this.setAttribute(a,b)}})(c,b))},style:function(a,b,c){return 1arguments.length){for(var d=ja(this.node()),e=-1,f=c.length;++earguments.length)){h=b?Ua:nh;null==c&&(c=!1);for(d=0;d=this.r&&0<=this.g&&255>=this.g&&0<=this.b&&255>=this.b&&0<=this.opacity&&1>=this.opacity},hex:function(){return"#"+yf(this.r)+yf(this.g)+yf(this.b)},toString:function(){var a=this.opacity;return(1===(a=isNaN(a)?1:Math.max(0,Math.min(1,a)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===a?")":", "+a+")")}}));cd(Ob,Yd,eb(uc,{brighter:function(a){return a=null==a?1/.7:Math.pow(1/.7,a),new Ob(this.h,this.s,this.l*a,this.opacity)},darker:function(a){return a=null==a?.7:Math.pow(.7,a),new Ob(this.h,this.s,this.l*a,this.opacity)},rgb:function(){var a=this.h%360+360*(0>this.h),b=isNaN(a)||isNaN(this.s)?0:this.s,c=this.l,b=c+(.5>c?c:1-c)*b,c=2*c-b;return new fb(wd(240<=a?a-240:a+120,c,b),wd(a,c,b),wd(120>a?a+240:a-120,c,b),this.opacity)},displayable:function(){return(0<=this.s&&1>=this.s||isNaN(this.s))&&0<=this.l&&1>=this.l&&0<=this.opacity&&1>=this.opacity}}));var Gl=Math.PI/180,Jl=180/Math.PI,Il=4/29,Rg=6/29,Hl=3*Rg*Rg,Kp=Rg*Rg*Rg;cd(Yb,Rc,eb(uc,{brighter:function(a){return new Yb(this.l+18*(null==a?1:a),this.a,this.b,this.opacity)},darker:function(a){return new Yb(this.l-18*(null==a?1:a),this.a,this.b,this.opacity)},rgb:function(){var a=(this.l+16)/116,b=isNaN(this.a)?a:a+this.a/500,c=isNaN(this.b)?a:a-this.b/200;return new fb(ed(3.1338561*(b=.96422*xd(b))-1.6168667*(a=1*xd(a))-.4906146*(c=.82521*xd(c))),ed(-.9787684*b+1.9161415*a+.033454*c),ed(.0719453*b-.2289914*a+1.4052427*c),this.opacity)}}));cd(sb,Me,eb(uc,{brighter:function(a){return new sb(this.h,this.c,this.l+18*(null==a?1:a),this.opacity)},darker:function(a){return new sb(this.h,this.c,this.l-18*(null==a?1:a),this.opacity)},rgb:function(){return Xb(this).rgb()}}));var Kl=1.78277*-.29227-.1347134789;cd(Ba,sa,eb(uc,{brighter:function(a){return a=null==a?1/.7:Math.pow(1/.7,a),new Ba(this.h,this.s,this.l*a,this.opacity)},darker:function(a){return a=null==a?.7:Math.pow(.7,a),new Ba(this.h,this.s,this.l*a,this.opacity)},rgb:function(){var a=isNaN(this.h)?0:(this.h+120)*Gl,b=+this.l,c=isNaN(this.s)?0:this.s*b*(1-b),d=Math.cos(a),a=Math.sin(a);return new fb(255*(b+c*(-.14861*d+1.78277*a)),255*(b+c*(-.29227*d+-.90649*a)),255*(b+1.97294*c*d),this.opacity)}}));var Ih=function ia(a){function b(a,b){var d=c((a=dd(a)).r,(b=dd(b)).r),e=c(a.g,b.g),f=c(a.b,b.b),g=mb(a.opacity,b.opacity);return function(b){return a.r=d(b),a.g=e(b),a.b=f(b),a.opacity=g(b),a+""}}var c=Zb(a);return b.gamma=ia,b}(1),mm=wi(Xa),Rq=wi(xa),ck=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,dk=new RegExp(ck.source,"g"),li,Wk,Vm,Ej,Ll=180/Math.PI,Xk={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},Wm=zi(function(a){return"none"===a?Xk:(li||(li=document.createElement("DIV"),Wk=document.documentElement,Vm=document.defaultView),li.style.transform=a,a=Vm.getComputedStyle(Wk.appendChild(li),null).getPropertyValue("transform"),Wk.removeChild(li),yi(+(a=a.slice(7,-1).split(","))[0],+a[1],+a[2],+a[3],+a[4],+a[5]))},"px, ","px)","deg)"),Xm=zi(function(a){return null==a?Xk:(Ej||(Ej=document.createElementNS("http://www.w3.org/2000/svg","g")),Ej.setAttribute("transform",a),(a=Ej.transform.baseVal.consolidate())?yi((a=a.matrix).a,a.b,a.c,a.d,a.e,a.f):Xk)},", ",")",")"),Jh=Math.SQRT2,Sq=nb(fd),Tq=nb(mb),Uq=Ra(fd),Vq=Ra(mb),Wq=Ne(fd),Fj=Ne(mb),Si,Mh,Sg=0,Lh=0,Nh=0,Ti=0,cg=0,Ri=0,Kh="object"==typeof performance&&performance.now?performance:Date,Ml="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(a){setTimeout(a,17)};Tc.prototype=gd.prototype={constructor:Tc,restart:function(a,b,c){if("function"!=typeof a)throw new TypeError("callback is not a function");c=(null==c?Zd():+c)+(null==b?0:+b);this._next||Mh===this||(Mh?Mh._next=this:Si=this,Mh=this);this._call=a;this._time=c;be()},stop:function(){this._call&&(this._call=null,this._time=1/0,be())}};var Lp=D("start","end","interrupt"),Mp=[],Xq=Ma.prototype.constructor,Ym=0,gh=Ma.prototype;Ha.prototype=Cf.prototype={constructor:Ha,select:function(a){var b=this._name,c=this._id;"function"!=typeof a&&(a=ba(a));for(var d=this._groups,e=d.length,f=Array(e),g=0;garguments.length?ac(this.node(),c).on.on(a):this.each(function(a,b,c){var d,e,f=function(a){return(a+"").trim().split(/^|\s+/).every(function(a){var b=a.indexOf(".");return 0<=b&&(a=a.slice(0,b)),!a||"start"===a})}(b)?ce:Fc;return function(){var g=f(this,a),h=g.on;h!==d&&(e=(d=h).copy()).on(b,c);g.on=e}}(c,a,b))},attr:function(a,b){var c=Q(a),d="transform"===c?Xm:Pb;return this.attrTn(a,"function"==typeof b?(c.local?function(a,b,c){var d,e,f;return function(){var g,h=c(this);if(null!=h)return(g=this.getAttributeNS(a.space,a.local))===h?null:g===d&&h===e?f:f=b(d=g,e=h);this.removeAttributeNS(a.space,a.local)}}:function(a,b,c){var d,e,f;return function(){var g,h=c(this);if(null!=h)return(g=this.getAttribute(a))===h?null:g===d&&h===e?f:f=b(d=g,e=h);this.removeAttribute(a)}})(c,d,Da(this,"attr."+a,b)):null==b?(c.local?function(a){return function(){this.removeAttributeNS(a.space,a.local)}}:function(a){return function(){this.removeAttribute(a)}})(c):(c.local?function(a,b,c){var d,e;return function(){var f=this.getAttributeNS(a.space,a.local);return f===c?null:f===d?e:e=b(d=f,c)}}:function(a,b,c){var d,e;return function(){var f=this.getAttribute(a);return f===c?null:f===d?e:e=b(d=f,c)}})(c,d,b+""))},attrTn:function(a,b){var c="attr."+a;if(2>arguments.length)return(c=this.tn(c))&&c._value;if(null==b)return this.tn(c,null);if("function"!=typeof b)throw Error();var d=Q(a);return this.tn(c,(d.local?function(a,b){function c(){var c=this,d=b.apply(c,arguments);return d&&function(b){c.setAttributeNS(a.space,a.local,d(b))}}return c._value=b,c}:function(a,b){function c(){var c=this,d=b.apply(c,arguments);return d&&function(b){c.setAttribute(a,d(b))}}return c._value=b,c})(d,b))},style:function(a,b,c){var d="transform"==(a+="")?Wm:Pb;return null==b?this.styleTn(a,function(a,b){var c,d,e;return function(){var f=ga(this,a),g=(this.style.removeProperty(a),ga(this,a));return f===g?null:f===c&&g===d?e:e=b(c=f,d=g)}}(a,d)).on("end.style."+a,function(a){return function(){this.style.removeProperty(a)}}(a)):this.styleTn(a,"function"==typeof b?function(a,b,c){var d,e,f;return function(){var g=ga(this,a),h=c(this);return null==h&&(this.style.removeProperty(a),h=ga(this,a)),g===h?null:g===d&&h===e?f:f=b(d=g,e=h)}}(a,d,Da(this,"style."+a,b)):function(a,b,c){var d,e;return function(){var f=ga(this,a);return f===c?null:f===d?e:e=b(d=f,c)}}(a,d,b+""),c)},styleTn:function(a,b,c){var d="style."+(a+="");if(2>arguments.length)return(d=this.tn(d))&&d._value;if(null==b)return this.tn(d,null);if("function"!=typeof b)throw Error();return this.tn(d,function(a,b,c){function d(){var d=this,e=b.apply(d,arguments);return e&&function(b){d.style.setProperty(a,e(b),c)}}return d._value=b,d}(a,b,null==c?"":c))},text:function(a){return this.tn("text","function"==typeof a?function(a){return function(){var b=a(this);this.textContent=null==b?"":b}}(Da(this,"text",a)):function(a){return function(){this.textContent=a}}(null==a?"":a+""))},remove:function(){return this.on("end.remove",(a=this._id,function(){var b=this.parentNode,c;for(c in this.__transition)if(+c!==a)return;b&&b.removeChild(this)}));var a},tn:function(a,b){var c=this._id;if(a+="",2>arguments.length){for(var d=ac(this.node(),c).tn,e=0,f=d.length;e=(b*=2)?Math.pow(b,a):2-Math.pow(2-b,a))/2}return a=+a,b.exponent=bb,b}(3),Nl=Math.PI,$m=Nl/2,ek=4/11,Op=6/11,Np=8/11,Qp=9/11,Pp=10/11,Rp=21/22,Ui=1/ek/ek,$q=function Ja(a){function b(b){return b*b*((a+1)*b-a)}return a=+a,b.overshoot=Ja,b}(1.70158),ar=function Nb(a){function b(b){return--b*b*((a+1)*b+a)+1}return a=+a,b.overshoot=Nb,b}(1.70158),an=function lf(a){function b(b){return(1>(b*=2)?b*b*((a+1)*b-a):(b-=2)*b*((a+1)*b+a)+2)/2}return a=+a,b.overshoot=lf,b}(1.70158),hh=2*Math.PI,br=function ye(a,b){function c(c){return a*Math.pow(2,10*--c)*Math.sin((d-c)/b)}var d=Math.asin(1/(a=Math.max(1,a)))*(b/=hh);return c.amplitude=function(a){return ye(a,b*hh)},c.period=function(b){return ye(a,b)},c}(1,.3),bn=function mf(a,b){function c(c){return 1-a*Math.pow(2,-10*(c=+c))*Math.sin((c+d)/b)}var d=Math.asin(1/(a=Math.max(1,a)))*(b/=hh);return c.amplitude=function(a){return mf(a,b*hh)},c.period=function(b){return mf(a,b)},c}(1,.3),cr=function La(a,b){function c(c){return(0>(c=2*c-1)?a*Math.pow(2,10*c)*Math.sin((d-c)/b):2-a*Math.pow(2,-10*c)*Math.sin((d+c)/b))/2}var d=Math.asin(1/(a=Math.max(1,a)))*(b/=hh);return c.amplitude=function(a){return La(a,b*hh)},c.period=function(b){return La(a,b)},c}(1,.3),Yk={time:null,delay:0,duration:250,ease:zd};Ma.prototype.interrupt=function(a){return this.each(function(){Vc(this,a)})};Ma.prototype.transition=function(a){var b,c;a instanceof Ha?(b=a._id,a=a._name):(b=++Ym,(c=Yk).time=Zd(),a=null==a?null:a+"");for(var d=this._groups,e=d.length,f=0;fe)throw Error("negative radius: "+e);if(null===this._x1)this._+="M"+(this._x1=a)+","+(this._y1=b);else if(1E-6l*d)+","+(this._x1=a+n*h)+","+(this._y1=b+n*k)}else this._+="L"+(this._x1=a)+","+(this._y1=b)},arc:function(a,b,c,d,e,f){a=+a;b=+b;var g=(c=+c)*Math.cos(d),h=c*Math.sin(d),k=a+g,l=b+h,m=1^f;d=f?d-e:e-d;if(0>c)throw Error("negative radius: "+c);null===this._x1?this._+="M"+k+","+l:(1E-6d&&(d=d%$k+$k),d>gr?this._+="A"+c+","+c+",0,1,"+m+","+(a-g)+","+(b-h)+"A"+c+","+c+",0,1,"+m+","+(this._x1=k)+","+(this._y1=l):1E-6=Zk)+","+m+","+(this._x1=a+c*Math.cos(e))+","+(this._y1=b+c*Math.sin(e))))},rect:function(a,b,c,d){this._+="M"+(this._x0=this._x1=+a)+","+(this._y0=this._y1=+b)+"h"+ +c+"v"+ +d+"h"+-c+"Z"},toString:function(){return this._}};Cd.prototype=cc.prototype={constructor:Cd,has:function(a){return"$"+a in this},get:function(a){return this["$"+a]},set:function(a,b){return this["$"+a]=b,this},remove:function(a){a="$"+a;return a in this&&delete this[a]},clear:function(){for(var a in this)"$"===a[0]&&delete this[a]},keys:function(){var a=[],b;for(b in this)"$"===b[0]&&a.push(b.slice(1));return a},values:function(){var a=[],b;for(b in this)"$"===b[0]&&a.push(this[b]);return a},entries:function(){var a=[],b;for(b in this)"$"===b[0]&&a.push({key:b.slice(1),value:this[b]});return a},size:function(){var a=0,b;for(b in this)"$"===b[0]&&++a;return a},empty:function(){for(var a in this)if("$"===a[0])return!1;return!0},each:function(a){for(var b in this)"$"===b[0]&&a(this[b],b.slice(1),this)}};var fg=cc.prototype;tg.prototype=rg.prototype={constructor:tg,has:fg.has,add:function(a){return this["$"+(a+="")]=a,this},remove:fg.remove,clear:fg.clear,values:fg.keys,size:fg.size,empty:fg.empty,each:fg.each};var Rl=Array.prototype.slice,Be=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]],Sl={},hk={},Hj=Jf(","),hn=Hj.parse,hr=Hj.parseRows,ir=Hj.format,jr=Hj.formatRows,Ij=Jf("\t"),jn=Ij.parse,kr=Ij.parseRows,lr=Ij.format,mr=Ij.formatRows,nr=Ue(hn),or=Ue(jn),pr=je("application/xml"),qr=je("text/html"),rr=je("image/svg+xml"),sc=Xc.prototype=vg.prototype;sc.copy=function(){var a,b,c=new vg(this._x,this._y,this._x0,this._y0,this._x1,this._y1),d=this._root;if(!d)return c;if(!d.length)return c._root=me(d),c;for(a=[{source:d,target:c._root=Array(4)}];d=a.pop();)for(var e=0;4>e;++e)(b=d.source[e])&&(b.length?a.push({source:b,target:d.target[e]=Array(4)}):d.target[e]=me(b));return c};sc.add=function(a){var b=+this._x.call(null,a),c=+this._y.call(null,a);return ke(this.cover(b,c),b,c,a)};sc.addAll=function(a){var b,c,d,e,f=a.length,g=Array(f),h=Array(f),k=1/0,l=1/0,m=-1/0,n=-1/0;for(c=0;cm&&(m=d),en&&(n=e));ma||a>e||d>b||b>f))return this;var g,h,k=e-c,l=this._root;switch(h=(b<(d+f)/2)<<1|a<(c+e)/2){case 0:do(g=Array(4))[h]=l,l=g;while(f=d+(k*=2),a>(e=c+k)||b>f);break;case 1:do(g=Array(4))[h]=l,l=g;while(f=d+(k*=2),(c=e-k)>a||b>f);break;case 2:do(g=Array(4))[h]=l,l=g;while(d=f-(k*=2),a>(e=c+k)||d>b);break;case 3:do(g=Array(4))[h]=l,l=g;while(d=f-(k*=2),(c=e-k)>a||d>b)}this._root&&this._root.length&&(this._root=l)}return this._x0=c,this._y0=d,this._x1=e,this._y1=f,this};sc.data=function(){var a=[];return this.visit(function(b){if(!b.length){do a.push(b.data);while(b=b.next)}}),a};sc.extent=function(a){return arguments.length?this.cover(+a[0][0],+a[0][1]).cover(+a[1][0],+a[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]};sc.find=function(a,b,c){var d,e,f,g,h,k,l,m=this._x0,n=this._y0,p=this._x1,q=this._y1,r=[],t=this._root;t&&r.push(new ub(t,m,n,p,q));for(null==c?c=1/0:(m=a-c,n=b-c,p=a+c,q=b+c,c*=c);k=r.pop();)if(!(!(t=k.node)||(e=k.x0)>p||(f=k.y0)>q||(g=k.x1)=v)<<1|a>=u)&&(k=r[r.length-1],r[r.length-1]=r[r.length-1-l],r[r.length-1-l]=k)}else k=a-+this._x.call(null,t.data),u=b-+this._y.call(null,t.data),k=k*k+u*u,k=(h=(r+u)/2))?r=h:u=h,(m=g>=(k=(t+v)/2))?t=k:v=k,b=q,!(q=q[n=m<<1|l]))return this;if(!q.length)break;(b[n+1&3]||b[n+2&3]||b[n+3&3])&&(c=b,p=n)}for(;q.data!==a;)if(d=q,!(q=q.next))return this;return(e=q.next)&&delete q.next,d?(e?d.next=e:delete d.next,this):b?(e?b[n]=e:delete b[n],(q=b[0]||b[1]||b[2]||b[3])&&q===(b[3]||b[2]||b[1]||b[0])&&!q.length&&(c?c[p]=q:this._root=q),this):(this._root=e,this)};sc.removeAll=function(a){for(var b=0,c=a.length;b=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;ec.prototype=md.prototype;md.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(null==this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(null==this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var Vl={"%":function(a,b){return(100*a).toFixed(b)},b:function(a){return Math.round(a).toString(2)},c:function(a){return a+""},d:function(a){return Math.round(a).toString(10)},e:function(a,b){return a.toExponential(b)},f:function(a,b){return a.toFixed(b)},g:function(a,b){return a.toPrecision(b)},o:function(a){return Math.round(a).toString(8)},p:function(a,b){return yc(100*a,b)},r:yc,s:function(a,b){var c=Yc(a,b);if(!c)return a+"";var d=c[0],c=c[1],c=c-(Ul=3*Math.max(-8,Math.min(8,Math.floor(c/3))))+1,e=d.length;return c===e?d:c>e?d+Array(c-e+1).join("0"):0a?-1:0},zb=Math.sqrt,Yg=Math.tan,Xl={Feature:function(a,b){ra(a.geometry,b)},FeatureCollection:function(a,b){for(var c=a.features,d=-1,e=c.length;++da?Cc+a:a);this.lineStart=this.lineEnd=this.point=Za},sphere:function(){Kj.add(Cc)}},rb,Lc,xb,Zc,dg,$l,am,Vg,nf,Ce,bj,ej,aj,cj,dj,fj,gj,hj,lk,mk,nk,bm,cm,pc,qc,rc,Oh=new ob,De={point:Ic,lineStart:nd,lineEnd:ib,polygonStart:function(){De.point=Of;De.lineStart=pe;De.lineEnd=zg;Oh.reset();Td.polygonStart()},polygonEnd:function(){Td.polygonEnd();De.point=Ic;De.lineStart=nd;De.lineEnd=ib;0>$i?(rb=-(xb=180),Lc=-(Zc=90)):1E-6Oh&&(Lc=-90);Ce[0]=rb;Ce[1]=xb}},td={sphere:Za,point:af,lineStart:Pf,lineEnd:Qf,polygonStart:function(){td.lineStart=Rf;td.lineEnd=Cg},polygonEnd:function(){td.lineStart=Pf;td.lineEnd=Qf}};bf.invert=bf;var ok=new ob,Ak=Gg(function(){return!0},function(a){var b,c=NaN,d=NaN,e=NaN;return{lineStart:function(){a.lineStart();b=1},point:function(f,g){var h=0Ta(k-Qa))a.point(c,d=0<(d+g)/2?jb:-jb),a.point(e,d),a.lineEnd(),a.lineStart(),a.point(h,d),a.point(f,d),b=0;else if(e!==h&&k>=Qa){1E-6>Ta(c-e)&&(c-=1E-6*e);1E-6>Ta(f-h)&&(f-=1E-6*h);var k=c,l=d,m=f,n,p,q=pa(k-m);d=1E-6mi&&(mi=a);bMj&&(Mj=b)},lineStart:Za,lineEnd:Za,polygonStart:Za,polygonEnd:Za,result:function(){var a=[[ih,Lj],[mi,Mj]];return mi=Mj=-(Lj=ih=1/0),a}},gm,hm,Ud,Vd,vk=0,wk=0,Ph=0,lj=0,mj=0,Xg=0,xk=0,yk=0,Qh=0,$c={point:Nd,lineStart:Ch,lineEnd:ef,polygonStart:function(){$c.lineStart=Xf;$c.lineEnd=ff},polygonEnd:function(){$c.point=Nd;$c.lineStart=Ch;$c.lineEnd=ef},result:function(){var a=Qh?[xk/Qh,yk/Qh]:Xg?[lj/Xg,mj/Xg]:Ph?[vk/Ph,wk/Ph]:[NaN,NaN];return vk=wk=Ph=lj=mj=Xg=xk=yk=Qh=0,a}};te.prototype={_radius:4.5,pointRadius:function(a){return this._radius=a,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath();this._point=NaN},point:function(a,b){switch(this._point){case 0:this._context.moveTo(a,b);this._point=1;break;case 1:this._context.lineTo(a,b);break;default:this._context.moveTo(a+this._radius,b),this._context.arc(a,b,this._radius,0,Cc)}},result:Za};var bl,im,jm,Sh,Th,zk=new ob,Rh={point:Za,lineStart:function(){Rh.point=gf},lineEnd:function(){bl&&ue(im,jm);Rh.point=Za},polygonStart:function(){bl=!0},polygonEnd:function(){bl=null},result:function(){var a=+zk;return zk.reset(),a}};hf.prototype={_radius:4.5,_circle:Yf(4.5),pointRadius:function(a){return(a=+a)!==this._radius&&(this._radius=a,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z");this._point=NaN},point:function(a,b){switch(this._point){case 0:this._string.push("M",a,",",b);this._point=1;break;case 1:this._string.push("L",a,",",b);break;default:null==this._circle&&(this._circle=Yf(this._radius)),this._string.push("M",a,",",b,this._circle)}},result:function(){if(this._string.length){var a=this._string.join("");return this._string=[],a}return null}};Od.prototype={constructor:Od,point:function(a,b){this.stream.point(a,b)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var bq=va(30*ya),cq=rd({point:function(a,b){this.stream.point(a*ya,b*ya)}}),cl=Ca(function(a){return zb(2/(1+a))});cl.invert=qb(function(a){return 2*vb(a/2)});var dl=Ca(function(a){return(a=xg(a))&&a/pa(a)});dl.invert=qb(function(a){return a});$f.invert=function(a,b){return[a,2*Zg(kn(b))-jb]};sf.invert=sf;var pj=zb(3)/2;jh.invert=function(a,b){for(var c,d=b,e=d*d,f=e*e*e,g=0;12>g&&(f=(e=(d-=c=(d*(1.340264+-.081106*e+f*(8.93E-4+.003796*e))-b)/(1.340264+3*-.081106*e+f*(7*8.93E-4+.034164*e)))*d)*e*e,!(1E-12>Ta(c)));++g);return[pj*a*(1.340264+3*-.081106*e+f*(7*8.93E-4+.034164*e))/va(d),vb(pa(d)/pj)]};mh.invert=qb(Zg);oh.invert=function(a,b){var c,d=b,e=25;do{var f=d*d;c=f*f;d-=c=(d*(1.007226+f*(.015085+c*(.028874*f-.044475-.005916*c)))-b)/(1.007226+f*(.045255+c*(.259866*f-.311325-.005916*11*c)))}while(1E-6b&&(b+=36E5);a.setTime(36E5*Math.floor((+a-b)/36E5)+b)},function(a,b){a.setTime(+a+36E5*b)},function(a,b){return(b-a)/36E5},function(a){return a.getHours()}),Ar=fl.range,Yh=Ab(function(a){a.setHours(0,0,0,0)},function(a,b){a.setDate(a.getDate()+b)},function(a,b){return(b-a-6E4*(b.getTimezoneOffset()-a.getTimezoneOffset()))/864E5},function(a){return a.getDate()-1}),Br=Yh.range,Zh=tf(0),Xh=tf(1),un=tf(2),vn=tf(3),$h=tf(4),wn=tf(5),xn=tf(6),yn=Zh.range,Cr=Xh.range,Dr=un.range,Er=vn.range,Fr=$h.range,Gr=wn.range,Hr=xn.range,gl=Ab(function(a){a.setDate(1);a.setHours(0,0,0,0)},function(a,b){a.setMonth(a.getMonth()+b)},function(a,b){return b.getMonth()-a.getMonth()+12*(b.getFullYear()-a.getFullYear())},function(a){return a.getMonth()}),Ir=gl.range,Fe=Ab(function(a){a.setMonth(0,1);a.setHours(0,0,0,0)},function(a,b){a.setFullYear(a.getFullYear()+b)},function(a,b){return b.getFullYear()-a.getFullYear()},function(a){return a.getFullYear()});Fe.every=function(a){return isFinite(a=Math.floor(a))&&0f;++f){var g=rf*f/5,h=Math.cos(g),g=Math.sin(g);a.lineTo(g*c,-h*c);a.lineTo(h*d-g*e,g*d+h*e)}a.closePath()}},lo={draw:function(a,b){var c=Math.sqrt(b),d=-c/2;a.rect(d,d,c,c)}},ml=Math.sqrt(3),mo={draw:function(a,b){var c=-Math.sqrt(b/(3*ml));a.moveTo(0,2*c);a.lineTo(-ml*c,-c);a.lineTo(ml*c,-c);a.closePath()}},ad=Math.sqrt(3)/2,nl=1/Math.sqrt(12),Ss=3*(nl/2+1),no={draw:function(a,b){var c=Math.sqrt(b/Ss),d=c/2,e=c*nl,c=c*nl+c,f=-d;a.moveTo(d,e);a.lineTo(d,c);a.lineTo(f,c);a.lineTo(-.5*d-ad*e,ad*d+-.5*e);a.lineTo(-.5*d-ad*c,ad*d+-.5*c);a.lineTo(-.5*f-ad*c,ad*f+-.5*c);a.lineTo(-.5*d+ad*e,-.5*e-ad*d);a.lineTo(-.5*d+ad*c,-.5*c-ad*d);a.lineTo(-.5*f+ad*c,-.5*c-ad*f);a.closePath()}},Ts=[ll,go,io,lo,ko,mo,no];vj.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN;this._point=0},lineEnd:function(){switch(this._point){case 3:uj(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath();this._line=1-this._line},point:function(a,b){switch(a=+a,b=+b,this._point){case 0:this._point=1;this._line?this._context.lineTo(a,b):this._context.moveTo(a,b);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:uj(this,a,b)}this._x0=this._x1;this._x1=a;this._y0=this._y1;this._y1=b}};um.prototype={areaStart:pf,areaEnd:pf,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN;this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2);this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3);this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3);this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(a,b){switch(a=+a,b=+b,this._point){case 0:this._point=1;this._x2=a;this._y2=b;break;case 1:this._point=2;this._x3=a;this._y3=b;break;case 2:this._point=3;this._x4=a;this._y4=b;this._context.moveTo((this._x0+4*this._x1+a)/6,(this._y0+4*this._y1+b)/6);break;default:uj(this,a,b)}this._x0=this._x1;this._x1=a;this._y0=this._y1;this._y1=b}};vm.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN;this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath();this._line=1-this._line},point:function(a,b){switch(a=+a,b=+b,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var c=(this._x0+4*this._x1+a)/6,d=(this._y0+4*this._y1+b)/6;this._line?this._context.lineTo(c,d):this._context.moveTo(c,d);break;case 3:this._point=4;default:uj(this,a,b)}this._x0=this._x1;this._x1=a;this._y0=this._y1;this._y1=b}};wm.prototype={lineStart:function(){this._x=[];this._y=[];this._basis.lineStart()},lineEnd:function(){var a=this._x,b=this._y,c=a.length-1;if(0this._t&&2===this._point&&this._context.lineTo(this._x,this._y);(this._line||0!==this._line&&1===this._point)&&this._context.closePath();0<=this._line&&(this._t=1-this._t,this._line=1-this._line)},point:function(a,b){switch(a=+a,b=+b,this._point){case 0:this._point=1;this._line?this._context.lineTo(a,b):this._context.moveTo(a,b);break;case 1:this._point=2;default:if(0>=this._t)this._context.lineTo(this._x,b),this._context.lineTo(a,b);else{var c=this._x*(1-this._t)+a*this._t;this._context.lineTo(c,this._y);this._context.lineTo(c,b)}}this._x=a;this._y=b}};zj.prototype={constructor:zj,insert:function(a,b){var c,d,e;if(a){if(b.P=a,b.N=a.N,a.N&&(a.N.P=b),a.N=b,a.R){for(a=a.R;a.L;)a=a.L;a.L=b}else a.R=b;c=a}else this._?(a=Km(this._),b.P=null,b.N=a,a.P=a.L=b,c=a):(b.P=b.N=null,this._=b,c=null);b.L=b.R=null;b.U=c;b.C=!0;for(a=b;c&&c.C;)c===(d=c.U).L?(e=d.R)&&e.C?(c.C=e.C=!1,d.C=!0,a=d):(a===c.R&&(ei(this,c),c=(a=c).U),c.C=!1,d.C=!0,fi(this,d)):(e=d.L)&&e.C?(c.C=e.C=!1,d.C=!0,a=d):(a===c.L&&(fi(this,c),c=(a=c).U),c.C=!1,d.C=!0,ei(this,d)),c=a.U;this._.C=!1},remove:function(a){a.N&&(a.N.P=a.P);a.P&&(a.P.N=a.N);a.N=a.P=null;var b,c,d,e=a.U,f=a.L,g=a.R;if(c=f?g?Km(g):f:g,e?e.L===a?e.L=c:e.R=c:this._=c,f&&g?(d=c.C,c.C=a.C,c.L=f,f.U=c,c!==g?(e=c.U,c.U=a.U,a=c.R,e.L=a,c.R=g,g.U=c):(c.U=e,e=c,a=c.R)):(d=a.C,a=c),a&&(a.U=e),!d)if(a&&a.C)a.C=!1;else{do{if(a===this._)break;if(a===e.L){if((b=e.R).C&&(b.C=!1,e.C=!0,ei(this,e),b=e.R),b.L&&b.L.C||b.R&&b.R.C){b.R&&b.R.C||(b.L.C=!1,b.C=!0,fi(this,b),b=e.R);b.C=e.C;e.C=b.R.C=!1;ei(this,e);a=this._;break}}else if((b=e.L).C&&(b.C=!1,e.C=!0,fi(this,e),b=e.L),b.L&&b.L.C||b.R&&b.R.C){b.L&&b.L.C||(b.R.C=!1,b.C=!0,ei(this,b),b=e.L);b.C=e.C;e.C=b.L.C=!1;fi(this,e);a=this._;break}b.C=!0;a=e;e=e.U}while(!a.C);a&&(a.C=!1)}}};var Sk,Mm=[],Om=[],fh,Mc,ii,hc,$a=1E-6,Cq=1E-12;Uk.prototype={constructor:Uk,polygons:function(){var a=this.edges;return this.cells.map(function(b){var c=b.halfedges.map(function(c){return Lm(b,a[c])});return c.data=b.site.data,c})},triangles:function(){var a=[],b=this.edges;return this.cells.forEach(function(c,d){if(f=(e=c.halfedges).length)for(var e,f,g,h,k,l,m=c.site,n=-1,p=b[e[f-1]],q=p.left===m?p.right:p.left;++n((h=m)[0]-l[0])*(k[1]-h[1])-(h[0]-k[0])*(l[1]-h[1]))&&a.push([m.data,g.data,q.data])}),a},links:function(){return this.edges.filter(function(a){return a.right}).map(function(a){return{source:a.left.data,target:a.right.data}})},find:function(a,b,c){var d,e,f=this,g=f._found||0;for(d=f.cells.length;!(e=f.cells[g]);)if(++g>=d)return null;d=a-e.site[0];var h=b-e.site[1],k=d*d+h*h;do e=f.cells[d=g],g=null,e.halfedges.forEach(function(c){var d=f.edges[c];c=d.left;if(c!==e.site&&c||(c=d.right)){var d=a-c[0],h=b-c[1],d=d*d+h*h;da?1:b>=a?0:NaN};a.deviation=l;a.extent=m;a.histogram=function(){function a(a){var e,f,g=a.length,h=Array(g);for(e=0;el;)m.pop(),--n;var p,q=Array(n+1);for(e=0;e<=n;++e)(p=q[e]=[]).x0=0d?0:d);cc(e=a[f],h)||0!==c(h,h))&&(h=e,g=f);return 0===c(h,h)?g:void 0}};a.shuffle=function(a,b,c){for(var d,e=(null==c?a.length:c)-(b=null==b?0:+b);e;)d=Math.random()*e--|0,c=a[e+b],a[e+b]=a[d+b],a[d+b]=c;return a};a.sum=function(a,b){var c,d=a.length,e=-1,f=0;if(null==b)for(;++e=e.length)return null!=b&&d.sort(b),null!=c?c(d):d;for(var k,l,m,n=-1,p=d.length,q=e[f++],r=cc(),t=g();++ne.length)return a;var d,g=f[b-1];return null!=c&&b>=e.length?d=a.entries():(d=[],a.each(function(a,c){d.push({key:c,values:gk(a,b)})})),null!=g?d.sort(function(a,b){return g(a.key,b.key)}):d}(a(b,0,Te,Di),0)},key:function(a){return e.push(a),d},sortKeys:function(a){return f[e.length-1]=a,d},sortValues:function(a){return b=a,d},rollup:function(a){return c=a,d}}};a.set=rg;a.map=cc;a.keys=function(a){var b=[],c;for(c in a)b.push(c);return b};a.values=function(a){var b=[],c;for(c in a)b.push(a[c]);return b};a.entries=function(a){var b=[],c;for(c in a)b.push({key:c,value:a[c]});return b};a.color=Vb;a.rgb=dd;a.hsl=Yd;a.lab=Rc;a.hcl=Me;a.lch=function(a,b,c,d){return 1===arguments.length?og(a):new sb(c,b,a,null==d?1:d)};a.gray=function(a,b){return new Yb(a,0,0,null==b?1:b)};a.cubehelix=sa;a.contours=Dd;a.contourDensity=function(){function a(a){var c=new Float32Array(r*t),d=new Float32Array(r*t);a.forEach(function(a,b,d){var e=+g(a,b,d)+q>>p,f=+h(a,b,d)+q>>p;a=+k(a,b,d);0<=e&&e>p);he({width:r,height:t,data:d},{width:r,height:t,data:c},n>>p);sg({width:r,height:t,data:c},{width:r,height:t,data:d},n>>p);he({width:r,height:t,data:d},{width:r,height:t,data:c},n>>p);sg({width:r,height:t,data:c},{width:r,height:t,data:d},n>>p);he({width:r,height:t,data:d},{width:r,height:t,data:c},n>>p);a=v(c);Array.isArray(a)||(d=u(c),a=w(0,d,a),(a=x(0,Math.floor(d/a)*a,a)).shift());return Dd().thresholds(a).size([r,t])(c).map(b)}function b(a){return a.value*=Math.pow(2,-2*p),a.coordinates.forEach(c),a}function c(a){a.forEach(d)}function d(a){a.forEach(e)}function e(a){a[0]=a[0]*Math.pow(2,p)-q;a[1]=a[1]*Math.pow(2,p)-q}function f(){return r=l+2*(q=3*n)>>p,t=m+2*q>>p,a}var g=Ci,h=Bi,k=Hf,l=960,m=500,n=20,p=2,q=3*n,r=l+2*q>>p,t=m+2*q>>p,v=Gc(20);return a.x=function(b){return arguments.length?(g="function"==typeof b?b:Gc(+b),a):g},a.y=function(b){return arguments.length?(h="function"==typeof b?b:Gc(+b),a):h},a.weight=function(b){return arguments.length?(k="function"==typeof b?b:Gc(+b),a):k},a.size=function(a){if(!arguments.length)return[l,m];var b=Math.ceil(a[0]),c=Math.ceil(a[1]);if(!(0<=b||0<=b))throw Error("invalid size");return l=b,m=c,f()},a.cellSize=function(a){if(!arguments.length)return 1<y}v.mouse("drag")}function e(){Va(a.event.view).on("mousemove.drag mouseup.drag",null);bd(a.event.view,n);Oc();v.mouse("end")}function f(){if(q.apply(this,arguments)){var b,c,d=a.event.changedTouches,e=r.apply(this,arguments),f=d.length;for(b=0;b=(a*=2)?1-hd(1-a):hd(a-1)+1)/2};a.easeBack=an;a.easeBackIn=$q;a.easeBackOut=ar;a.easeBackInOut=an;a.easeElastic=bn;a.easeElasticIn=br;a.easeElasticOut=bn;a.easeElasticInOut=cr;a.blob=function(a,b){return fetch(a,b).then(Ei)};a.buffer=function(a,b){return fetch(a,b).then(ie)};a.dsv=function(a,b,c,d){3===arguments.length&&"function"==typeof c&&(d=c,c=void 0);var e=Jf(a);return Kf(b,c).then(function(a){return e.parse(a,d)})};a.csv=nr;a.tsv=or;a.image=function(a,b){return new Promise(function(c,d){var e=new Image,f;for(f in b)e[f]=b[f];e.onerror=d;e.onload=function(){c(e)};e.src=a})};a.json=function(a,b){return fetch(a,b).then(Ve)};a.text=Kf;a.xml=pr;a.html=qr;a.svg=rr;a.forceCenter=function(a,b){function c(){var c,e,f=d.length,g=0,h=0;for(c=0;cl+h||dm+h||ek.index&&(b=l-f.x-f.vx,c=m-f.y-f.vy,d=b*b+c*c,db;++b)a[b]&&a[b].r>a.r&&(a.r=a[b].r)}function d(){if(e){var b,c,d=e.length;f=Array(d);for(b=0;bf;++f)(b=a[f])&&(c=Math.abs(b.value))&&(g+=b.value,k+=c,d+=c*b.x,e+=c*b.y);a.x=d/k;a.y=e/k}else{(b=a).x=b.data.x;b.y=b.data.y;do g+=h[b.data.index];while(b=b.next)}a.value=g}function d(a,b,c,d){if(!a.value)return!0;c=a.x-f.x;var e=a.y-f.y;b=d-b;d=c*c+e*e;if(b*b/n=m)){(a.data!==f||a.next)&&(0===c&&(d+=(c=xc())*c),0===e&&(d+=(e=xc())*e),dMb(c[0],c[1])&&(c[1]=d[1]),Mb(d[0],c[1])>Mb(c[0],c[1])&&(c[0]=d[0])):e.push(c=d);f=-1/0;a=0;for(c=e[b=e.length-1];a<=b;c=d,++a)d=e[a],(g=Mb(c[1],d[0]))>f&&(f=g,rb=d[0],xb=c[1])}return nf=Ce=null,rb===1/0||Lc===1/0?[[NaN,NaN],[NaN,NaN]]:[[rb,Lc],[xb,Zc]]};a.geoCentroid=function(a){bj=ej=aj=cj=dj=fj=gj=hj=lk=mk=nk=0;jc(a,td);a=lk;var b=mk,c=nk,d=a*a+b*b+c*c;return 1E-12>d&&(a=fj,b=gj,c=hj,1E-6>ej&&(a=aj,b=cj,c=dj),1E-12>(d=a*a+b*b+c*c))?[NaN,NaN]:[oc(b,a)*gb,vb(c/zb(d))*gb]};a.geoCircle=function(){function a(){var a=d.apply(this,arguments),h=e.apply(this,arguments)*ya,k=f.apply(this,arguments)*ya;return b=[],c=qe(-a[0]*ya,-a[1]*ya,0).invert,Ii(g,h,k,1),a={type:"Polygon",coordinates:[b]},b=c=null,a}var b,c,d=od([0,0]),e=od(90),f=od(6),g={point:function(a,d){b.push(a=c(a,d));a[0]*=gb;a[1]*=gb}};return a.center=function(b){return arguments.length?(d="function"==typeof b?b:od([+b[0],+b[1]]),a):d},a.radius=function(b){return arguments.length?(e="function"==typeof b?b:od(+b),a):e},a.precision=function(b){return arguments.length?(f="function"==typeof b?b:od(+b),a):f},a};a.geoClipAntimeridian=Ak;a.geoClipCircle=yh;a.geoClipExtent=function(){var a,b,c,d=0,e=0,f=960,g=500;return c={stream:function(c){return a&&b===c?a:a=Ld(d,e,f,g)(b=c)},extent:function(h){return arguments.length?(d=+h[0][0],e=+h[0][1],f=+h[1][0],g=+h[1][1],a=b=null,c):[[d,e],[f,g]]}}};a.geoClipRectangle=Ld;a.geoContains=function(a,b){return(a&&ln.hasOwnProperty(a.type)?ln[a.type]:Vf)(a,b)};a.geoDistance=Md;a.geoGraticule=Lg;a.geoGraticule10=function(){return Lg()()};a.geoInterpolate=function(a,b){var c=a[0]*ya,d=a[1]*ya,e=b[0]*ya,f=b[1]*ya,g=va(d),h=pa(d),k=va(f),l=pa(f),m=g*va(c),n=g*pa(c),p=k*va(e),q=k*pa(e),r=2*vb(zb(yg(f-d)+g*k*yg(e-c))),t=pa(r),e=r?function(a){var b=pa(a*=r)/t,c=pa(r-a)/t;a=c*m+b*p;var d=c*n+b*q,b=c*h+b*l;return[oc(d,a)*gb,oc(b,zb(a*a+d*d))*gb]}:function(){return[c*gb,d*gb]};return e.distance=r,e};a.geoLength=Ig;a.geoPath=function(a,b){function c(a){return a&&("function"==typeof f&&e.pointRadius(+f.apply(this,arguments)),jc(a,d(e))),e.result()}var d,e,f=4.5;return c.area=function(a){return jc(a,d(Ee)),Ee.result()},c.measure=function(a){return jc(a,d(Rh)),Rh.result()},c.bounds=function(a){return jc(a,d(nj)),nj.result()},c.centroid=function(a){return jc(a,d($c)),$c.result()},c.projection=function(b){return arguments.length?(d=null==b?(a=null,qd):(a=b).stream,c):a},c.context=function(a){return arguments.length?(e=null==a?(b=null,new hf):new te(b=a),"function"!=typeof f&&e.pointRadius(f),c):b},c.pointRadius=function(a){return arguments.length?(f="function"==typeof a?a:(e.pointRadius(+a),+a),c):f},c.projection(a).context(b)};a.geoAlbers=oi;a.geoAlbersUsa=function(){function a(a){var b=a[0];a=a[1];return g=null,d.point(b,a),g||(e.point(b,a),g)||(f.point(b,a),g)}var b,c,d,e,f,g,h=oi(),k=Kc().rotate([154,0]).center([-2,58.5]).parallels([55,65]),l=Kc().rotate([157,0]).center([-3,19.9]).parallels([8,18]),m={point:function(a,b){g=[a,b]}};return a.invert=function(a){var b=h.scale(),c=h.translate(),d=(a[0]-c[0])/b,b=(a[1]-c[1])/b;return(.12<=b&&.234>b&&-.425<=d&&-.214>d?k:.166<=b&&.234>b&&-.214<=d&&-.115>d?l:h).invert(a)},a.stream=function(a){return b&&c===a?b:(d=[h.stream(c=a),k.stream(a),l.stream(a)],e=d.length,b={point:function(a,b){for(var c=-1;++cm},reflectY:function(b){return arguments.length?(p=vf(h*m,h*(n=b?-1:1),k,l),a()):0>n},fitExtent:function(a,b){return Ac(g,a,b)},fitSize:function(a,b){return Ac(g,[[0,0],a],b)},fitWidth:function(a,b){return we(g,a,b)},fitHeight:function(a,b){return xe(g,a,b)}}};a.geoProjection=Jc;a.geoProjectionMutator=Ng;a.geoMercator=function(){return qa($f).scale(961/Cc)};a.geoMercatorRaw=$f;a.geoNaturalEarth1=function(){return Jc(oh).scale(175.295)};a.geoNaturalEarth1Raw=oh;a.geoOrthographic=function(){return Jc(mg).scale(249.5).clipAngle(90.000001)};a.geoOrthographicRaw=mg;a.geoStereographic=function(){return Jc(kg).scale(250).clipAngle(142)};a.geoStereographicRaw=kg;a.geoTransverseMercator=function(){var a=qa(lg),b=a.center,c=a.rotate;return a.center=function(a){return arguments.length?b([-a[1],a[0]]):[(a=b())[1],-a[0]]},a.rotate=function(a){return arguments.length?c([a[0],a[1],2m.x&&(m=a);a.depth>n.depth&&(n=a)});var g=l===m?1:e(l,m)/2,p=g-l.x,q=f/(m.x+g+p),r=h/(n.depth||1);a.eachBefore(function(a){a.x=(a.x+p)*q;a.y=a.depth*r})}return a}function b(a){var b=a.children,c=a.parent.children,d=a.i?c[a.i-1]:null;b?(!function(a){for(var b=0,c=0,d=a.children,e=d.length;0<=--e;)(a=d[e]).z+=b,a.m+=b,b+=a.s+(c+=a.c)}(a),b=(b[0].z+b[b.length-1].z)/2,d?(a.z=d.z+e(a._,d._),a.m=a.z-b):a.z=b):d&&(a.z=d.z+e(a._,d._));a.parent.A=function(a,b,c){if(b){for(var d=a,f=a,g=b,h=d.parent.children[0],k=d.m,l=f.m,m=g.m,p=h.m;g=t(g),d=n(d),g&&d;){h=n(h);(f=t(f)).a=a;if(0<(b=g.z+m-d.z-k+e(g._,d._))){var q=g.a.parent===a.parent?g.a:c,r=a,u=b,v=u/(r.i-q.i);r.c-=v;r.s+=u;q.c+=v;r.z+=u;r.m+=u;k+=b;l+=b}m+=g.m;k+=d.m;p+=h.m;l+=f.m}g&&!t(f)&&(f.t=g,f.m+=m-l);d&&!n(h)&&(h.t=d,h.m+=k-p,c=a)}return c}(a,d,a.parent.A||c[0])}function c(a){a._.x=a.z+a.parent.m;a.m+=a.parent.m}function d(a){a.x*=f;a.y=a.depth*h}var e=g,f=1,h=1,k=null;return a.separation=function(b){return arguments.length?(e=b,a):e},a.size=function(b){return arguments.length?(k=!1,f=+b[0],h=+b[1],a):k?null:[f,h]},a.nodeSize=function(b){return arguments.length?(k=!0,f=+b[0],h=+b[1],a):k?[f,h]:null},a};a.treemap=function(){function a(a){return a.x0=a.y0=0,a.x1=e,a.y1=f,a.eachBefore(b),g=[0],d&&a.eachBefore(Hg),a}function b(a){var b=g[a.depth],d=a.x0+b,e=a.y0+b,f=a.x1-b,p=a.y1-b;f=b-1)return a=h[a],a.x0=d,a.y0=e,a.x1=f,void(a.y1=g);for(var k=l[a],m=c/2+k,n=a+1,p=b-1;n>>1;l[q]g-e?(c=(d*m+f*k)/c,Vi(a,n,k,d,e,c,g),Vi(n,b,m,c,e,f,g)):(c=(e*m+g*k)/c,Vi(a,n,k,d,e,f,c),Vi(n,b,m,d,c,f,g))}(0,k,a.value,b,c,d,e)};a.treemapDice=Qd;a.treemapSlice=I;a.treemapSliceDice=function(a,b,c,d,e){(1&a.depth?I:Qd)(a,b,c,d,e)};a.treemapSquarify=on;a.treemapResquarify=ur;a.interpolate=Ib;a.interpolateArray=Ec;a.interpolateBasis=Xa;a.interpolateBasisClosed=xa;a.interpolateDate=pb;a.interpolateDiscrete=function(a){var b=a.length;return function(c){return a[Math.max(0,Math.min(b-1,Math.floor(c*b)))]}};a.interpolateHue=function(a,b){var c=fd(+a,+b);return function(a){a=c(a);return a-360*Math.floor(a/360)}};a.interpolateNumber=Wa;a.interpolateObject=xi;a.interpolateRound=rh;a.interpolateString=Bb;a.interpolateTransformCss=Wm;a.interpolateTransformSvg=Xm;a.interpolateZoom=$b;a.interpolateRgb=Ih;a.interpolateRgbBasis=mm;a.interpolateRgbBasisClosed=Rq;a.interpolateHsl=Sq;a.interpolateHslLong=Tq;a.interpolateLab=function(a,b){var c=mb((a=Rc(a)).l,(b=Rc(b)).l),d=mb(a.a,b.a),e=mb(a.b,b.b),f=mb(a.opacity,b.opacity);return function(b){return a.l=c(b),a.a=d(b),a.b=e(b),a.opacity=f(b),a+""}};a.interpolateHcl=Uq;a.interpolateHclLong=Vq;a.interpolateCubehelix=Wq;a.interpolateCubehelixLong=Fj;a.piecewise=function(a,b){for(var c=0,d=b.length-1,e=b[0],f=Array(0>d?0:d);c(c=a.length))return null;var b,c,d=Array(c),e=Array(c);for(b=0;bh!=l>h&&g<(k-c)*(h-d)/(l-d)+c&&(m=!m),k=c,l=d;return m};a.polygonLength=function(a){for(var b,c,d=-1,e=a.length,f=a[e-1],g=f[0],f=f[1],h=0;++dd()[0]&&(f=rl(f),g=rl(g)),c}var c=ri(qo,ro).domain([1,10]),d=c.domain,e=10,f=ql(10),g=pl(10);return c.base=function(a){return arguments.length?(e=+a,b()):e},c.domain=function(a){return arguments.length?(d(a),b()):d()},c.ticks=function(a){var b;b=d();var c=b[0],h=b[b.length-1];(b=hh)break;a.push(m)}}else for(;nh)break;a.push(m)}}else a=G(n,p,Math.min(p-n,k)).map(g);return b?a.reverse():a},c.tickFormat=function(b,d){if(null==d&&(d=10===e?".0e":","),"function"!=typeof d&&(d=a.format(d)),b===1/0)return d;null==b&&(b=10);var h=Math.max(1,e*b/c.ticks().length);return function(a){var b=a/g(Math.round(f(a)));return b*ea?[NaN,NaN]:[0a?[NaN,NaN]:1>a?[c,f[0]]:a>=e?[f[e-1],d]:[f[a-1],f[a]]},a.copy=function(){return Tp().domain([c,d]).range(g)},ig(a)};a.scaleThreshold=function Up(){function a(a){if(a<=a)return c[eg(b,a,0,d)]}var b=[.5],c=[0,1],d=1;return a.domain=function(e){return arguments.length?(b=of.call(e),d=Math.min(b.length,c.length-1),a):b.slice()},a.range=function(e){return arguments.length?(c=of.call(e),d=Math.min(b.length,c.length-1),a):c.slice()},a.invertExtent=function(a){a=c.indexOf(a);return[b[a-1],b[a]]},a.copy=function(){return Up().domain(b).range(c)},a};a.scaleTime=function(){return Gk(Fe,gl,Zh,Yh,fl,el,ni,gg,a.timeFormat).domain([new Date(2E3,0,1),new Date(2E3,0,2)])};a.scaleUtc=function(){return Gk(Ge,jl,ai,Wh,il,hl,ni,gg,a.utcFormat).domain([Date.UTC(2E3,0,1),Date.UTC(2E3,0,2)])};a.scaleSequential=function Vp(a){function b(b){b=(b-c)*e;return a(f?Math.max(0,Math.min(1,b)):b)}var c=0,d=1,e=1,f=!1;return b.domain=function(a){return arguments.length?(c=+a[0],d=+a[1],e=c===d?0:1/(d-c),b):[c,d]},b.clamp=function(a){return arguments.length?(f=!!a,b):f},b.interpolator=function(c){return arguments.length?(a=c,b):a},b.copy=function(){return Vp(a).domain([c,d]).clamp(f)},ig(b)};a.scaleDiverging=function gk(a){function b(b){var c=.5+((b=+b)-d)*(ba||1q;if(k||(k=a=wc()),prf-1E-12)k.moveTo(p*hg(q),p*Wd(q)),k.arc(0,0,p,q,r,!u),1E-12m?qf:Math.acos(m))/2);m=ah(F[0]*F[0]+F[1]*F[1]);F=kl(E,(n-m)/(t-1));G=kl(E,(p-m)/(t+1))}}1E-12l?-1:1);for(h=0;he?(d[1]=g,d[0]=g+=e):d[0]=f};a.stackOffsetNone=bh;a.stackOffsetSilhouette=function(a,b){if(0<(c=a.length)){for(var c,d=0,e=a[b[0]],f=e.length;dG}b.zoom("mouse",w(d(b.that.__zoom,b.mouse[0]=tc(b.that),b.mouse[1]),b.extent,A))},!0).on("mouseup.zoom",function(){c.on("mousemove.zoom mouseup.zoom",null);bd(a.event.view,b.moved);ji();b.end()},!0),e=tc(this),f=a.event.clientX,h=a.event.clientY;db(a.event.view);a.event.stopImmediatePropagation();b.mouse=[e,this.__zoom.invert(e)];Vc(this);b.start()}}function m(){if(u.apply(this,arguments)){var e=this.__zoom,g=tc(this),h=e.invert(g),e=w(d(c(e,e.k*(a.event.shiftKey?.5:2)),g,h),v.apply(this,arguments),A);ji();0